Skip to content

feat: implement controller logic for component overrides (EP-1898)#132

Open
swghosh wants to merge 2 commits intoopenshift:ai-staging-release-1.0from
swghosh:feature/controller-impl-ep1898
Open

feat: implement controller logic for component overrides (EP-1898)#132
swghosh wants to merge 2 commits intoopenshift:ai-staging-release-1.0from
swghosh:feature/controller-impl-ep1898

Conversation

@swghosh
Copy link
Copy Markdown
Member

@swghosh swghosh commented Apr 6, 2026

Summary

  • Implements controller reconciliation logic for the new annotations, componentConfigs, deploymentConfig, and overrideEnv API fields from EP-1898
  • Adds applyAnnotationsToDeployment() to merge global custom annotations into Deployment and Pod template metadata
  • Adds applyComponentConfig() to apply per-component revisionHistoryLimit and overrideEnv overrides
  • Adds mergeEnvVars() to merge user-specified environment variables into containers with precedence handling
  • Adds helper functions mapping between ComponentName enums and deployment asset names

Enhancement Proposal

openshift/enhancements#1898

Changes

File Description
pkg/controller/external_secrets/deployments.go Added applyAnnotationsToDeployment, applyComponentConfig, mergeEnvVars functions; integrated into getDeploymentObject flow
pkg/controller/external_secrets/utils.go Added deploymentAssetNameForComponent, getComponentConfig, getComponentNameForDeploymentAsset helper functions

Test plan

🤖 Generated with Claude Code

swghosh and others added 2 commits April 6, 2026 13:56
…-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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f299659-cd45-48cc-b2d6-d8b3c5d36469

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from TrilokGeer and mytreya-rh April 6, 2026 08:33
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 6, 2026

[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

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant