values.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Image registry secret. Required if authorization is needed on registry access.
  2. # Value of $(base64 ~/.docker/config.json).
  3. # For more info see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  4. # registry_secret_data:
  5. # Settings for main openvpn deployment
  6. openvpn:
  7. image: "jcr.infoclinica.ru/sys/openvpn-rsa"
  8. tag: "200207025"
  9. pullPolicy: IfNotPresent
  10. # podAnnotations:
  11. resources:
  12. limits:
  13. cpu: 350m
  14. memory: 50Mi
  15. requests:
  16. cpu: 350m
  17. memory: 50Mi
  18. # Openvpn config file
  19. configuration: |-
  20. dev openvpn-tun
  21. dev-type tun
  22. port 1194
  23. proto udp
  24. verb 3
  25. status /var/log/openvpn-status.log
  26. management localhost 7505
  27. keepalive 10 120
  28. persist-key
  29. persist-tun
  30. comp-lzo yes
  31. push comp-lzo yes
  32. topology subnet
  33. mssfix
  34. server 10.100.0.0 255.255.0.0
  35. crl-verify /etc/openvpn/keys/crl.pem
  36. client-config-dir /etc/openvpn/ccd
  37. ccd-exclusive
  38. ca /etc/openvpn/keys/ca.crt
  39. cert /etc/openvpn/keys/server.crt
  40. key /etc/openvpn/keys/server.key
  41. # Openvpn keys
  42. keys:
  43. ca.crt: |-
  44. -----BEGIN CERTIFICATE-----
  45. -----END CERTIFICATE-----
  46. server.crt: |-
  47. -----BEGIN CERTIFICATE-----
  48. -----END CERTIFICATE-----
  49. server.key: |-
  50. -----BEGIN PRIVATE KEY-----
  51. -----END PRIVATE KEY-----
  52. crl.pem: |-
  53. -----BEGIN X509 CRL-----
  54. -----END X509 CRL-----
  55. # Openvn deployment scripts
  56. scripts:
  57. # Initscript, executed by dedicated initialization container, main purpose - set firewall rules, or some similar, before openvpn start.
  58. initscript: |-
  59. #!/bin/bash
  60. iptables -I FORWARD 1 -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
  61. iptables -I FORWARD 1 -m state --state NEW -s 10.100.10.0/24 -d 192.168.205.10 -i openvpn-tun -j ACCEPT
  62. iptables -I INPUT 1 -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
  63. iptables -I INPUT 1 -m state --state NEW -s 10.100.10.0/24 -d 217.74.42.72 -i openvpn-tun -j ACCEPT
  64. # Main openvpn container startup script, aka ENTRYPOINT
  65. startscript: |-
  66. #!/bin/bash
  67. mkdir /dev/net
  68. mknod /dev/net/tun c 10 200
  69. exec "/usr/sbin/openvpn" "--config" "/etc/openvpn/configuration/openvpn.conf"
  70. # Stop script, executed by separate container on Pod termination.
  71. stopscript: |-
  72. #!/bin/bash
  73. iptables -D FORWARD -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
  74. iptables -D FORWARD -m state --state NEW -s 10.100.10.0/24 -d 192.168.205.10 -i openvpn-tun -j ACCEPT
  75. iptables -D INPUT -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
  76. iptables -D INPUT -m state --state NEW -s 10.100.10.0/24 -d 217.74.42.72 -i openvpn-tun -j ACCEPT
  77. # The health check script
  78. healthcheck: |-
  79. #!/bin/bash
  80. # ping something, or check connection status on port 7505
  81. # Inbound IP and port
  82. # ip, port and protocol for loadbalancer service, in case it's a server
  83. inbound_IP: 10.1.2.3
  84. # must be same, as port in openvpn config
  85. inbound_port: 1194
  86. # must be same, as proto in openvpn config
  87. inbound_proto: UDP
  88. # Openvpn settings, musb be the same, as in config, used in router daemonset
  89. dev_name: openvpn-tun
  90. net: 10.100.0.0
  91. mask: 255.255.0.0
  92. # CCD configmap
  93. ccd:
  94. client: ifconfig-push 10.100.10.2 255.255.0.0
  95. someclient: |-
  96. ifconfig-push 10.100.10.3 255.255.0.0
  97. iroute 192.168.250.0 255.255.255.0
  98. # Router container
  99. router:
  100. image: "jcr.infoclinica.ru/sys/kubectl"
  101. tag: "1.18.9-3"
  102. pullPolicy: IfNotPresent
  103. resources:
  104. limits:
  105. cpu: 50m
  106. memory: 50Mi
  107. requests:
  108. cpu: 50m
  109. memory: 50Mi