Skip to content

Commit

Permalink
Merge pull request #1241 from Nordix/lentzi90/secret-htpasswd
Browse files Browse the repository at this point in the history
⚠️ Store htpasswd files in Secrets instead of ConfigMaps
  • Loading branch information
metal3-io-bot committed Apr 14, 2023
2 parents 48cd06e + a58a905 commit ae34635
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ironic-deployment/components/basic-auth/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
readOnly: true
envFrom:
# This is the htpassword matching the ironic-auth-config that inspector has
- configMapRef:
- secretRef:
name: ironic-htpasswd
- configMapRef:
name: ironic-bmo-configmap
Expand All @@ -26,7 +26,7 @@ spec:
readOnly: true
envFrom:
# This is the htpassword matching the ironic-inspector-auth-config that ironic has
- configMapRef:
- secretRef:
name: ironic-inspector-htpasswd
- configMapRef:
name: ironic-bmo-configmap
Expand Down
4 changes: 1 addition & 3 deletions ironic-deployment/components/basic-auth/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

configMapGenerator:
secretGenerator:
- behavior: create
envs:
- ironic-htpasswd
Expand All @@ -10,8 +10,6 @@ configMapGenerator:
envs:
- ironic-inspector-htpasswd
name: ironic-inspector-htpasswd

secretGenerator:
- name: ironic-auth-config
files:
- auth-config=ironic-auth-config
Expand Down
4 changes: 2 additions & 2 deletions ironic-deployment/overlays/basic-auth_tls/basic-auth_tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ spec:
containers:
- name: ironic-httpd
envFrom:
- configMapRef:
- secretRef:
name: ironic-htpasswd
- configMapRef:
- secretRef:
name: ironic-inspector-htpasswd
- configMapRef:
name: ironic-bmo-configmap
Expand Down

0 comments on commit ae34635

Please sign in to comment.