Skip to content

Commit

Permalink
Close #248: extraVolumes not working if either authz or `bootstra…
Browse files Browse the repository at this point in the history
…pPolicies` are not enabled;

Signed-off-by: Romain Caire <[email protected]>
  • Loading branch information
supercairos authored and eshepelyuk committed Mar 12, 2024
1 parent 05429a1 commit 81cf46e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/opa-kube-mgmt/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ spec:
- key: {{ .Values.authz.mgmtToken.secretKey | default "mgmtToken" }}
path: mgmt-token
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | indent 8}}
{{- end }}
{{- end }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions test/unit/kube-mgmt_args.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@ tests:
- contains:
path: spec.template.spec.containers[1].args
content: "--namespaces=*"
- it: should add extraVolumes if authz is disabled & no bootstrapPolicies are provided
set:
useHttps: false
authz:
enabled: false
extraVolumes:
- name: example-app-auth-config
secret:
secretName: example-app-auth-config
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: example-app-auth-config
secret:
secretName: example-app-auth-config

0 comments on commit 81cf46e

Please sign in to comment.