feat: add initial support for interacting with ClusterTriggerAuthentication objects

These will be provisioned to the keda namespace and referenced by Triggers if they exist (as a fallback to app-specific values).
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-03-06 03:39:11 -05:00
1 parent 94125ce787
commit c0f01c58d6
6 files changed
+186 -14

No files matched your search

@@ -0,0 +1,25 @@
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
---
apiVersion: v1
kind: Secret
metadata:
annotations:
app.kubernetes.io/version: {{ $.Values.global.deploment_id | quote }}
dokku.com/managed: "true"
{{- if and $.Values.global.annotations $.Values.global.annotations.keda_secret }}
{{- range $k, $v := $.Values.global.annotations.keda_secret }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
labels:
app.kubernetes.io/instance: {{ $.Values.type }}
app.kubernetes.io/name: {{ $.Values.type }}
app.kubernetes.io/part-of: cluster
name: ckta-{{ $.Values.type }}
namespace: keda
data:
{{- with $.Values.secrets }}
data:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
@@ -0,0 +1,26 @@
{{- if .Capabilities.APIVersions.Has "keda.sh/v1alpha1" -}}
---
apiVersion: keda.sh/v1alpha1
kind: ClusterTriggerAuthentication
metadata:
annotations:
app.kubernetes.io/version: {{ $.Values.global.deploment_id | quote }}
dokku.com/managed: "true"
{{- if and $.Values.global.annotations $.Values.global.annotations.keda_trigger_authentication }}
{{- range $k, $v := $.Values.global.annotations.keda_trigger_authentication }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
labels:
app.kubernetes.io/instance: {{ $.Values.type }}
app.kubernetes.io/name: {{ $.Values.type }}
app.kubernetes.io/part-of: cluster
name: {{ $.Values.type }}
spec:
secretTargetRef:
{{- range $k, $v := $.Values.secrets }}
- key: {{ $k }}
name: ckta-{{ $.Values.type }}
parameter: {{ $k }}
{{- end }}
{{- end }}