Compare commits
No commits in common. "develop" and "main" have entirely different histories.
21
README.md
21
README.md
|
@ -1,23 +1,2 @@
|
||||||
# openldap-kustom
|
# openldap-kustom
|
||||||
|
|
||||||
Kustomization de openldap pour test des applications
|
|
||||||
|
|
||||||
Image prise de docker.io/bitnami et disponible sur reg.cadoles.com/proxy_cache/bitnami/openldap
|
|
||||||
|
|
||||||
- kubectl apply -f kustomization.yaml :
|
|
||||||
|
|
||||||
- création du namespace
|
|
||||||
- création d'un service openldap
|
|
||||||
- création pod openldap avec user admin et mot de passe a déclarer (adminpassword) et possibilité de créer des users (users et passwords a déclarer)
|
|
||||||
|
|
||||||
- Déclaration des secrets:
|
|
||||||
|
|
||||||
- kubectl create secret generic openldap --from-literal=adminpassword=MyAdminPasswd --from-literal=users=user1, user2,... --from-literal=passwords=passwd1,passwd2,... -n openldap
|
|
||||||
|
|
||||||
- Récupération des secrets:
|
|
||||||
|
|
||||||
- kubectl get secret "SecretName" -n "Namespace" -o jsonpath='{.data.maVar}' | base64 --decode
|
|
||||||
|
|
||||||
- Information sur le déploiement :
|
|
||||||
|
|
||||||
- kubectl describe -n "Namespace" deployment "DeploymentName"
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
namespace: openldap
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- ./resources/namespace.yaml
|
|
||||||
- ./resources/openldap.yaml
|
|
||||||
- ./resources/svc.yaml
|
|
|
@ -1,4 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: openldap
|
|
|
@ -1,43 +0,0 @@
|
||||||
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
|
|
|
@ -1,15 +0,0 @@
|
||||||
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
|
|
Loading…
Reference in New Issue