---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: openldap-config-pvc-dev
spec:
storageClassName: cbs
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: openldap-data-pvc-dev
spec:
storageClassName: cbs
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: openldap-deploy-dev
labels:
app: openldap-dev
spec:
replicas: 1
template:
metadata:
labels:
app: openldap-dev
spec:
containers:
- name: openldap-dev
image: osixia/openldap:1.2.1
volumeMounts:
- name: ldap-data
mountPath: /var/lib/ldap
- name: ldap-config
mountPath: /etc/ldap/slapd.d
ports:
- containerPort: 389
name: openldap
env:
- name: LDAP_LOG_LEVEL
value: "256"
- name: LDAP_ORGANISATION
value: "test"
- name: LDAP_DOMAIN
value: "test.cn"
- name: LDAP_ADMIN_PASSWORD
value: "123456"
- name: LDAP_CONFIG_PASSWORD
value: "123456"
- name: LDAP_TLS
value: "false"
volumes:
-
name: ldap-data
persistentVolumeClaim:
claimName: openldap-data-pvc-dev
-
name: ldap-config
persistentVolumeClaim:
claimName: openldap-config-pvc-dev
---
apiVersion: v1
kind: Service
metadata:
labels:
app: openldap-dev
name: openldap-service-dev
spec:
type: NodePort
ports:
-
port: 389
nodePort: 30389
selector:
app: openldap-dev