diff --git a/Common/Server/Middleware/ClusterKeyAuthorization.ts b/Common/Server/Middleware/ClusterKeyAuthorization.ts index 9ffd7ad6a9..bd79a00464 100644 --- a/Common/Server/Middleware/ClusterKeyAuthorization.ts +++ b/Common/Server/Middleware/ClusterKeyAuthorization.ts @@ -38,6 +38,9 @@ export default class ClusterKeyAuthorization { } else if (req.headers && req.headers["clusterkey"]) { // Header keys are automatically transformed to lowercase clusterKey = req.headers["clusterkey"] as string; + } else if (req.headers && req.headers["x-clusterkey"]) { + // KEDA TriggerAuthentication sends headers with X- prefix + clusterKey = req.headers["x-clusterkey"] as string; } else if (req.body && req.body.clusterKey) { clusterKey = req.body.clusterKey; } else { diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index ba103704a0..b6285ded2b 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -750,14 +750,14 @@ metadata: appname: oneuptime spec: secretTargetRef: - {{- if .Values.oneuptimeSecret }} - - parameter: clusterkey - name: {{ printf "%s-%s" .Release.Name "secrets" }} - key: oneuptime-secret - {{- else if .Values.externalSecrets.oneuptimeSecret.existingSecret.name }} - - parameter: clusterkey + {{- if .Values.externalSecrets.oneuptimeSecret.existingSecret.name }} + - parameter: X-clusterkey name: {{ .Values.externalSecrets.oneuptimeSecret.existingSecret.name }} key: {{ .Values.externalSecrets.oneuptimeSecret.existingSecret.passwordKey }} + {{- else }} + - parameter: X-clusterkey + name: {{ printf "%s-%s" .Release.Name "secrets" }} + key: oneuptime-secret {{- end }} {{- end }} {{- end }}