Skip to content

Commit

Permalink
Fixing robustName helper
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlocph committed Aug 5, 2021
1 parent 167ce8c commit c56e2aa
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/common/templates/_sealedFileSecret.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "common.sealedFileSecret.tpl" -}}
{{- range .Values.sealedFileSecrets }}
{{- $robustName := include "robustName" $.Release.Name }}
{{- $robustName := include "common.robustName" $.Release.Name }}
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
Expand Down
4 changes: 2 additions & 2 deletions charts/common/templates/_sealedSecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: {{ template "robustName" .Release.Name }}
name: {{ template "common.robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "helm-chart.labels" . | nindent 4 }}
Expand All @@ -16,7 +16,7 @@ spec:
{{- end }}
template:
metadata:
name: {{ template "robustName" .Release.Name }}
name: {{ template "common.robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/cron-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.2.1
version: 0.2.2

dependencies:
- name: common
Expand Down
Binary file modified charts/cron-job/charts/common-0.1.0.tgz
Binary file not shown.
28 changes: 28 additions & 0 deletions charts/cron-job/tests/cronjob_sealed_file_secrets_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
suite: test deployment
templates:
- cronJob.yaml
tests:
- it: Should mount volume
set: &values
sealedFileSecrets:
- name: google-account-key
path: /google-account-key
filesToMount:
- name: key.json
sourcePath: my-google-acoount-key.json
asserts:
- equal:
path: spec.jobTemplate.spec.template.spec.containers[0].volumeMounts
value:
- name: google-account-key
mountPath: /google-account-key
readOnly: true
- it: Should reference volume
set: *values
asserts:
- equal:
path: spec.jobTemplate.spec.template.spec.volumes
value:
- name: google-account-key
secret:
secretName: RELEASE-NAME-google-account-key
2 changes: 1 addition & 1 deletion charts/onechart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.28.0
version: 0.27.0-rc3

dependencies:
- name: common
Expand Down
Binary file modified charts/onechart/charts/common-0.1.0.tgz
Binary file not shown.

0 comments on commit c56e2aa

Please sign in to comment.