Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/iag5/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.4
version: 1.0.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 2 additions & 2 deletions charts/iag5/templates/deployment-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
mountPath: /etc/ssl/gateway
readOnly: true
{{- end }}
{{- if $.Values.applicationSettings.etcdUseTLS }}
{{- if and (eq $.Values.applicationSettings.storeBackend "etcd") $.Values.applicationSettings.etcdUseTLS }}
- name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
Expand All @@ -163,7 +163,7 @@ spec:
secret:
secretName: {{ include "iag5.fullname" $ }}-tls-secret
{{- end }}
{{- if $.Values.applicationSettings.etcdUseTLS }}
{{- if and (eq $.Values.applicationSettings.storeBackend "etcd") $.Values.applicationSettings.etcdUseTLS }}
- name: etcd-client-certs
secret:
secretName: etcd-client-certs
Expand Down
4 changes: 2 additions & 2 deletions charts/iag5/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ spec:
mountPath: /etc/ssl/gateway
readOnly: true
{{- end }}
{{- if .Values.applicationSettings.etcdUseTLS }}
{{- if and (eq .Values.applicationSettings.storeBackend "etcd") .Values.applicationSettings.etcdUseTLS }}
- name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
Expand All @@ -169,7 +169,7 @@ spec:
secret:
secretName: {{ include "iag5.fullname" . }}-tls-secret
{{- end }}
{{- if .Values.applicationSettings.etcdUseTLS }}
{{- if and (eq .Values.applicationSettings.storeBackend "etcd") .Values.applicationSettings.etcdUseTLS }}
- name: etcd-client-certs
secret:
secretName: "etcd-client-certs"
Expand Down
66 changes: 64 additions & 2 deletions charts/iag5/tests/deployment-runner_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,12 @@ tests:
secret:
secretName: RELEASE-NAME-iag5-tls-secret

- it: should mount etcd TLS volumes when etcdUseTLS is true
- it: should mount etcd TLS volumes when storeBackend is etcd and etcdUseTLS is true
set:
runnerSettings.replicaCount: 1
applicationSettings.etcdUseTLS: true
applicationSettings:
storeBackend: "etcd"
etcdUseTLS: true
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
Expand All @@ -362,6 +364,66 @@ tests:
secret:
secretName: etcd-client-certs

- it: should not mount etcd TLS volumes when storeBackend is not etcd even if etcdUseTLS is true
set:
runnerSettings.replicaCount: 1
applicationSettings:
storeBackend: "memory"
etcdUseTLS: true
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: etcd-client-certs

- it: should not mount etcd TLS volumes when storeBackend is etcd but etcdUseTLS is false
set:
runnerSettings.replicaCount: 1
applicationSettings:
storeBackend: "etcd"
etcdUseTLS: false
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: etcd-client-certs

- it: should not mount etcd TLS volumes when both storeBackend is not etcd and etcdUseTLS is false
set:
runnerSettings.replicaCount: 1
applicationSettings:
storeBackend: "memory"
etcdUseTLS: false
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: etcd-client-certs

- it: should include custom volumes and volumeMounts
set:
runnerSettings.replicaCount: 1
Expand Down
66 changes: 64 additions & 2 deletions charts/iag5/tests/deployment-server_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,12 @@ tests:
secret:
secretName: RELEASE-NAME-iag5-tls-secret

- it: should mount etcd TLS volumes when etcdUseTLS is true
- it: should mount etcd TLS volumes when storeBackend is etcd and etcdUseTLS is true
set:
serverSettings.replicaCount: 1
applicationSettings.etcdUseTLS: true
applicationSettings:
storeBackend: "etcd"
etcdUseTLS: true
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
Expand All @@ -341,6 +343,66 @@ tests:
secret:
secretName: "etcd-client-certs"

- it: should not mount etcd TLS volumes when storeBackend is not etcd even if etcdUseTLS is true
set:
serverSettings.replicaCount: 1
applicationSettings:
storeBackend: "memory"
etcdUseTLS: true
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: "etcd-client-certs"

- it: should not mount etcd TLS volumes when storeBackend is etcd but etcdUseTLS is false
set:
serverSettings.replicaCount: 1
applicationSettings:
storeBackend: "etcd"
etcdUseTLS: false
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: "etcd-client-certs"

- it: should not mount etcd TLS volumes when both storeBackend is not etcd and etcdUseTLS is false
set:
serverSettings.replicaCount: 1
applicationSettings:
storeBackend: "memory"
etcdUseTLS: false
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etcd-client-certs
mountPath: /etc/ssl/etcd
readOnly: true
- notContains:
path: spec.template.spec.volumes
content:
name: etcd-client-certs
secret:
secretName: "etcd-client-certs"

- it: should include custom volumes and volumeMounts
set:
serverSettings.replicaCount: 1
Expand Down