From 1aa19812a445f79ec99a057ce919035f05262bbd Mon Sep 17 00:00:00 2001 From: vfebvre Date: Mon, 28 Aug 2023 15:56:32 +0200 Subject: [PATCH] kustom openldap resources --- kustomization.yaml | 8 ++++++++ resources/namespace.yaml | 4 ++++ resources/openldap.yaml | 43 ++++++++++++++++++++++++++++++++++++++++ resources/svc.yaml | 15 ++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 kustomization.yaml create mode 100644 resources/namespace.yaml create mode 100644 resources/openldap.yaml create mode 100644 resources/svc.yaml diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..c431be5 --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: openldap + +resources: +- ./resources/namespace.yaml +- ./resources/openldap.yaml +- ./resources/svc.yaml \ No newline at end of file diff --git a/resources/namespace.yaml b/resources/namespace.yaml new file mode 100644 index 0000000..2aa4176 --- /dev/null +++ b/resources/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: openldap \ No newline at end of file diff --git a/resources/openldap.yaml b/resources/openldap.yaml new file mode 100644 index 0000000..fd9453d --- /dev/null +++ b/resources/openldap.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openldap + labels: + app.kubernetes.io/name: openldap + namespace: openldap +spec: + selector: + matchLabels: + app.kubernetes.io/name: openldap + replicas: 1 + template: + metadata: + labels: + app.kubernetes.io/name: openldap + spec: + containers: + - name: openldap + # image: docker.io/bitnami/openldap:latest + image: reg.cadoles.com/proxy_cache/library/openldap:latest + imagePullPolicy: "Always" + env: + - name: LDAP_ADMIN_USERNAME + value: "admin" + - name: LDAP_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + key: adminpassword + name: openldap + - name: LDAP_USERS + valueFrom: + secretKeyRef: + key: users + name: openldap + - name: LDAP_PASSWORDS + valueFrom: + secretKeyRef: + key: passwords + name: openldap + ports: + - name: tcp-ldap + containerPort: 1389 \ No newline at end of file diff --git a/resources/svc.yaml b/resources/svc.yaml new file mode 100644 index 0000000..0cabc36 --- /dev/null +++ b/resources/svc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: openldap + labels: + app.kubernetes.io/name: openldap + namespace: openldap +spec: + type: ClusterIP + ports: + - name: tcp-ldap + port: 1389 + targetPort: tcp-ldap + selector: + app.kubernetes.io/name: openldap \ No newline at end of file