Skip to content

fix(chart): make chart Argo CD friendly, add revisionHistoryLimit and AMQP user secret (#16, #17, #18) - #20

Closed
meisam-ui wants to merge 3 commits into
Euro-Office:mainfrom
meisam-ui:fix/argocd-issues-16-17-18
Closed

meisam-ui wants to merge 3 commits into
Euro-Office:mainfrom
meisam-ui:fix/argocd-issues-16-17-18

Conversation

@meisam-ui

Copy link
Copy Markdown
Contributor

Summary

Makes the chart work correctly under Argo CD / GitOps and adds two small, backward-compatible configuration options.

Closes #16, closes #17, closes #18

Commit Issue Change
f093e76 #17 Configurable revisionHistoryLimit for docservice, converter, adminpanel, example
4734f16 #18 AMQP username can be read from an existing Secret
ae282ef #16 Checksum annotations and deterministic rendering for Argo CD

Chart version: 6.0.0 → 6.1.0 (appVersion unchanged).

Problem

#16: Argo CD renders the chart with helm template on every refresh and compares the result with the live state. Two things made that impossible:

  • podAnnotations defaulted to rollme: "{{ randAlphaNum 5 | quote }}", so every render produced a different Pod template. The result was perpetual OutOfSync and, with auto-sync, rollouts that weren't caused by any change.
  • DS_VERSION_HASH (rendered when a *.build flag is on) was derived from the current time, so the documentserver ConfigMap changed every minute.

At the same time, a real config change did not restart the Pods: they consume the ConfigMap via envFrom, and the Pod template only references it by name.

#17: No workload set revisionHistoryLimit, so operators couldn't tune it without a patch layer.

#18: AMQP_PWD already came from a Secret, but AMQP_USER was plain text in the shared ConfigMap. That forced operators to duplicate it in values.

Changes

#16

  • Pod templates now carry checksum/* annotations, following Helm's Automatically Roll Deployments pattern:
    • checksum/config and checksum/welcome-page hash the rendered ConfigMaps.
    • checksum/credentials hashes the rendered password Secrets.
    • checksum/jwt, checksum/secure-link and checksum/info-auth hash the input values, not the rendered Secret, because ds.secrets.lookup falls back to a random value under helm template.
  • A key set in *.podAnnotations takes priority over the chart's checksum key, and no duplicate is rendered.
  • podAnnotations defaults are now {}.
  • DS_VERSION_HASH is computed from the image tag, the customFonts / customDictionaries / customPlugins settings and the new customResources.versionSalt.
  • New README section "13. Deploying with Argo CD / GitOps".

#17

  • New values docservice|converter|adminpanel|example.revisionHistoryLimit, default null (field omitted, so the Kubernetes default of 10 applies). 0 is allowed.

#18

  • New values connections.amqpUserExistingSecret (default "") and connections.amqpUserSecretKeyName (default rabbitmq-user).
  • When set, AMQP_USER is removed from the ConfigMap and injected via secretKeyRef into docservice, converter, adminpanel and the Helm test Pod.
  • Do not also set AMQP_USER via extraEnvVars when this option is used (duplicate env names; server-side apply in Argo CD can reject duplicate list keys).

⚠️ Behavior change

With the rollme default removed, Pods are no longer restarted on every helm upgrade. They restart only when the hashed ConfigMaps/Secrets or the image change.

Changes to things the chart doesn't render (*ExistingSecret, license, WOPI keys, extraConf, extraThemes, the custom resources PVC) no longer trigger a restart as a side effect. Use Stakater Reloader, versioned names, or customResources.versionSalt (see README section 13).

The previous behavior can be restored per workload:

docservice:
  podAnnotations:
    rollme: "{{ randAlphaNum 5 | quote }}"

#17 and #18 don't change anything by default.

Action required for Argo CD users

  1. Set jwt.existingSecret, proxy.secureLinkExistingSecret and proxy.infoAllowedExistingSecret. Without them, these chart-created Secrets get a random value on every render (no lookup under helm template). That causes drift and rotates the JWT secret, which breaks integrations. This is pre-existing behavior that the PR doesn't change; it is now documented.
  2. For external Secrets rotated outside Git, use Reloader.
  3. After changing custom fonts, plugins or dictionaries on the PVC, bump customResources.versionSalt in Git.

Validation

helm template / helm lint:

  • helm lint passes.
  • Default render, customFonts.build=true, and adminpanel+example enabled: the only differences from the 6.0.0 baseline are the removed rollme, the added checksum/* and the new DS_VERSION_HASH input.
  • Deterministic: two renders 61 seconds apart are identical, with defaults and with all *.build=true. The only exception is the documented random fallback when jwt/secure-link values are not set.
  • Sensitivity: connections.dbHost, jwt.secret, proxy.secureLinkSecret, proxy.infoAllowedPassword, DB/Redis passwords and versionSalt each change only the expected checksum on the expected workloads.
  • Make revisionHistoryLimit configurable for chart workloads #17: absent by default; 0 and 2 render only on the targeted workload.
  • Support sourcing the AMQP username from an existing secret instead of the ConfigMap #18: unchanged by default; with the option set, there is no plaintext AMQP_USER and there are 4 secretKeyRef consumers.

Argo CD (test cluster):

  • Initial sync, then a hard refresh: the app stays Synced and no new ReplicaSets appear.
  • An unrelated commit causes no rollout.
  • A connections.dbHost change in Git causes exactly one rollout of docservice and converter.
  • customResources.versionSalt bump: the custom-resources Job runs, there is one rollout and a new DS_VERSION_HASH.

Notes for reviewers

Follow-ups (separate PRs)

meisam-ui and others added 3 commits November 9, 2026 14:20
Add docservice/converter/adminpanel/example.revisionHistoryLimit
(default null = Kubernetes default). Rendered only when set; 0 is
supported via a nil check. Bump chart version to 6.1.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
Add connections.amqpUserExistingSecret and
connections.amqpUserSecretKeyName (default rabbitmq-user), mirroring
the existing password mechanism. When set, AMQP_USER is omitted from
the documentserver ConfigMap and injected via secretKeyRef into
docservice, converter, adminpanel and the helm test pod. Output is
unchanged when unset.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
…Argo CD (#16)

Add checksum/* annotations to the docservice, converter, adminpanel and
example pod templates (rendered ConfigMaps/credential Secrets by template
hash, ds.secrets.lookup Secrets by input value hash). A key set in
podAnnotations takes priority over the chart's checksum key.

Make DS_VERSION_HASH deterministic (image tag, customFonts,
customDictionaries, customPlugins, new customResources.versionSalt)
instead of time-based.

Change the podAnnotations defaults from the random rollme to {}
(behavior change, see CHANGELOG) and document the Argo CD / GitOps setup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
@meisam-ui meisam-ui closed this Nov 9, 2026
@meisam-ui
meisam-ui deleted the fix/argocd-issues-16-17-18 branch November 9, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant