Skip to content

fix(eso): remove targetNamespaces from OperatorGroup spec#91

Merged
cjeanner merged 1 commit into
mainfrom
fix/remove-eso-operatorgroup-targetns
Jul 23, 2026
Merged

fix(eso): remove targetNamespaces from OperatorGroup spec#91
cjeanner merged 1 commit into
mainfrom
fix/remove-eso-operatorgroup-targetns

Conversation

@cjeanner

Copy link
Copy Markdown
Collaborator

Remove the explicit targetNamespaces: [] from the
openshift-external-secrets-operator OperatorGroup and leave the spec
empty (spec: {}).

An OperatorGroup with targetNamespaces: [] and one with an empty
spec both configure AllNamespaces install mode — they are semantically
identical. However, OLM normalizes the OperatorGroup on every
reconciliation cycle: it strips targetNamespaces: [] from the spec
entirely and replaces it with {"upgradeStrategy": "Default"}.

This creates permanent drift in the operator-dependencies ArgoCD
application:

  • ArgoCD applies the manifest with targetNamespaces: []
  • OLM reconciles and removes the field
  • ArgoCD detects the diff (> targetNamespaces: [] present in
    desired but absent in live) and marks the resource OutOfSync
  • Auto-sync re-applies, OLM re-normalizes, and the cycle repeats

By omitting the field from the source manifest, the desired state
matches what OLM produces after normalization, eliminating the
persistent OutOfSync condition.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

@cjeanner
cjeanner requested a review from pinikomarov July 22, 2026 06:14
@cjeanner cjeanner self-assigned this Jul 22, 2026
Remove the explicit `targetNamespaces: []` from the
openshift-external-secrets-operator OperatorGroup and leave the spec
empty (`spec: {}`).

An OperatorGroup with `targetNamespaces: []` and one with an empty
spec both configure AllNamespaces install mode — they are semantically
identical. However, OLM normalizes the OperatorGroup on every
reconciliation cycle: it strips `targetNamespaces: []` from the spec
entirely and replaces it with `{"upgradeStrategy": "Default"}`.

This creates permanent drift in the operator-dependencies ArgoCD
application:

  - ArgoCD applies the manifest with `targetNamespaces: []`
  - OLM reconciles and removes the field
  - ArgoCD detects the diff (`> targetNamespaces: []` present in
    desired but absent in live) and marks the resource OutOfSync
  - Auto-sync re-applies, OLM re-normalizes, and the cycle repeats

By omitting the field from the source manifest, the desired state
matches what OLM produces after normalization, eliminating the
persistent OutOfSync condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cjeanner
cjeanner force-pushed the fix/remove-eso-operatorgroup-targetns branch from 519a65f to 3a33327 Compare July 22, 2026 11:03
@cjeanner
cjeanner marked this pull request as ready for review July 22, 2026 13:22
@cjeanner
cjeanner enabled auto-merge (squash) July 22, 2026 13:32

@pinikomarov pinikomarov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic is reasonable , lgtm

@cjeanner
cjeanner merged commit 6638d8b into main Jul 23, 2026
3 checks passed
@cjeanner
cjeanner deleted the fix/remove-eso-operatorgroup-targetns branch July 23, 2026 08:08
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.

2 participants