-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Describe the bug
Since Secrets Operator 0.10.0 InfisicalSecret resources that use Sprig templating functions like dict
fail. They have worked previously in versions up to 0.9.5.
To Reproduce
Steps to reproduce the behavior:
- Install Secrets Operator 0.10.0.
- Apply an InfisicalSecret like this:
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
metadata:
name: example-templating
spec:
authentication:
universalAuth:
secretsScope:
projectSlug: TODO
envSlug: dev
secretsPath: /TODO
credentialsRef:
secretName: infisical-universal-auth-credentials
secretNamespace: infisical-operator-system
resyncInterval: 300
managedKubeSecretReferences:
- secretName: example-templating
secretNamespace: default
secretType: kubernetes.io/dockerconfigjson
template:
data:
.dockerconfigjson: |-
{{- $hostname := "https://registry.gitlab.com" -}}
{{- $config := dict "auth" (list "username" ":" .GITLAB_REPO_TOKEN.Value | join "" | b64enc) -}}
{{- dict "auths" (dict $hostname $config) | mustToJson -}}
- The status conditions show an error like this:
Failed to sync secrets. This can be caused by invalid access token or an invalid API host that is set.
Error: failed to create managed secret [err=unable to compile template: .dockerconfigjson
[err=template: secret-templates:3: function "dict" not defined]]
Expected behavior
The InfisicalSecret is templated correctly and the Secret is created.
Platform you are having the issue on:
Self-hosted k3s, Infisical EU
jhomola79
Metadata
Metadata
Assignees
Labels
No labels