Hey, quick question about the Kubernetes operator....
# infisical-help
j
Hey, quick question about the Kubernetes operator. I saw bug report #4398, and given the complexity of Infisical I just want to double-check — there aren’t any plans to deprecate Sprig functions in templates, right? Thanks!
✅ 1
d
Hi @Juraj Homola, thank you for reaching out. I've rootcaused the issue and we're rolling out a patch for this as we speak, thank you!
Hi @Juraj Homola, this has been resolved in the latest operator release. Please update to
v0.10.8
for the changes to reflect!
j
Hi @Daniel Hougaard, I tried to test this, but ran into a blocker. Backtesting shows that starting from v0.10.6 there seems to be an issue with
tls.caRef
when using self-hosted + custom CA. Error we’re seeing:
Copy code
2025-09-27T05:36:26Z	ERROR	unable to reconcile InfisicalSecret. Will requeue after [requeueTime=1m0s]	{"infisicalsecret": {"name":"dg-git-repo-infisical-secrets","namespace":"infisical-operator"}, "error": "failed to fetch secrets from API for managed secrets [err=unable to extract project id from slug [err=unable to get project by slug. [err=CallGetProject: Unable to complete api request [err=Get \"https://....../api/v2/workspace/dg-zi-da\": tls: failed to verify certificate: x509: certificate signed by unknown authority]]]]"}
<http://github.com/Infisical/infisical/k8-operator/internal/controller.(*InfisicalSecretReconciler).Reconcile|github.com/Infisical/infisical/k8-operator/internal/controller.(*InfisicalSecretReconciler).Reconcile>
	/workspace/internal/controller/infisicalsecret_controller.go:185
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile>
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:119
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler>
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:340
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem>
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:300
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.1|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.1>
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:202
Our current config looks like this:
Copy code
apiVersion: <http://secrets.infisical.com/v1alpha1|secrets.infisical.com/v1alpha1>
kind: InfisicalSecret
metadata:
  name: dg-git-repo-infisical-secrets
  namespace: infisical-operator
  labels:
    <http://app.kubernetes.io/part|app.kubernetes.io/part>: infisical-secrets
spec:
  hostAPI: https://.../api
  tls:
    caRef:
      secretName: tls-ca
      secretNamespace: dg
      key: "ca.crt"
  ....
Not sure if this is a regression/bug, or if I just missed a change in how it should be configured. Thank you in advance!
New finding here, it started to work when switched from projectSlug to projectId only, based on 0.10.6 commits and following log line: INFO ReconcileInfisicalSecret: Extracted project id from slug [projectId=] [projectSlug=dg-zi-da] {"infisicalsecret": {"name":"dg-git-repo-infisical-secrets","namespace":"infisical-operator"}} And then yes, sprig functions work.
d
Hi @Juraj Homola, I'm taking a look at this on my end, I'll keep you updated!
Hi @Juraj Homola, I've root-caused the issue and we're rolling out a patch. Apologies for the inconvenience caused by this!
j
Thank you, I’ll try practicing Go so that I can hopefully help more at some point.
d
Hi @Juraj Homola, I've rolled out a patch for this in version
v0.10.9
of the operator. Please update your operator for the changes to reflect!
j
Works now with custom ca and slugs only, thank you.