Skip to content

Commit

Permalink
Merge pull request #113 from gimlet-io/no-yaml-anchors
Browse files Browse the repository at this point in the history
Dropping yaml anchors - we have helm tpls for the same purpose
  • Loading branch information
laszlocph authored Dec 18, 2023
2 parents b74cf1a + 1de6297 commit d27b401
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ package:

debug:
helm dependency update charts/onechart
helm template my+release charts/onechart/ -f values.yaml --debug
helm template my-release charts/onechart/ -f values.yaml --debug

debug-cron-job:
helm dependency update charts/cron-job
Expand Down
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: library
# 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.4.0
version: 0.4.1
2 changes: 1 addition & 1 deletion charts/common/templates/_envFromRef.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "common.envFromRef.tpl" -}}
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets -}}
envFrom: &envFrom
envFrom:
{{- if .Values.vars }}
- configMapRef:
name: {{ template "common.robustName" .Release.Name }}
Expand Down
2 changes: 1 addition & 1 deletion charts/common/templates/_volumeMountsRef.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "common.volumeMountsRef.tpl" -}}
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets -}}
volumeMounts: &volumeMounts
volumeMounts:
{{- range .Values.volumes }}
{{- if not (hasPrefix "init-" .name) }}
- name: {{ .name }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cron-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ version: 0.63.0

dependencies:
- name: common
version: 0.4.0
version: 0.4.1
repository: file://../common
Binary file modified charts/cron-job/charts/common-0.4.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/onechart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ version: 0.63.0

dependencies:
- name: common
version: 0.4.0
version: 0.4.1
repository: file://../common
Binary file modified charts/onechart/charts/common-0.4.0.tgz
Binary file not shown.
13 changes: 5 additions & 8 deletions charts/onechart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
{{- end }}
containers:
- name: {{ template "robustName" .Release.Name }}
securityContext: &securityContext
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -133,20 +133,17 @@ spec:
{{- end }}
{{- if .Values.sidecar }}
- name: {{ template "robustName" .Release.Name }}-sidecar
securityContext: *securityContext
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ .Values.sidecar.repository }}:{{ .Values.sidecar.tag }}
{{- if .Values.sidecar.command }}
command:
- {{ .Values.sidecar.shell }}
- -c
- {{ .Values.sidecar.command | quote }}
{{- end }}
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets }}
envFrom: *envFrom
{{- end }}
{{- if or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets }}
volumeMounts: *volumeMounts
{{- end }}
{{- include "common.envFromRef.tpl" . | nindent 10 }}
{{- include "common.volumeMountsRef.tpl" . | nindent 10 }}
{{- end }}
{{- include "common.volumesRef.tpl" . | nindent 6 }}
{{- with .Values.nodeSelector }}
Expand Down

0 comments on commit d27b401

Please sign in to comment.