feat: implement controller logic for component overrides (EP-1898)#132
feat: implement controller logic for component overrides (EP-1898)#132swghosh wants to merge 2 commits intoopenshift:ai-staging-release-1.0from
Conversation
…-1898) Extend the ExternalSecretsConfig API with: - annotations: global custom annotations for all operand Deployments and Pod templates - componentConfigs: per-component configuration overrides (Controller, Webhook, CertController, BitwardenSDKServer) - deploymentConfig: deployment-level overrides including revisionHistoryLimit - overrideEnv: custom environment variables per component with reserved prefix validation Also extends ComponentName enum with Webhook and CertController values, adds KVPair and Annotation types for structured annotation configuration, and includes comprehensive integration test coverage for all new fields and validation rules. Ref: openshift/enhancements#1898 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add controller implementation for the new ExternalSecretsConfig API fields: - applyAnnotationsToDeployment: merges global annotations from ControllerConfig.Annotations into Deployment metadata and Pod template metadata for all operand components - applyComponentConfig: applies per-component revisionHistoryLimit and overrideEnv from ComponentConfig to each component's Deployment - mergeEnvVars: merges override environment variables into container env lists with precedence for user-specified values - Helper functions: deploymentAssetNameForComponent, getComponentConfig, getComponentNameForDeploymentAsset for mapping between ComponentName enums and deployment asset names The new logic integrates into the existing getDeploymentObject flow, running after proxy configuration and before deployment creation/update. Ref: openshift/enhancements#1898 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: swghosh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
annotations,componentConfigs,deploymentConfig, andoverrideEnvAPI fields from EP-1898applyAnnotationsToDeployment()to merge global custom annotations into Deployment and Pod template metadataapplyComponentConfig()to apply per-componentrevisionHistoryLimitandoverrideEnvoverridesmergeEnvVars()to merge user-specified environment variables into containers with precedence handlingComponentNameenums and deployment asset namesEnhancement Proposal
openshift/enhancements#1898
Changes
pkg/controller/external_secrets/deployments.goapplyAnnotationsToDeployment,applyComponentConfig,mergeEnvVarsfunctions; integrated intogetDeploymentObjectflowpkg/controller/external_secrets/utils.godeploymentAssetNameForComponent,getComponentConfig,getComponentNameForDeploymentAssethelper functionsTest plan
make generatepassesmake buildpasses (compilation verified)go vet ./pkg/controller/...passes with no issues🤖 Generated with Claude Code