Protects SPIRE Agent's Chart Against YAML Template Injection (#450)

* protects agent's chart against template injection

Signed-off-by: Nico Weisenauer <[email protected]>

* removes unnecessary braces and whitespace

Signed-off-by: Nico Weisenauer <[email protected]>

* Removes int type validation via cast

Signed-off-by: Nico Weisenauer <[email protected]>

---------

Signed-off-by: Nico Weisenauer <[email protected]>
This commit is contained in:
nweisenauer
2024-09-16 06:23:01 -07:00
committed by GitHub
parent ea710023f4
commit 8832da39b4
8 changed files with 61 additions and 53 deletions
@@ -75,20 +75,20 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "spire-agent.labels" -}}
helm.sh/chart: {{ include "spire-agent.chart" . }}
helm.sh/chart: {{ include "spire-agent.chart" . | quote }}
{{ include "spire-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "spire-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "spire-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "spire-agent.name" . | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- end }}
{{/*