acme-dns.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. #{
  2. # "infoklinika.ru": {
  3. # "username":"8aeaadb6-1dcc-495a-899b-00519a76aacf",
  4. # "password":"8HLvFMfIA1b6pz8FiiKPRjzZ-1rzxwpLml9S_ENt",
  5. # "fulldomain":"d3747323-b9d9-4112-8db4-90b4f7bd62ed.auth.infoklinika.ru",
  6. # "subdomain":"d3747323-b9d9-4112-8db4-90b4f7bd62ed",
  7. # "allowfrom":[]
  8. # }
  9. #}
  10. ---
  11. apiVersion: v1
  12. kind: ConfigMap
  13. metadata:
  14. name: acme-cfg
  15. data:
  16. config.cfg: |
  17. [general]
  18. listen = ":53"
  19. protocol = "both"
  20. domain = "auth.infoklinika.ru"
  21. nsname = "nsauth.infoklinika.ru"
  22. nsadmin = "admin.infoklinika.ru"
  23. records = [
  24. "nsauth.infoklinika.ru. A 95.131.180.106",
  25. "auth.infoklinika.ru. NS nsauth.infoklinika.ru.",
  26. ]
  27. debug = true
  28. [database]
  29. engine = "sqlite3"
  30. connection = "/var/lib/acme-dns/acme-dns.db"
  31. [api]
  32. api_domain = ""
  33. disable_registration = false
  34. #autocert_port = "80"
  35. ip = ""
  36. port = "80"
  37. tls = "none"
  38. corsorigins = [
  39. "*"
  40. ]
  41. use_header = false
  42. header_name = "X-Forwarded-For"
  43. [logconfig]
  44. loglevel = "debug"
  45. logtype = "stdout"
  46. logformat = "text"
  47. ---
  48. apiVersion: v1
  49. kind: PersistentVolume
  50. metadata:
  51. name: acme-db
  52. labels:
  53. purpose: acme-db
  54. spec:
  55. accessModes:
  56. - ReadWriteOnce
  57. capacity:
  58. storage: 100Mi
  59. local:
  60. path: /dev/shared-iscsi/acme-dns
  61. fsType: xfs
  62. nodeAffinity:
  63. required:
  64. nodeSelectorTerms:
  65. - matchExpressions:
  66. - key: kubernetes.io/os
  67. operator: In
  68. values:
  69. - linux
  70. persistentVolumeReclaimPolicy: Delete
  71. storageClassName: local-storage
  72. volumeMode: Filesystem
  73. ---
  74. apiVersion: v1
  75. kind: PersistentVolumeClaim
  76. metadata:
  77. name: acme-db
  78. spec:
  79. accessModes:
  80. - ReadWriteOnce
  81. resources:
  82. requests:
  83. storage: 100Mi
  84. selector:
  85. matchLabels:
  86. purpose: acme-db
  87. storageClassName: local-storage
  88. ---
  89. apiVersion: apps/v1
  90. kind: Deployment
  91. metadata:
  92. name: acme-dns
  93. spec:
  94. selector:
  95. matchLabels:
  96. app: acme-dns
  97. replicas: 1
  98. template:
  99. metadata:
  100. labels:
  101. app: acme-dns
  102. spec:
  103. containers:
  104. - name: acme-dns
  105. image: joohoi/acme-dns:latest
  106. ports:
  107. - containerPort: 80
  108. - containerPort: 53
  109. - containerPort: 53
  110. protocol: UDP
  111. volumeMounts:
  112. - mountPath: /etc/acme-dns
  113. name: acme-cfg
  114. - mountPath: /var/lib/acme-dns
  115. name: acme-db
  116. volumes:
  117. - name: acme-cfg
  118. configMap:
  119. name: acme-cfg
  120. - name: acme-db
  121. persistentVolumeClaim:
  122. claimName: acme-db
  123. ---
  124. apiVersion: v1
  125. kind: Service
  126. metadata:
  127. name: acme-http
  128. spec:
  129. ports:
  130. - port: 80
  131. selector:
  132. app: acme-dns
  133. ---
  134. apiVersion: v1
  135. kind: Service
  136. metadata:
  137. name: acme-dns
  138. annotations:
  139. metallb.universe.tf/allow-shared-ip: nginx-ingress
  140. spec:
  141. ports:
  142. - name: dns-tcp
  143. port: 53
  144. selector:
  145. app: acme-dns
  146. type: LoadBalancer
  147. loadBalancerIP: 192.168.201.130
  148. ---
  149. apiVersion: v1
  150. kind: Service
  151. metadata:
  152. name: acme-dns-udp
  153. annotations:
  154. metallb.universe.tf/allow-shared-ip: nginx-ingress
  155. spec:
  156. ports:
  157. - name: dns-udp
  158. port: 53
  159. protocol: UDP
  160. selector:
  161. app: acme-dns
  162. type: LoadBalancer
  163. loadBalancerIP: 192.168.201.130
  164. ---
  165. apiVersion: extensions/v1beta1
  166. kind: Ingress
  167. metadata:
  168. name: nginx-ingress
  169. annotations:
  170. kubernetes.io/ingress.class: "nginx"
  171. spec:
  172. rules:
  173. - host: nsauth.infoklinika.ru
  174. http:
  175. paths:
  176. - path: /
  177. backend:
  178. serviceName: acme-http
  179. servicePort: 80