kustom openldap resources

This commit is contained in:
vfebvre 2023-08-28 15:56:32 +02:00
parent d80e3e9a28
commit 1aa19812a4
4 changed files with 70 additions and 0 deletions

8
kustomization.yaml Normal file
View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openldap
resources:
- ./resources/namespace.yaml
- ./resources/openldap.yaml
- ./resources/svc.yaml

4
resources/namespace.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: openldap

43
resources/openldap.yaml Normal file
View File

@ -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

15
resources/svc.yaml Normal file
View File

@ -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