You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.5 KiB

  1. # the powerdns admin keeps login information stored, hook that up to a shared volume
  2. apiVersion: v1
  3. kind: PersistentVolumeClaim
  4. metadata:
  5. name: admin
  6. namespace: inhouse-dns
  7. spec:
  8. storageClassName: block-2-rep
  9. accessModes:
  10. - ReadWriteOnce
  11. resources:
  12. requests:
  13. storage: 1Gi
  14. ---
  15. apiVersion: apps/v1
  16. kind: Deployment
  17. metadata:
  18. name: admin
  19. namespace: inhouse-dns
  20. spec:
  21. replicas: 1
  22. selector:
  23. matchLabels:
  24. app: admin
  25. template:
  26. metadata:
  27. labels:
  28. app: admin
  29. spec:
  30. # tried all other settings (security context etc), nothing else seems to work to set the
  31. # access rights for the pda user (from the powerdns admin image) for the shared volume
  32. initContainers:
  33. - name: chown
  34. image: busybox
  35. command: ["sh", "-c", "chown -R 100:100 /data"]
  36. volumeMounts:
  37. - name: data
  38. mountPath: /data
  39. containers:
  40. - name: admin
  41. image: ngoduykhanh/powerdns-admin:latest
  42. ports:
  43. - containerPort: 80
  44. volumeMounts:
  45. - name: data
  46. mountPath: /data
  47. volumes:
  48. - name: data
  49. persistentVolumeClaim:
  50. claimName: admin
  51. ---
  52. # access the powerdns admin webgui from within the network
  53. apiVersion: v1
  54. kind: Service
  55. metadata:
  56. name: admin
  57. namespace: inhouse-dns
  58. spec:
  59. # private floating ip
  60. externalIPs:
  61. - 10.0.0.9
  62. ports:
  63. - name: tcp
  64. protocol: TCP
  65. port: 8053
  66. targetPort: 80
  67. selector:
  68. app: admin