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
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ include "declarative-subsequent-scans.fullname" . }}
labels:
{{- include "declarative-subsequent-scans.labels" . | nindent 4 }}
spec:
type: ReadOnly
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
ttlSecondsAfterFinished: {{ .Values.hookJob.ttlSecondsAfterFinished }}
serviceAccountName: declarative-combined-scans
serviceAccountName: declarative-combined-scans
16 changes: 8 additions & 8 deletions hooks/finding-post-processing/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
{{/*
Expand the name of the chart.
*/}}
{{- define "add-attribute.name" -}}
{{- define "finding-post-processing.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -26,7 +26,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "add-attribute.fullname" -}}
{{- define "finding-post-processing.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -42,16 +42,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "add-attribute.chart" -}}
{{- define "finding-post-processing.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "add-attribute.labels" -}}
helm.sh/chart: {{ include "add-attribute.chart" . }}
{{ include "add-attribute.selectorLabels" . }}
{{- define "finding-post-processing.labels" -}}
helm.sh/chart: {{ include "finding-post-processing.chart" . }}
{{ include "finding-post-processing.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -61,7 +61,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "add-attribute.selectorLabels" -}}
app.kubernetes.io/name: {{ include "add-attribute.name" . }}
{{- define "finding-post-processing.selectorLabels" -}}
app.kubernetes.io/name: {{ include "finding-post-processing.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
name: {{ include "finding-post-processing.fullname" . }}
labels:
{{- include "finding-post-processing.labels" . | nindent 4 }}
spec:
type: ReadAndWrite
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
Expand Down
4 changes: 3 additions & 1 deletion hooks/generic-webhook/templates/webhook-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ include "generic-webhook.fullname" . }}
labels:
{{- include "generic-webhook.labels" . | nindent 4 }}
spec:
type: ReadOnly
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
ttlSecondsAfterFinished: {{ .Values.hookJob.ttlSecondsAfterFinished }}
env:
- name: WEBHOOK_URL
value: {{ .Values.webhookUrl | quote }}
value: {{ .Values.webhookUrl | quote }}
2 changes: 1 addition & 1 deletion hooks/persistence-defectdojo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "persistence-defectdojo.labels" -}}
helm.sh/chart: {{ include "defectdojo-elastic.chart" . }}
helm.sh/chart: {{ include "persistence-defectdojo.chart" . }}
{{ include "persistence-defectdojo.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
name: {{ include "persistence-defectdojo.fullname" . }}
labels:
{{- include "persistence-defectdojo.labels" . | nindent 4 }}
type: Unstructured
spec:
{{- if .Values.defectdojo.syncFindingsBack }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
name: {{ include "persistence-elastic.fullname" . }}
labels:
{{- include "persistence-elastic.labels" . | nindent 4 }}
type: Structured
spec:
type: ReadOnly
Expand Down
2 changes: 2 additions & 0 deletions hooks/teams-webhook/templates/teams-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ include "teams-webhook.fullname" . }}
labels:
{{- include "teams-webhook.labels" . | nindent 4 }}
spec:
type: ReadOnly
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
Expand Down
16 changes: 8 additions & 8 deletions hooks/update-field/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "add-attribute.name" -}}
{{- define "update-field.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "add-attribute.fullname" -}}
{{- define "update-field.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "add-attribute.chart" -}}
{{- define "update-field.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "add-attribute.labels" -}}
helm.sh/chart: {{ include "add-attribute.chart" . }}
{{ include "add-attribute.selectorLabels" . }}
{{- define "update-field.labels" -}}
helm.sh/chart: {{ include "update-field.chart" . }}
{{ include "update-field.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "add-attribute.selectorLabels" -}}
app.kubernetes.io/name: {{ include "add-attribute.name" . }}
{{- define "update-field.selectorLabels" -}}
app.kubernetes.io/name: {{ include "update-field.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
4 changes: 3 additions & 1 deletion hooks/update-field/templates/update-field-hook.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
name: {{ include "update-field.fullname" . }}
labels:
{{- include "update-field.labels" . | nindent 4 }}
spec:
type: ReadAndWrite
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
Expand Down