Skip to content

Commit

Permalink
Add webhook jsonnet to kratos configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgxvii committed Sep 24, 2024
1 parent c667b20 commit 73efde5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion external/kratos/templates/configmap-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ metadata:
{{- end }}
data:
# Render the kratos config:
"kratos.yaml": |
kratos.yaml: |
{{- include "kratos.configmap" . | nindent 4 }}
# Render the webhook jsonnet:
webhook_body.jsonnet: |
function(ctx) {
identity: if std.objectHas(ctx, "identity") then ctx.identity else null,
payload: if std.objectHas(ctx, "flow") && std.objectHas(ctx.flow, "transient_payload") then ctx.flow.transient_payload else null,
cookies: ctx.request_cookies
}
# Render the identity schemas to disk:
{{- range $key, $value := .Values.kratos.identitySchemas }}
{{- printf "%s: %s" $key (toYaml (tpl $value $)) | nindent 2 }}
Expand Down

0 comments on commit 73efde5

Please sign in to comment.