Skip to content

Commit a2ae029

Browse files
committed
Additional layer of authetication to allow adding other mechanisms in a future
Signed-off-by: Mateusz Majcher <m.majcher91@gmail.com>
1 parent fb35f3f commit a2ae029

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ spec:
2222
- name: WEBHOOK_USER
2323
valueFrom:
2424
secretKeyRef:
25-
name: {{ .Values.hook.authentication.userSecret }}
26-
key: {{ .Values.hook.authentication.usernameKey }}
25+
name: {{ .Values.hook.authentication.basic.userSecret }}
26+
key: {{ .Values.hook.authentication.basic.usernameKey }}
2727
optional: true
2828
- name: WEBHOOK_PASSWORD
2929
valueFrom:
3030
secretKeyRef:
31-
name: {{ .Values.hook.authentication.userSecret }}
32-
key: {{ .Values.hook.authentication.passwordKey }}
31+
name: {{ .Values.hook.authentication.basic.userSecret }}
32+
key: {{ .Values.hook.authentication.basic.passwordKey }}
3333
optional: true
3434
affinity:
3535
{{- toYaml .Values.hook.affinity | nindent 4 }}

‎hooks/generic-webhook/values.yaml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ hook:
3434

3535
# hook.authentication -- Optional basic authentication credentials
3636
authentication:
37-
# -- Link a pre-existing generic secret with `usernameKey` and `passwordKey` key / value pairs
38-
userSecret: generic-webhook-credentials
39-
# -- Name of the username key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs
40-
usernameKey: username
41-
# -- Name of the password key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs
42-
passwordKey: password
37+
basic:
38+
# -- Link a pre-existing generic secret with `usernameKey` and `passwordKey` key / value pairs
39+
userSecret: generic-webhook-credentials
40+
# -- Name of the username key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs
41+
usernameKey: username
42+
# -- Name of the password key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs
43+
passwordKey: password

0 commit comments

Comments
 (0)