Skip to content

fix(mctl-telegram): force client-side apply for oauth ExternalSecret - #226

Merged
mashkovd merged 1 commit into
mainfrom
fix/externalsecret-ssa-disable
May 17, 2026
Merged

mashkovd merged 1 commit into
mainfrom
fix/externalsecret-ssa-disable

Conversation

@mashkovd

Copy link
Copy Markdown
Member

Why

PR #224 repointed labs-mctl-telegram-oauth at a dedicated Vault path, but
ArgoCD v3.3.8 cannot apply the updated ExternalSecret — it fails with
metadata.managedFields must be nil (ServerSideApply + serverSideDiff bug).
The new OAUTH_JWT_SIGNING_KEY therefore never reaches the cluster and the
mctl-telegram dedicated-key rollout is stuck at the last step.

What

  • base-service chart: add an optional per-ExternalSecret annotations map
    to externalsecret-extra.yaml. Purely additive — ExternalSecrets that don't
    set it render byte-identically (verified with helm template).
  • labs/mctl-telegram values: set
    argocd.argoproj.io/sync-options: ServerSideApply=false on
    labs-mctl-telegram-oauth so ArgoCD applies it client-side, bypassing the
    broken SSA path.

No manual deletion of secret resources — GitOps stays the source of truth.

Follow-up

The underlying ArgoCD bug is tracked in #225 (also affects admins-mctl-agent).
Remove this per-resource workaround once ArgoCD is fixed/upgraded.

ArgoCD v3.3.8 with ServerSideApply + serverSideDiff fails to apply
ExternalSecrets, rejecting the request with "metadata.managedFields
must be nil". This left labs-mctl-telegram-oauth stuck OutOfSync after
PR #224 repointed it at the dedicated Vault path, so the new
OAUTH_JWT_SIGNING_KEY never reaches the cluster.

Add an optional per-ExternalSecret `annotations` map to the base-service
chart and use it to set `argocd.argoproj.io/sync-options:
ServerSideApply=false` on labs-mctl-telegram-oauth. Client-side apply
bypasses the broken SSA path. The chart change is additive — other
ExternalSecrets render unchanged.

The underlying ArgoCD bug is tracked separately.
@mashkovd

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented May 17, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 1m 3s —— View job


Review complete

  • Gather context
  • Read changed files
  • Analyze diff
  • Post findings

P1: 0 | P2: 0 | P3: 0 — No findings, good to merge.

The Helm template addition in externalsecret-extra.yaml follows the same {{- with }} / {{- range $k, $v := . }} pattern already used for targetTemplateMetadataAnnotations in the same file. Purely additive — the {{- with }} guard means ExternalSecrets without annotations set render byte-identically.

The values entry uses the correct ArgoCD sync option (argocd.argoproj.io/sync-options: ServerSideApply=false), and the inline comment clearly states the reason and that it is a temporary workaround pending an ArgoCD upgrade. No secrets, no RBAC changes, no operational risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant