Skip to content

Commit ab00c6c

Browse files
author
Jop Zitman
committed
Add priority field to Hook charts
Signed-off-by: Jop Zitman <jop.zitman@secura.com>
1 parent 71293e1 commit ab00c6c

21 files changed

Lines changed: 37 additions & 2 deletions

File tree

hooks/cascading-scans/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ zap-http zap-baseline-scan non-invasive medium
162162
|-----|------|---------|-------------|
163163
| hook.image.repository | string | `"docker.io/securecodebox/hook-cascading-scans"` | Hook image repository |
164164
| hook.image.tag | string | defaults to the charts version | The image Tag defaults to the charts version if not defined. |
165+
| hook.priority | int | `0` | Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks. |
165166
| hook.ttlSecondsAfterFinished | string | `nil` | Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
166167

167168
## License

hooks/cascading-scans/templates/cascading-scans-hook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
labels:
1010
{{- include "cascading-scans.labels" . | nindent 4 }}
1111
spec:
12+
priority: {{ .Values.hook.priority }}
1213
type: ReadOnly
1314
image: "{{ .Values.hook.image.repository }}:{{ .Values.hook.image.tag | default .Chart.Version }}"
1415
imagePullSecrets:

hooks/cascading-scans/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ hook:
1414
# @default -- defaults to the charts version
1515
tag: null
1616

17+
# -- Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks.
18+
priority: 0
19+
1720
# hook.ttlSecondsAfterFinished -- Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
1821
ttlSecondsAfterFinished: null

hooks/finding-post-processing/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ The `override` field specifies the desired fields and values that need to be upd
8989
|-----|------|---------|-------------|
9090
| hook.image.repository | string | `"docker.io/securecodebox/hook-finding-post-processing"` | Hook image repository |
9191
| hook.image.tag | string | defaults to the charts version | The image Tag defaults to the charts version if not defined. |
92+
| hook.priority | int | `0` | Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks. |
9293
| hook.ttlSecondsAfterFinished | string | `nil` | Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
9394
| rules | list | `[]` | |
9495

hooks/finding-post-processing/templates/finding-post-processing-hook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
labels:
1010
{{- include "finding-post-processing.labels" . | nindent 4 }}
1111
spec:
12+
priority: {{ .Values.hook.priority }}
1213
type: ReadAndWrite
1314
image: "{{ .Values.hook.image.repository }}:{{ .Values.hook.image.tag | default .Chart.Version }}"
1415
env:

hooks/finding-post-processing/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ hook:
3030
# @default -- defaults to the charts version
3131
tag: null
3232

33+
# -- Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks.
34+
priority: 0
35+
3336
# hook.ttlSecondsAfterFinished -- Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
3437
ttlSecondsAfterFinished: null

hooks/generic-webhook/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Kubernetes: `>=v1.11.0-0`
5757
|-----|------|---------|-------------|
5858
| hook.image.repository | string | `"docker.io/securecodebox/hook-generic-webhook"` | Hook image repository |
5959
| hook.image.tag | string | defaults to the charts version | The image Tag defaults to the charts version if not defined. |
60+
| hook.priority | int | `0` | Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks. |
6061
| hook.ttlSecondsAfterFinished | string | `nil` | Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
6162
| webhookUrl | string | `"http://example.com"` | The URL of your WebHook endpoint |
6263

hooks/generic-webhook/templates/webhook-hook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
labels:
1010
{{- include "generic-webhook.labels" . | nindent 4 }}
1111
spec:
12+
priority: {{ .Values.hook.priority }}
1213
type: ReadOnly
1314
image: "{{ .Values.hook.image.repository }}:{{ .Values.hook.image.tag | default .Chart.Version }}"
1415
ttlSecondsAfterFinished: {{ .Values.hook.ttlSecondsAfterFinished }}

hooks/generic-webhook/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ hook:
1717
# @default -- defaults to the charts version
1818
tag: null
1919

20+
# -- Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks.
21+
priority: 0
22+
2023
# hook.ttlSecondsAfterFinished -- Seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
2124
ttlSecondsAfterFinished: null

hooks/notification/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ To fill your template with data we provide the following objects.
308308
| hook.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images |
309309
| hook.image.repository | string | `"docker.io/securecodebox/hook-notification"` | Hook image repository |
310310
| hook.image.tag | string | defaults to the charts version | Image tag |
311+
| hook.priority | int | `0` | Hook priority. Higher priority Hooks are guaranteed to execute before low priority Hooks. |
311312
| hook.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the hook will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
312313
| notificationChannels[0].endPoint | string | `"SOME_ENV_KEY"` | |
313314
| notificationChannels[0].name | string | `"slack"` | |

0 commit comments

Comments
 (0)