Skip to content

Commit 6d34b3b

Browse files
committed
Merge branch 'joshuacox-FixingApiVersionInUsingSecrets' into release-1.5.0
2 parents cab1ed2 + 4f7ac87 commit 6d34b3b

File tree

5 files changed

+43
-4
lines changed

5 files changed

+43
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
ldap-secret.yaml
2+
ldap-deployment.yaml

example/kubernetes/using-secrets/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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

1010
environment/my-env.startup.yaml:
1111
cd environment ; cp my-env.startup.yaml.example my-env.startup.yaml
1212

1313
environment/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
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
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

515
Then 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`

example/kubernetes/using-secrets/ldap-deployment.yaml renamed to example/kubernetes/using-secrets/ldap-deployment.yaml.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: ldap
55
labels:
66
app: ldap
77
spec:
8+
selector:
9+
matchLabels:
10+
app: ldap
811
replicas: 1
912
template:
1013
metadata:
@@ -29,6 +32,8 @@ spec:
2932
ports:
3033
- containerPort: 389
3134
name: openldap
35+
- containerPort: 636
36+
name: openldapssl
3237
volumes:
3338
- name: ldap-data
3439
hostPath:

example/kubernetes/using-secrets/ldap-service.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ metadata:
55
app: ldap
66
name: ldap-service
77
spec:
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+

0 commit comments

Comments
 (0)