Skip to content

feat(eso): adopt existing managed pod identities - #47

Merged
patrickleet merged 3 commits into
mainfrom
feat/staging-stack-adoption
Dec 2, 2026
Merged

patrickleet merged 3 commits into
mainfrom
feat/staging-stack-adoption

Conversation

@patrickleet

@patrickleet patrickleet commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

This extends SecretStack to adopt an existing IAM role and EKS service account association while continuing to own the composed PodIdentity. A Helm release or provider package can already be adopted in place. The missing inputs were the external AWS identities and the role policies that should be reconciled afterward.

Set spec.aws.podIdentity.name to the existing PodIdentity composite name and pass the IAM role name and EKS association ID in role.externalName and association.externalName. The renderer forwards them to PodIdentity, including the role name override, and keeps deletion dependencies pointed at the selected resource. The identity can start under Observe while the stack manages its other components. Explicit inline and managed policy lists replace their respective defaults, including empty lists. Omitted inputs retain the existing render.

The existing chart can be pinned with spec.chartVersion. An environment can preserve scoped secret-access policies during transfer and test the controller upgrade separately.

The import example and composition test cover the external IDs, management policies and an empty policy override. Check the existing writer and effective IAM policy before enabling Update.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b220bd0c-334b-4209-8cbf-806dc86cc559
Commits

Reviewing files that changed from the base of the PR and between 7f02b2e and 686b24e.

Files selected for processing: 9

  • .github/workflows/on-pr.yaml
  • .github/workflows/on-push-main.yaml
  • Makefile
  • README.md
  • apis/secretstacks/definition.yaml
  • examples/secretstacks/import-identity.yaml
  • functions/render/000-state-init.yaml.gotmpl
  • functions/render/210-aws-pod-identity.yaml.gotmpl
  • tests/test-render/main.k

No actionable comments were generated in the recent review.

Walkthrough

SecretStack adds an optional ESO chart version and a setting to disable management of AWS pod identity resources. The pull request also adds an example, documentation, rendering tests, and validation coverage.

Changes: SecretStack configuration and rendering

Layer / File(s) Summary
Configuration and resolved state
apis/secretstacks/definition.yaml, functions/render/000-state-init.yaml.gotmpl, examples/secretstacks/external-identity.yaml, README.md
The API adds spec.chartVersion and AWS managePodIdentity, which defaults to true. Render state reads both values. The example sets chart version 2.2.0 and disables pod identity management and the secret store. The README describes these settings and adoption considerations.
Conditional rendering and validation
functions/render/200-helm-release-external-secrets.yaml.gotmpl, functions/render/210-aws-pod-identity.yaml.gotmpl, tests/test-render/main.k, Makefile, .github/workflows/on-pr.yaml, .github/workflows/on-push-main.yaml
The Helm release uses the configured chart version when set and otherwise retains 2.15.0. AWS PodIdentity and its Usage resource render only when AWS is enabled and managePodIdentity is true. The render test checks the example’s chart version and readiness, and the example is added to Makefile and workflow validation lists.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: Minimal · previous review 7f02b

This adds opt-in controls for externally managed pod identity and for pinning the ESO chart version. Existing claims keep their current behavior by default, and the ownership-transfer caveat is documented. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(eso): adopt existing managed pod identities" matches the main change. The PR adds a spec.aws.managePodIdentity option that lets a new SecretStack claim skip creating the pod identity, …
Full details: Title check

Explanation

The title "feat(eso): adopt existing managed pod identities" matches the main change. The PR adds a spec.aws.managePodIdentity option that lets a new SecretStack claim skip creating the pod identity, so an existing EKS association and IAM role can be kept and adopted. The title names the feature area (ESO) and the core behavior. It does not mention the chartVersion pin or the README, example, and test additions, which is expected for a title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6800f0da-6951-4618-b6ba-cb83a3f98f52
Commits

Reviewing files that changed from the base of the PR and between 550f663 and 7f02b2e.

Files selected for processing: 10

  • .github/workflows/on-pr.yaml
  • .github/workflows/on-push-main.yaml
  • Makefile
  • README.md
  • apis/secretstacks/definition.yaml
  • examples/secretstacks/external-identity.yaml
  • functions/render/000-state-init.yaml.gotmpl
  • functions/render/200-helm-release-external-secrets.yaml.gotmpl
  • functions/render/210-aws-pod-identity.yaml.gotmpl
  • tests/test-render/main.k

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@patrickleet patrickleet changed the title feat(eso): support externally managed pod identity feat(eso): adopt existing managed pod identities Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Published Crossplane Package

The following Crossplane package was published as part of this PR:

Package: ghcr.io/hops-ops/secret-stack:pr-47-bdd10338c2853cf053f4c7f3dd9180a35507b252

View Package

@patrickleet
patrickleet merged commit 0641dde into main Dec 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant