Skip to content

eso: split cluster configs into separate overlays in staging - #13537

Open
sadlerap wants to merge 1 commit into
redhat-appstudio:mainfrom
sadlerap:eso-overlay-restructure
Open

eso: split cluster configs into separate overlays in staging#13537
sadlerap wants to merge 1 commit into
redhat-appstudio:mainfrom
sadlerap:eso-overlay-restructure

Conversation

@sadlerap

@sadlerap sadlerap commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Split each staging cluster's configuration into a separate overlay, which allows us to modify individual configurations for each cluster. While we're at it, move the IBM-specific ESO changes out that were requested in #13424.

Fixes: KFLUXINFRA-4424

Split each staging cluster's configuration into a separate overlay,
which allows us to modify individual configurations for each cluster.
While we're at it, move the IBM-specific ESO changes out that were
requested in redhat-appstudio#13424.

Fixes: KFLUXINFRA-4424
Signed-off-by: Andy Sadler <ansadler@redhat.com>
@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadlerap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

Kustomize Render Diff

Comparing 8a87242b91a611c495

No render differences detected.

@sadlerap

Copy link
Copy Markdown
Contributor Author

Not entirely certain this is the right way to go about this, since we're going to need to reconsider how this works once ring deployments comes for ESO. Would like some feedback here.

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 14, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:42 PM UTC · Completed 8:58 PM UTC

Commit: 8a87242 · View workflow run →

@qodo-for-redhat-appstudio

Copy link
Copy Markdown

PR Summary by Qodo

Split ESO staging config into per-cluster overlays and isolate IBM CIDR exceptions

⚙️ Configuration changes ✨ Enhancement 🕐 40+ Minutes

Grey Divider

AI Description

• Split External Secrets Operator staging config into per-cluster Kustomize overlays.
• Update Argo CD ApplicationSet to deploy cluster-specific overlay paths.
• Move IBM ROKS CIDR ingress allowances out of the shared base and into lightwell-dev only.
Diagram

graph TD
  A["Argo CD ApplicationSet"] --> B["Staging overlays"] --> C["Cluster overlay"] --> D["Base (staging)"] --> E["Helm chart render"]
  C --> F["NetPolicies"]
  G["lightwell-dev patch"] --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep single staging base with conditional CIDRs via templating
  • ➕ Avoids creating/maintaining multiple overlay directories
  • ➕ Centralizes NetworkPolicy rules in one place
  • ➖ Requires Helm templating or Kustomize substitutions for cluster-specific branching
  • ➖ Harder to reason about effective manifests per cluster; easier to accidentally apply IBM exceptions broadly
2. Drive overlays from cluster labels/annotations in the clusters generator
  • ➕ Reduces need to maintain a hard-coded cluster list in the ApplicationSet
  • ➕ Scales better as clusters are added/removed
  • ➖ Requires reliable label taxonomy and governance across clusters
  • ➖ Still needs per-cluster or per-label overlays; adds indirection for reviewers
3. One overlay per cluster but derive clusterDir from nameNormalized (no explicit list)
  • ➕ Less duplication in ApplicationSet config
  • ➕ Keeps per-cluster customization capability
  • ➖ Depends on strict naming/path conventions
  • ➖ Harder to exclude clusters that should not receive the app without additional selection logic

Recommendation: The current approach (explicit per-cluster overlays plus moving IBM-only CIDR allowances into lightwell-dev) is the safest and most reviewable: it makes cluster drift intentional and prevents IBM-specific network allowances from leaking into non-IBM clusters. If the number of staging clusters grows, consider selecting overlays via cluster labels to avoid maintaining an explicit list.

Files changed (61) +37 / -5

Documentation (1) +0 / -0
README.mdStaging base Helm chart documentation (part of overlay split) +0/-0

Staging base Helm chart documentation (part of overlay split)

• Documentation for the shared staging base Helm chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/README.md

Other (60) +37 / -5
external-secrets-operator.yamlApplicationSet now targets per-cluster staging overlay directories +7/-1

ApplicationSet now targets per-cluster staging overlay directories

• Replaces the empty list generator with explicit staging cluster entries and sets clusterDir per cluster. This makes Argo CD deploy ESO from components/external-secrets-operator/staging/<clusterDir> instead of a single shared path.

argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml

Chart.yamlStaging base Helm chart metadata (part of overlay split) +0/-0

Staging base Helm chart metadata (part of overlay split)

• Helm chart metadata for the shared staging base. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/Chart.yaml

grafana-dashboard.jsonGrafana dashboard artifact carried in staging base chart +0/-0

Grafana dashboard artifact carried in staging base chart

• Dashboard JSON shipped with the staging base Helm chart for ESO monitoring. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/files/monitoring/grafana-dashboard.json

NOTES.txtHelm NOTES template included in staging base +0/-0

Helm NOTES template included in staging base

• Helm chart NOTES template for ESO staging base. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/NOTES.txt

_helpers.tplHelm helpers template included in staging base +0/-0

Helm helpers template included in staging base

• Helm helpers used by ESO staging base templates. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/_helpers.tpl

cert-controller-deployment.yamlCert-controller deployment template included in staging base +0/-0

Cert-controller deployment template included in staging base

• Helm template for the cert-controller deployment. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/cert-controller-deployment.yaml

cert-controller-poddisruptionbudget.yamlCert-controller PDB template included in staging base +0/-0

Cert-controller PDB template included in staging base

• Helm template for cert-controller PDB. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/cert-controller-poddisruptionbudget.yaml

cert-controller-rbac.yamlCert-controller RBAC template included in staging base +0/-0

Cert-controller RBAC template included in staging base

• Helm template for cert-controller RBAC. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/cert-controller-rbac.yaml

cert-controller-service.yamlCert-controller Service template included in staging base +0/-0

Cert-controller Service template included in staging base

• Helm template for cert-controller Service. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/cert-controller-service.yaml

cert-controller-serviceaccount.yamlCert-controller ServiceAccount template included in staging base +0/-0

Cert-controller ServiceAccount template included in staging base

• Helm template for cert-controller ServiceAccount. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/cert-controller-serviceaccount.yaml

acraccesstoken.yamlCRD template included in staging base (ACR access token) +0/-0

CRD template included in staging base (ACR access token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/acraccesstoken.yaml

cloudsmithaccesstoken.yamlCRD template included in staging base (Cloudsmith access token) +0/-0

CRD template included in staging base (Cloudsmith access token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/cloudsmithaccesstoken.yaml

clusterexternalsecret.yamlCRD template included in staging base (ClusterExternalSecret) +0/-0

CRD template included in staging base (ClusterExternalSecret)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/clusterexternalsecret.yaml

clustergenerator.yamlCRD template included in staging base (ClusterGenerator) +0/-0

CRD template included in staging base (ClusterGenerator)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/clustergenerator.yaml

clusterpushsecret.yamlCRD template included in staging base (ClusterPushSecret) +0/-0

CRD template included in staging base (ClusterPushSecret)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/clusterpushsecret.yaml

clustersecretstore.yamlCRD template included in staging base (ClusterSecretStore) +0/-0

CRD template included in staging base (ClusterSecretStore)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/clustersecretstore.yaml

ecrauthorizationtoken.yamlCRD template included in staging base (ECR authorization token) +0/-0

CRD template included in staging base (ECR authorization token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/ecrauthorizationtoken.yaml

externalsecret.yamlCRD template included in staging base (ExternalSecret) +0/-0

CRD template included in staging base (ExternalSecret)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/externalsecret.yaml

fake.yamlCRD template included in staging base (fake) +0/-0

CRD template included in staging base (fake)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/fake.yaml

gcraccesstoken.yamlCRD template included in staging base (GCR access token) +0/-0

CRD template included in staging base (GCR access token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/gcraccesstoken.yaml

generatorstate.yamlCRD template included in staging base (GeneratorState) +0/-0

CRD template included in staging base (GeneratorState)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/generatorstate.yaml

githubaccesstoken.yamlCRD template included in staging base (GitHub access token) +0/-0

CRD template included in staging base (GitHub access token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/githubaccesstoken.yaml

grafana.yamlCRD template included in staging base (Grafana) +0/-0

CRD template included in staging base (Grafana)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/grafana.yaml

mfa.yamlCRD template included in staging base (MFA) +0/-0

CRD template included in staging base (MFA)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/mfa.yaml

password.yamlCRD template included in staging base (Password) +0/-0

CRD template included in staging base (Password)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/password.yaml

pushsecret.yamlCRD template included in staging base (PushSecret) +0/-0

CRD template included in staging base (PushSecret)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/pushsecret.yaml

quayaccesstoken.yamlCRD template included in staging base (Quay access token) +0/-0

CRD template included in staging base (Quay access token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/quayaccesstoken.yaml

secretstore.yamlCRD template included in staging base (SecretStore) +0/-0

CRD template included in staging base (SecretStore)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/secretstore.yaml

sshkey.yamlCRD template included in staging base (SSHKey) +0/-0

CRD template included in staging base (SSHKey)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/sshkey.yaml

stssessiontoken.yamlCRD template included in staging base (STS session token) +0/-0

CRD template included in staging base (STS session token)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/stssessiontoken.yaml

uuid.yamlCRD template included in staging base (UUID) +0/-0

CRD template included in staging base (UUID)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/uuid.yaml

vaultdynamicsecret.yamlCRD template included in staging base (VaultDynamicSecret) +0/-0

CRD template included in staging base (VaultDynamicSecret)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/vaultdynamicsecret.yaml

webhook.yamlCRD template included in staging base (Webhook) +0/-0

CRD template included in staging base (Webhook)

• Helm-rendered CRD manifest included in the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/crds/webhook.yaml

deployment.yamlMain controller deployment template included in staging base +0/-0

Main controller deployment template included in staging base

• Helm template for ESO controller deployment in staging base. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/deployment.yaml

extra-manifests.yamlExtra manifests template included in staging base +0/-0

Extra manifests template included in staging base

• Helm template for additional manifests shipped with the staging base chart. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/extra-manifests.yaml

grafana-dashboard.yamlGrafana dashboard ConfigMap template included in staging base +0/-0

Grafana dashboard ConfigMap template included in staging base

• Helm template for deploying the Grafana dashboard. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/grafana-dashboard.yaml

poddisruptionbudget.yamlController PDB template included in staging base +0/-0

Controller PDB template included in staging base

• Helm template for ESO controller PDB. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/poddisruptionbudget.yaml

rbac.yamlRBAC template included in staging base +0/-0

RBAC template included in staging base

• Helm template for ESO RBAC resources. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/rbac.yaml

service.yamlService template included in staging base +0/-0

Service template included in staging base

• Helm template for ESO services. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/service.yaml

serviceaccount.yamlServiceAccount template included in staging base +0/-0

ServiceAccount template included in staging base

• Helm template for ESO ServiceAccount. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/serviceaccount.yaml

servicemonitor.yamlServiceMonitor template included in staging base +0/-0

ServiceMonitor template included in staging base

• Helm template for Prometheus ServiceMonitor resources. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/servicemonitor.yaml

validatingwebhook.yamlValidatingWebhookConfiguration template included in staging base +0/-0

ValidatingWebhookConfiguration template included in staging base

• Helm template for the validating webhook configuration. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/validatingwebhook.yaml

webhook-certificate.yamlWebhook certificate template included in staging base +0/-0

Webhook certificate template included in staging base

• Helm template for webhook certificate resources. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-certificate.yaml

webhook-deployment.yamlWebhook deployment template included in staging base +0/-0

Webhook deployment template included in staging base

• Helm template for the webhook deployment. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-deployment.yaml

webhook-poddisruptionbudget.yamlWebhook PDB template included in staging base +0/-0

Webhook PDB template included in staging base

• Helm template for webhook PDB. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-poddisruptionbudget.yaml

webhook-secret.yamlWebhook secret template included in staging base +0/-0

Webhook secret template included in staging base

• Helm template for webhook secret resources. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-secret.yaml

webhook-service.yamlWebhook service template included in staging base +0/-0

Webhook service template included in staging base

• Helm template for the webhook Service. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-service.yaml

webhook-serviceaccount.yamlWebhook ServiceAccount template included in staging base +0/-0

Webhook ServiceAccount template included in staging base

• Helm template for webhook ServiceAccount. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/templates/webhook-serviceaccount.yaml

values.schema.jsonValues schema included in staging base chart +0/-0

Values schema included in staging base chart

• Schema for validating Helm values for ESO staging base. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/values.schema.json

values.yamlDefault Helm values included in staging base chart +0/-0

Default Helm values included in staging base chart

• Helm values used by the staging base chart rendering. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/external-secrets/values.yaml

kustomization.yamlShared staging base kustomization (Helm + NetworkPolicies) +0/-0

Shared staging base kustomization (Helm + NetworkPolicies)

• Defines the common staging base: renders the ESO Helm chart and applies baseline NetworkPolicies and image overrides. This base is now consumed by per-cluster overlays.

components/external-secrets-operator/staging/base/kustomization.yaml

networkpolicy-allow-egress.yamlEgress NetworkPolicies included in staging base +0/-0

Egress NetworkPolicies included in staging base

• Provides egress allowances for DNS and API-server connectivity for ESO components. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/networkpolicy-allow-egress.yaml

networkpolicy-allow-ingress.yamlRemove IBM ROKS CIDR from shared ingress allowlist +0/-4

Remove IBM ROKS CIDR from shared ingress allowlist

• Drops 172.17.0.0/18 from the base ingress sources for webhook and health-check NetworkPolicies. This ensures IBM-specific pod CIDR allowance is not applied to all staging clusters.

components/external-secrets-operator/staging/base/networkpolicy-allow-ingress.yaml

networkpolicy-allow-same-ns.yamlIntra-namespace allow policy included in staging base +0/-0

Intra-namespace allow policy included in staging base

• Allows ESO components to communicate within the namespace and enables localhost health checks. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/networkpolicy-allow-same-ns.yaml

networkpolicy-default-deny.yamlDefault-deny policy included in staging base +0/-0

Default-deny policy included in staging base

• Defines the baseline deny-all NetworkPolicy for the namespace. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/networkpolicy-default-deny.yaml

values.yamlKustomize Helm values for staging base +0/-0

Kustomize Helm values for staging base

• Shared values file consumed by the staging base Helm chart render. No specific content changes were shown in the provided diff snippet.

components/external-secrets-operator/staging/base/values.yaml

ingress-ibm-cidrs.yamlAdd IBM ROKS pod CIDR ingress exception patch (lightwell-dev) +5/-0

Add IBM ROKS pod CIDR ingress exception patch (lightwell-dev)

• Introduces a JSON6902 patch that appends 172.17.0.0/18 to the ingress allowlist. This restores IBM Cloud ROKS compatibility without affecting other clusters.

components/external-secrets-operator/staging/lightwell-dev/ingress-ibm-cidrs.yaml

kustomization.yamlCreate lightwell-dev overlay applying IBM CIDR patches +17/-0

Create lightwell-dev overlay applying IBM CIDR patches

• Defines the lightwell-dev overlay that composes the shared base and applies the IBM CIDR patch to the webhook and health-check NetworkPolicies.

components/external-secrets-operator/staging/lightwell-dev/kustomization.yaml

kustomization.yamlCreate stone-stage-p01 overlay consuming shared base +4/-0

Create stone-stage-p01 overlay consuming shared base

• Adds a stone-stage-p01 overlay that references the shared staging base without cluster-specific patches.

components/external-secrets-operator/staging/stone-stage-p01/kustomization.yaml

kustomization.yamlCreate stone-stg-rh01 overlay consuming shared base +4/-0

Create stone-stg-rh01 overlay consuming shared base

• Adds a stone-stg-rh01 overlay that references the shared staging base without cluster-specific patches.

components/external-secrets-operator/staging/stone-stg-rh01/kustomization.yaml

@qodo-for-redhat-appstudio

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. ClusterDir override not applied 🐞 Bug ≡ Correctness
Description
In the external-secrets-operator ApplicationSet, the list generator sets clusterDir at the top
level, but the template renders the source path using {{values.clusterDir}}, leaving it empty.
This will make ArgoCD try to render from components/external-secrets-operator/staging/ instead of
the per-cluster overlay directories, causing manifest generation/sync to fail for the listed
clusters.
Code

argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml[R19-22]

+                - nameNormalized: lightwell-dev
+                  clusterDir: lightwell-dev
+                - nameNormalized: stone-stage-p01
+                  clusterDir: stone-stage-p01
Relevance

●●● Strong

Team usually accepts ArgoCD/ApplicationSet generator/path fixes to prevent broken rendering/sync.

PR-#13239
PR-#13021

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ApplicationSet template sources path from {{values.clusterDir}}, but the PR’s list elements
set clusterDir at a different key path, so the override will not affect the rendered path. The
per-cluster overlays exist as directories with their own kustomizations under
components/external-secrets-operator/staging/<cluster>/, so the rendered path must include the
clusterDir value to reach them; other ApplicationSets in this repo use values.clusterDir for
exactly this reason.

argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml[12-24]
argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml[30-32]
components/external-secrets-operator/staging/base/kustomization.yaml[1-10]
components/external-secrets-operator/staging/stone-stage-p01/kustomization.yaml[1-4]
argo-cd-apps/base/all-clusters/infra-deployments/cost-management/costmanagement-metrics-operator.yaml[16-24]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`external-secrets-operator.yaml` uses `{{values.clusterDir}}` in `spec.template.spec.source.path`, but the newly-added list elements set `clusterDir` (not `values.clusterDir`). As a result, `values.clusterDir` stays empty and the ApplicationSet will point ArgoCD at a directory that doesn’t contain the intended overlay kustomizations.

### Issue Context
This repo’s established pattern for per-cluster overrides in merge generators is to set dotted keys like `values.clusterDir: <dir>` in list elements.

### Fix Focus Areas
- argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml[12-32]
- argo-cd-apps/base/all-clusters/infra-deployments/cost-management/costmanagement-metrics-operator.yaml[16-24]
- components/external-secrets-operator/staging/base/kustomization.yaml[1-10]
- components/external-secrets-operator/staging/stone-stage-p01/kustomization.yaml[1-4]

### Concrete fix
Update the list elements to set `values.clusterDir` (repo-standard), e.g.
```yaml
- nameNormalized: lightwell-dev
 values.clusterDir: lightwell-dev
```
(and similarly for the other clusters). Optionally, set a safe default for `values.clusterDir` in the clusters generator if you want non-overridden clusters to render a valid base.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Misleading IBM CIDR comment 🐞 Bug ⚙ Maintainability
Description
The base NetworkPolicy comment still states that the IBM pod CIDR 172.17.0.0/18 is allowed, but
this PR removes that ipBlock from the base policy and re-adds it only via the lightwell-dev
overlay. This is misleading for readers/operators inspecting the base manifest.
Code

components/external-secrets-operator/staging/base/networkpolicy-allow-ingress.yaml[L30-31]

-    - ipBlock:
-        cidr: 172.17.0.0/18
Relevance

● Weak

Comment-only corrections are often rejected; precedent rejecting typo/comment fix in similar
manifests.

PR-#13239

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The base policy still documents the IBM CIDR as an allowed source, but the rendered base ingress
rule no longer includes it; instead, the IBM CIDR is now added back via a lightwell-dev overlay
patch that appends the ipBlock to the ingress from list.

components/external-secrets-operator/staging/base/networkpolicy-allow-ingress.yaml[19-32]
components/external-secrets-operator/staging/lightwell-dev/ingress-ibm-cidrs.yaml[1-5]
components/external-secrets-operator/staging/lightwell-dev/kustomization.yaml[1-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The base NetworkPolicy text still claims the IBM CIDR is allowed in base, but the PR moved that allowlist entry into a cluster-specific overlay patch.

### Issue Context
Base now only allows `10.128.0.0/14` and `192.168.0.0/16` for webhook ingress; IBM CIDR is reintroduced via a JSON6902 patch in the `lightwell-dev` overlay.

### Fix Focus Areas
- components/external-secrets-operator/staging/base/networkpolicy-allow-ingress.yaml[18-32]
- components/external-secrets-operator/staging/lightwell-dev/ingress-ibm-cidrs.yaml[1-5]
- components/external-secrets-operator/staging/lightwell-dev/kustomization.yaml[1-17]

### Concrete fix
Edit the comment to clarify the IBM CIDR is added only in the IBM/ROKS overlay (or remove the IBM-specific line from the base comment).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
✅ Compliance rules (platform): 3 rules

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +19 to +22
- nameNormalized: lightwell-dev
clusterDir: lightwell-dev
- nameNormalized: stone-stage-p01
clusterDir: stone-stage-p01

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Clusterdir override not applied 🐞 Bug ≡ Correctness

In the external-secrets-operator ApplicationSet, the list generator sets clusterDir at the top
level, but the template renders the source path using {{values.clusterDir}}, leaving it empty.
This will make ArgoCD try to render from components/external-secrets-operator/staging/ instead of
the per-cluster overlay directories, causing manifest generation/sync to fail for the listed
clusters.
Agent Prompt
### Issue description
`external-secrets-operator.yaml` uses `{{values.clusterDir}}` in `spec.template.spec.source.path`, but the newly-added list elements set `clusterDir` (not `values.clusterDir`). As a result, `values.clusterDir` stays empty and the ApplicationSet will point ArgoCD at a directory that doesn’t contain the intended overlay kustomizations.

### Issue Context
This repo’s established pattern for per-cluster overrides in merge generators is to set dotted keys like `values.clusterDir: <dir>` in list elements.

### Fix Focus Areas
- argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml[12-32]
- argo-cd-apps/base/all-clusters/infra-deployments/cost-management/costmanagement-metrics-operator.yaml[16-24]
- components/external-secrets-operator/staging/base/kustomization.yaml[1-10]
- components/external-secrets-operator/staging/stone-stage-p01/kustomization.yaml[1-4]

### Concrete fix
Update the list elements to set `values.clusterDir` (repo-standard), e.g.
```yaml
- nameNormalized: lightwell-dev
  values.clusterDir: lightwell-dev
```
(and similarly for the other clusters). Optionally, set a safe default for `values.clusterDir` in the clusters generator if you want non-overridden clusters to render a valid base.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Critical

  • [api-contract] argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml:19 — The list generator elements use bare clusterDir but the path template references {{values.clusterDir}}. In ArgoCD's merge generator, the clusters generator produces parameters in the values.* namespace. To override those in a list generator, the key must be values.clusterDir. Using bare clusterDir creates a separate top-level parameter that does not override values.clusterDir, so the template still reads the default empty string for all three clusters. Every other ApplicationSet in this repository (squid, multi-platform-controller, konflux-kite, cost-management, monitoring-blackbox, monitoring-grafana, monitoring-prometheus, monitoring-logging, smee-client) uses values.clusterDir in list elements.
    Remediation: Change the list element keys from clusterDir to values.clusterDir.

High

  • [logic-error] argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml:16 — The default clusterDir value remains "" (empty string) but all files have been moved from staging/ to staging/base/. Any cluster not explicitly listed would resolve to components/external-secrets-operator/staging/, which no longer contains a kustomization.yaml. The established pattern across the repo (cost-management, monitoring-blackbox, monitoring-grafana, monitoring-prometheus, monitoring-logging) is to set clusterDir: base when introducing a base subdirectory.
    Remediation: Change the default clusterDir value from "" to base.

Medium

  • [scope-drift] argo-cd-apps/base/all-clusters/infra-deployments/external-secrets-operator/external-secrets-operator.yaml — The ApplicationSet change adds three cluster-specific list entries. If the critical and high findings above are fixed (using values.clusterDir and default base), unlisted clusters get the base overlay and listed clusters get their specific overlay — matching the standard differentiation pattern used elsewhere in the repo. However, verify that all staging clusters are accounted for and will either match one of the three explicit entries or correctly receive the base configuration.
  • [naming-consistency] components/external-secrets-operator/staging/base/networkpolicy-allow-ingress.yaml — The base networkpolicy comments still reference 172.17.0.0/18 (pod CIDR on IBM Cloud ROKS clusters, e.g. lightwell-dev) but that CIDR block has been removed from this file and moved to the lightwell-dev cluster-specific patch. The comment now describes a CIDR range that is no longer present in this resource.
    Remediation: Remove the 172.17.0.0/18 line from the comment block, or replace it with a note that cluster-specific CIDRs are applied via overlays.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

- list:
elements: []
elements:
- nameNormalized: lightwell-dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[critical] api-contract

The list generator elements use bare clusterDir but the path template references {{values.clusterDir}}. In ArgoCD's merge generator, the clusters generator produces parameters in the values.* namespace. To override those in a list generator, the key must be values.clusterDir. Using bare clusterDir creates a separate top-level parameter that does not override values.clusterDir, so the template still reads the default empty string for all three clusters. Every other ApplicationSet in this repository uses values.clusterDir in list elements.

Suggested fix: Change the list element keys from clusterDir to values.clusterDir.

@@ -15,7 +15,13 @@ spec:
environment: staging
clusterDir: ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[high] logic-error

The default clusterDir value remains an empty string but all files have been moved from staging/ to staging/base/. Any cluster not explicitly listed would resolve to components/external-secrets-operator/staging/, which no longer contains a kustomization.yaml. The established pattern across the repo is to set clusterDir: base when introducing a base subdirectory.

Suggested fix: Change the default clusterDir value from an empty string to base.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.78%. Comparing base (1ff16da) to head (9942414).
⚠️ Report is 192 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #13537   +/-   ##
=======================================
  Coverage   58.78%   58.78%           
=======================================
  Files          24       24           
  Lines        1548     1548           
=======================================
  Hits          910      910           
  Misses        559      559           
  Partials       79       79           
Flag Coverage Δ
go 58.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eedri

eedri commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Risk Assessment

AI calculated Risk — based on code changes and PR description.
Override this by adding your own ## Risk Assessment section to the PR description.

Risk Level: Medium
Description: This PR refactors the External Secrets Operator deployment in staging to use per-cluster Kustomize overlays, allowing individual cluster configurations. It also moves an IBM-specific NetworkPolicy CIDR to only apply to the lightwell-dev cluster, which carries a medium risk due to the structural changes and potential for misconfiguring secret access for staging applications.
Rollback: Revert this PR to undo the changes and restore the previous Kustomize and ApplicationSet configuration.

@eedri

eedri commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@sadlerap the staging PR for this change has been soaking for 7d — but this production PR still has no reviewer approvals.

Please request a review from a team member using the Reviewers panel on the right, or ask in your team's Slack channel.

@eedri

eedri commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@sadlerap the staging PR for this change has been soaking for 2w — but this production PR still has no reviewer approvals.

Please request a review from a team member using the Reviewers panel on the right, or ask in your team's Slack channel.

@openshift-ci

openshift-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants