ESO-541,ESO-551:Adds API changes for concurrent flag, replicas, and experimentalOverrides - #172
ESO-541,ESO-551:Adds API changes for concurrent flag, replicas, and experimentalOverrides#172siddhibhor-56 wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
WalkthroughChangesConfiguration controls
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@siddhibhor-56: This pull request references ESO-541 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. This pull request references ESO-551 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: siddhibhor-56 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/v1alpha1/external_secrets_config_types.go`:
- Around line 155-167: Update the core controller Deployment rendering to use
ControllerConfig.Replicas for the Deployment replica count and
ControllerConfig.Concurrent for the --concurrent argument, falling back to 1
when either pointer is nil. Replace the hard-coded values in the renderer and
embedded Deployment while preserving the existing configuration flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: fc08f376-7f54-47b8-b7bb-ad4fb9d0186f
⛔ Files ignored due to path filters (1)
api/v1alpha1/zz_generated.deepcopy.gois excluded by!**/zz_generated*
📒 Files selected for processing (5)
api/v1alpha1/external_secrets_config_types.goapi/v1alpha1/tests/externalsecretsconfig.operator.openshift.io/externalsecretsconfig.testsuite.yamlbundle/manifests/operator.openshift.io_externalsecretsconfigs.yamlconfig/crd/bases/operator.openshift.io_externalsecretsconfigs.yamldocs/api_reference.md
| // concurrent sets the core controller --concurrent flag (max concurrent reconciles). | ||
| // When omitted, defaults to 1 for backward compatibility. | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=100 | ||
| // +optional | ||
| Concurrent *int32 `json:"concurrent,omitempty"` | ||
|
|
||
| // replicas sets the desired replica count for the external-secrets core controller Deployment. | ||
| // When omitted, defaults to 1. When greater than 1, leader election keeps a single active reconciler. | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=10 | ||
| // +optional | ||
| Replicas *int32 `json:"replicas,omitempty"` |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -u
# Locate Go files that consume ControllerConfig or construct controller arguments.
fd -e go . | while IFS= read -r file; do
if rg -q '\bControllerConfig\b|\.Concurrent\b|\.Replicas\b|--concurrent' "$file"; then
ast-grep outline "$file" --items all
rg -n -C 5 '\bControllerConfig\b|\.Concurrent\b|\.Replicas\b|--concurrent|replicas:' "$file"
fi
doneRepository: openshift/external-secrets-operator
Length of output: 50392
🏁 Script executed:
#!/bin/bash
set -u
# Restrict the search to tracked, non-vendored source and test files.
git ls-files '*.go' ':!:vendor/**' \
| xargs -r rg -n -C 6 'ControllerConfig|\.Concurrent|\.Replicas|--concurrent|ExternalSecretsConfig' \
| head -n 1200Repository: openshift/external-secrets-operator
Length of output: 50391
🏁 Script executed:
#!/bin/bash
set -u
# Find the renderer and its focused tests without generated assets or vendor code.
for file in $(git ls-files '*.go' ':!:vendor/**' ':!:pkg/operator/assets/**'); do
if rg -q 'ControllerConfig|\.Concurrent|\.Replicas|--concurrent' "$file"; then
echo "===== $file ====="
rg -n -C 12 'ControllerConfig|\.Concurrent|\.Replicas|--concurrent' "$file"
fi
doneRepository: openshift/external-secrets-operator
Length of output: 50392
🏁 Script executed:
#!/bin/bash
set -u
echo '===== pkg/controller/external_secrets/deployments.go: deployment construction ====='
sed -n '1,430p' pkg/controller/external_secrets/deployments.go
echo '===== replica and concurrency assignments in source/tests ====='
rg -n -C 8 'Spec\.Replicas|Replicas:|--concurrent|updateContainerSpec|createOrApplyDeployment|CreateOrApplyDeployment' \
pkg/controller/external_secrets api pkg/operator \
-g '*.go' -g '!assets/**' | head -n 1200Repository: openshift/external-secrets-operator
Length of output: 38149
🏁 Script executed:
#!/bin/bash
set -u
# Check the embedded core-controller Deployment template for its baseline replica count.
rg -n -C 12 'name: external-secrets$|kind: Deployment|replicas:' \
pkg/operator/assets/bindata.go | head -n 500Repository: openshift/external-secrets-operator
Length of output: 18410
Wire ControllerConfig.Replicas and ControllerConfig.Concurrent into the core controller Deployment. The renderer hard-codes --concurrent=1 and the embedded Deployment has replicas: 1, so configured values are ignored. Retain 1 when either field is omitted.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@api/v1alpha1/external_secrets_config_types.go` around lines 155 - 167, Update
the core controller Deployment rendering to use ControllerConfig.Replicas for
the Deployment replica count and ControllerConfig.Concurrent for the
--concurrent argument, falling back to 1 when either pointer is nil. Replace the
hard-coded values in the renderer and embedded Deployment while preserving the
existing configuration flow.
|
@siddhibhor-56: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
Summary
ExternalSecretsConfigAPI fields for core controller scale and throughput:spec.controllerConfig.concurrent(*int32, min 1 / max 100) for--concurrent=<N>spec.controllerConfig.replicas(*int32, min 1 / max 10) for core controller Deployment replicasspec.controllerConfig.componentConfigs[].experimentalOverrides(*runtime.RawExtension)Implements the API surface from openshift/enhancements#2068 (ESO-540/ESO-550).
Summary by CodeRabbit