Skip to content

Instantly share code, notes, and snippets.

@munishpalmakhija
Last active December 11, 2024 14:26
Show Gist options
  • Select an option

  • Save munishpalmakhija/c4db06d76f6e9627d4a16bf55494325d to your computer and use it in GitHub Desktop.

Select an option

Save munishpalmakhija/c4db06d76f6e9627d4a16bf55494325d to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: openldap
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: openldap
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: openldap
spec:
containers:
- env:
- name: LDAP_ROOT
value: dc=tpksm,dc=local
- name: LDAP_ADMIN_USERNAME
value: admin
- name: LDAP_ADMIN_PASSWORD
value: password
- name: LDAP_CUSTOM_LDIF_DIR
value: /ldifs
- name: LDAP_ENABLE_TLS
value: "yes"
- name: LDAP_TLS_CERT_FILE
value: /opt/bitnami/openldap/certs/openldap-cert.pem
- name: LDAP_TLS_KEY_FILE
value: /opt/bitnami/openldap/certs/openldap-key.pem
- name: LDAP_TLS_CA_FILE
value: /opt/bitnami/openldap/certs/ca-cert.pem
image: bitnami/openldap
imagePullPolicy: IfNotPresent
name: openldap
ports:
- containerPort: 1389
protocol: TCP
- containerPort: 1636
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /ldifs/seed.ldif
name: ldifs-seed
subPath: seed.ldif
- mountPath: /opt/bitnami/openldap/certs
name: openldap-crt
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: seed.ldif
path: seed.ldif
name: app-config
name: ldifs-seed
- configMap:
defaultMode: 420
name: openldap-crt
name: openldap-crt
---
apiVersion: v1
kind: Service
metadata:
name: openldap
spec:
selector:
app: openldap
ports:
- protocol: TCP
port: 636
targetPort: 1636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment