ldap-rc.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. apiVersion: v1
  2. kind: ReplicationController
  3. metadata:
  4. name: ldap-controller
  5. labels:
  6. app: ldap
  7. spec:
  8. replicas: 1
  9. selector:
  10. app: ldap
  11. template:
  12. metadata:
  13. labels:
  14. app: ldap
  15. spec:
  16. containers:
  17. - name: ldap
  18. image: osixia/openldap:1.1.3
  19. command:
  20. - --copy-service
  21. volumeMounts:
  22. - name: ldap-data
  23. mountPath: /var/lib/ldap
  24. - name: ldap-config
  25. mountPath: /etc/ldap/slapd.d
  26. - name: ldap-certs
  27. mountPath: /container/service/slapd/assets/certs
  28. - name: secret-volume
  29. mountPath: /container/environment/01-custom
  30. - name: container-run
  31. mountPath: /container/run
  32. ports:
  33. - containerPort: 389
  34. name: openldap
  35. - name: ldap-backup
  36. image: osixia/openldap-backup:0.1.8
  37. volumeMounts:
  38. - name: ldap-data
  39. mountPath: /var/lib/ldap
  40. - name: ldap-config
  41. mountPath: /etc/ldap/slapd.d
  42. - name: ldap-backup
  43. mountPath: /data/backup
  44. env:
  45. - name: LDAP_BACKUP_CONFIG_CRON_EXP
  46. value: "15 1 * * *"
  47. - name: LDAP_BACKUP_DATA_CRON_EXP
  48. value: "20 1 * * *"
  49. - name: LDAP_BACKUP_TTL
  50. value: "15"
  51. volumes:
  52. - name: ldap-data
  53. hostPath:
  54. path: "/data/ldap/db"
  55. - name: ldap-config
  56. hostPath:
  57. path: "/data/ldap/config"
  58. - name: ldap-backup
  59. hostPath:
  60. path: "/data/ldap/backup"
  61. - name: ldap-certs
  62. hostPath:
  63. path: "/data/ldap/certs"
  64. - name: "secret-volume"
  65. secret:
  66. secretName: "ldap-secret"
  67. - name: container-run
  68. emptyDir: {}