Skip to content

feat: implement componentConfig and annotations controller logic (EP#1898)#128

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

feat: implement componentConfig and annotations controller logic (EP#1898)#128
swghosh wants to merge 2 commits intoopenshift:ai-staging-release-1.0from
swghosh:feature/controller-impl-1898-63574

Conversation

@swghosh
Copy link
Copy Markdown
Member

@swghosh swghosh commented Apr 6, 2026

Summary

  • Implements controller reconciliation logic for annotations and componentConfigs API fields from Enhancement Proposal #1898
  • Adds component_config.go with functions to apply custom annotations and per-component deployment overrides (revisionHistoryLimit, overrideEnv)
  • Maps ComponentName enum values (ExternalSecretsCoreController, Webhook, CertController, BitwardenSDKServer) to deployment assets and container names
  • Integrates with the existing getDeploymentObject pipeline in deployments.go
  • Reserved annotation prefixes (kubernetes.io/, app.kubernetes.io/, openshift.io/, k8s.io/) are filtered out with logging
  • Environment variable overrides use merge semantics — existing vars are overridden, new ones are appended
  • Comprehensive unit tests in component_config_test.go

Depends on

Test plan

  • Unit tests pass: go test ./pkg/controller/external_secrets/...
  • Build succeeds: make build
  • Verify annotations are applied to deployment and pod template metadata
  • Verify revisionHistoryLimit is set on target deployments
  • Verify overrideEnv merges correctly with existing container env vars
  • Verify reserved annotation prefixes are skipped (not applied)
  • Verify unrecognized asset names are handled gracefully (no-op)

🤖 Generated with Claude Code

swghosh and others added 2 commits April 6, 2026 13:48
…sConfig

Extend the ExternalSecretsConfig API with componentConfig and annotations
fields as specified in enhancement proposal #1898 (ESO-266).

New types added:
- ComponentConfig: per-component deployment overrides and env vars
- DeploymentConfig: deployment-level settings (revisionHistoryLimit)
- Annotation: custom annotation key-value pairs

New ComponentName enum values: Webhook, CertController

Includes CEL validation for reserved annotation prefixes and env var names,
integration test suite coverage, regenerated deepcopy and CRD manifests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add controller reconciliation logic for the componentConfig and annotations
API fields introduced in EP #1898:

- applyAnnotationsToDeployment: applies custom annotations (with reserved
  prefix filtering) to deployment and pod template metadata
- applyComponentConfigToDeployment: applies per-component overrides
  including revisionHistoryLimit and overrideEnv to target deployments
- Maps ComponentName enum values to deployment assets and container names

Integrates with existing getDeploymentObject pipeline so all deployment
reconciliation flows (create and update) apply the new configuration.

Includes comprehensive unit tests for all new functions.

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: 780fce01-2209-43d2-865f-a30fc26e4aca

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
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