Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix(helm): keep rollout annotation when rolloutOnEveryRender is unset and add render checks
Devin AI79079393dac1
diff --git a/.github/workflows/run-helm-chart-tests-infisical-standalone-postgres.yml b/.github/workflows/run-helm-chart-tests-infisical-standalone-postgres.ymlindex bc1cd02978..e1da52defb 100644--- a/.github/workflows/run-helm-chart-tests-infisical-standalone-postgres.yml+++ b/.github/workflows/run-helm-chart-tests-infisical-standalone-postgres.yml@@ -39,6 +39,27 @@ jobs:- name: Run chart-testing (lint)run: ct lint --config ct.yaml --charts helm-charts/infisical-standalone-postgres+ - name: Check rolloutOnEveryRender rendering+ working-directory: helm-charts/infisical-standalone-postgres+ run: |+ set -euo pipefail+ ls charts/*.tgz >/dev/null 2>&1 || helm dependency build .+ render() { helm template infisical . -s templates/infisical.yaml "$@"; }++ [ "$(render | grep -c 'updatedAt:')" -eq 2 ]+ [ "$(render --set infisical.rolloutOnEveryRender=null | grep -c 'updatedAt:')" -eq 2 ]++ render --set infisical.rolloutOnEveryRender=false > "$RUNNER_TEMP/first.yaml"+ sleep 2+ render --set infisical.rolloutOnEveryRender=false > "$RUNNER_TEMP/second.yaml"+ diff "$RUNNER_TEMP/first.yaml" "$RUNNER_TEMP/second.yaml"+ [ "$(grep -cE 'updatedAt:|annotations:' "$RUNNER_TEMP/first.yaml" || true)" -eq 0 ]++ custom=$(render --set infisical.rolloutOnEveryRender=false --set infisical.podAnnotations.pod=a --set infisical.deploymentAnnotations.deploy=b)+ [ "$(grep -c 'updatedAt:' <<<"$custom" || true)" -eq 0 ]+ grep -q 'pod: a' <<<"$custom"+ grep -q 'deploy: b' <<<"$custom"+- name: Create kind clusteruses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0diff --git a/helm-charts/infisical-standalone-postgres/CHANGELOG.md b/helm-charts/infisical-standalone-postgres/CHANGELOG.mdindex 92b74fbdda..d9e3d5244f 100644--- a/helm-charts/infisical-standalone-postgres/CHANGELOG.md+++ b/helm-charts/infisical-standalone-postgres/CHANGELOG.md@@ -2,7 +2,7 @@Changes:* Added `infisical.rolloutOnEveryRender` (default `true`) to control the `updatedAt` annotation on the Infisical Deployment and pod template. The annotation is set to the render time, so every `helm upgrade`, and every Argo CD or Flux sync, rolls all pods even when nothing changed, and GitOps tools show the release as permanently out of sync. Set it to `false` to keep the pod spec stable between renders. After changing the `infisical.kubeSecretRef` secret, restart the pods with `kubectl rollout restart`.* Fixed the `updatedAt` date format, which printed the month in place of the day of the month.-* Backwards compatible. The default keeps the current behavior. Setting the flag to `false` triggers a one-time pod rollout.+* Backwards compatible. The default keeps the current behavior, including for releases upgraded with `--reuse-values`, where the new key is unset. Only an explicit `false` turns the annotation off, and doing so triggers a one-time pod rollout.## 1.11.1 (Unreleased)Changes:diff --git a/helm-charts/infisical-standalone-postgres/templates/infisical.yaml b/helm-charts/infisical-standalone-postgres/templates/infisical.yamlindex 3bed10dff8..82bce4fed4 100644--- a/helm-charts/infisical-standalone-postgres/templates/infisical.yaml+++ b/helm-charts/infisical-standalone-postgres/templates/infisical.yaml@@ -1,11 +1,12 @@{{- $infisicalValues := .Values.infisical }}+{{- $rolloutOnEveryRender := ne (toString $infisicalValues.rolloutOnEveryRender) "false" }}apiVersion: apps/v1kind: Deploymentmetadata:name: {{ include "infisical.fullname" . }}- {{- if or $infisicalValues.rolloutOnEveryRender $infisicalValues.deploymentAnnotations }}+ {{- if or $rolloutOnEveryRender $infisicalValues.deploymentAnnotations }}annotations:- {{- if $infisicalValues.rolloutOnEveryRender }}+ {{- if $rolloutOnEveryRender }}updatedAt: {{ now | date "2006-01-02 MST 15:04:05" | quote }}{{- end }}{{- with $infisicalValues.deploymentAnnotations }}@@ -23,9 +24,9 @@ spec:metadata:labels:{{- include "infisical.matchLabels" . | nindent 8 }}- {{- if or $infisicalValues.rolloutOnEveryRender $infisicalValues.podAnnotations }}+ {{- if or $rolloutOnEveryRender $infisicalValues.podAnnotations }}annotations:- {{- if $infisicalValues.rolloutOnEveryRender }}+ {{- if $rolloutOnEveryRender }}updatedAt: {{ now | date "2006-01-02 MST 15:04:05" | quote }}{{- end }}{{- with $infisicalValues.podAnnotations }}