File tree Expand file tree Collapse file tree 5 files changed +43
-4
lines changed
example/kubernetes/using-secrets Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 11ldap-secret.yaml
2+ ldap-deployment.yaml
Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ ldap-secret.yaml: example
55 ENV_STARTUP_YAML=$(shell ${ENV_DIR}/file-to-base64.sh ${ENV_DIR}/my-env.startup.yaml) \
66 envsubst < ldap-secret.tpl > ldap-secret.yaml
77
8- example : environment/my-env.startup.yaml environment/my-env.yaml
8+ example : environment/my-env.startup.yaml environment/my-env.yaml ldap-deployment.yaml
99
1010environment/my-env.startup.yaml :
1111 cd environment ; cp my-env.startup.yaml.example my-env.startup.yaml
1212
1313environment/my-env.yaml :
1414 cd environment ; cp my-env.yaml.example my-env.yaml
15+
16+ ldap-deployment.yaml :
17+ cp ldap-deployment.yaml.example ldap-deployment.yaml
Original file line number Diff line number Diff line change 1+ # Helm-chart
2+
3+ After setting the variables you can get strange variables like:
4+
5+ https://github.com/osixia/docker-openldap/issues/342
6+
7+ I have found that using this helm chart does not have those issues:
8+
9+ https://github.com/jp-gouin/helm-openldap.git
10+
111# Generating ldap-secret.yaml
212
313` make example `
414
515Then edit the yaml files in the environment directory to have the desired paraneters, and then make the secret file:
616
717` make ldap-secret.yaml `
18+
19+ And deploy the secret you just made:
20+
21+ ` kubectl apply -f ldap-secret.yaml `
22+
23+ Apply the deployment yaml for ldap in k8s:
24+
25+ ` kubectl apply -f ldap-deployment.yaml `
26+
27+ Finally apply the service yaml for ldap in k8s:
28+
29+ ` kubectl apply -f ldap-service.yaml `
Original file line number Diff line number Diff line change 1- apiVersion : extensions/v1beta1
1+ apiVersion: apps/v1
22kind: Deployment
33metadata:
44 name: ldap
55 labels:
66 app: ldap
77spec:
8+ selector:
9+ matchLabels:
10+ app: ldap
811 replicas: 1
912 template:
1013 metadata:
2932 ports:
3033 - containerPort: 389
3134 name: openldap
35+ - containerPort: 636
36+ name: openldapssl
3237 volumes:
3338 - name: ldap-data
3439 hostPath:
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ metadata:
55 app : ldap
66 name : ldap-service
77spec :
8- ports :
9- - port : 389
108 selector :
119 app : ldap
10+ ports :
11+ - protocol : TCP
12+ name : ldap
13+ port : 389
14+ targetPort : 389
15+ - protocol : TCP
16+ name : ldapssl
17+ port : 636
18+ targetPort : 636
19+
You can’t perform that action at this time.
0 commit comments