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 1
1
ldap-secret.yaml
2
+ ldap-deployment.yaml
Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ ldap-secret.yaml: example
5
5
ENV_STARTUP_YAML=$(shell ${ENV_DIR}/file-to-base64.sh ${ENV_DIR}/my-env.startup.yaml) \
6
6
envsubst < ldap-secret.tpl > ldap-secret.yaml
7
7
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
9
9
10
10
environment/my-env.startup.yaml :
11
11
cd environment ; cp my-env.startup.yaml.example my-env.startup.yaml
12
12
13
13
environment/my-env.yaml :
14
14
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
+
1
11
# Generating ldap-secret.yaml
2
12
3
13
` make example `
4
14
5
15
Then edit the yaml files in the environment directory to have the desired paraneters, and then make the secret file:
6
16
7
17
` 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
2
2
kind: Deployment
3
3
metadata:
4
4
name: ldap
5
5
labels:
6
6
app: ldap
7
7
spec:
8
+ selector:
9
+ matchLabels:
10
+ app: ldap
8
11
replicas: 1
9
12
template:
10
13
metadata:
29
32
ports:
30
33
- containerPort: 389
31
34
name: openldap
35
+ - containerPort: 636
36
+ name: openldapssl
32
37
volumes:
33
38
- name: ldap-data
34
39
hostPath:
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ metadata:
5
5
app : ldap
6
6
name : ldap-service
7
7
spec :
8
- ports :
9
- - port : 389
10
8
selector :
11
9
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