Skip to content

docs(secrets): complete secrets management guide with new-service setup procedure#43

Open
andrest50 wants to merge 16 commits into
mainfrom
feat/LFXV2-1783-add-lfx-v2-secrets-skill
Open

docs(secrets): complete secrets management guide with new-service setup procedure#43
andrest50 wants to merge 16 commits into
mainfrom
feat/LFXV2-1783-add-lfx-v2-secrets-skill

Conversation

@andrest50

@andrest50 andrest50 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR completes the LFX V2 secrets management documentation in two ways:

  1. lfx_one/secrets-management.md — fills in the Step 6 TODO placeholder and restructures the full step-by-step procedure into 12 clear, ordered steps
  2. lfx_one/skills/lfx-v2-secrets/SKILL.md — adds a new AI skill providing complete secrets setup guidance for Claude Code

What changed in secrets-management.md

Step reordering — Infrastructure setup now comes first (Steps 1–7), so the one-time wiring is done before adding any secrets. Per-secret work follows as Steps 8–12. A prominent callout at the top lets existing services skip directly to Step 8.

Steps Phase What it covers
1 One-time setup Register IAM service account role (lfx-v2-opentofu)
2 One-time setup Add serviceaccount.yaml Helm template
3 One-time setup Add secretstore.yaml Helm template
4 One-time setup Add externalsecret.yaml — tag-discovery (recommended) and explicit-data patterns
5 One-time setup Add values.yaml defaults and document the three ESO render gates
6 One-time setup Configure per-environment ArgoCD values with IRSA role ARNs
7 One-time setup Configure local development (ESO disabled, manual K8s Secret)
8–12 Per secret Add to 1Password → YAML config → PR → deploy → consume in K8s

Tag format updated throughout from the legacy service: pcc to service-pcc: enabled. This convention allows a single secret to carry tags for multiple consuming services simultaneously. Updated in: mermaid diagram, Service Tag Integration section, Configuration Example, Configuration Breakdown.

Other fixes: outdated role name examples (k8s-secret-access-pcclfx-v2-pcc), mermaid ExternalSecret filter labels, ArgoCD casing in prose, clarified default values wording for serviceAccount.create.

What the lfx-v2-secrets skill covers

The AI skill provides end-to-end guidance in two modes:

  • Mode 1 (new service): Full walkthrough across lfx-v2-opentofu, service Helm chart, and lfx-v2-argocd — IRSA role, ServiceAccount/SecretStore/ExternalSecret templates, values defaults, per-env ArgoCD values, local dev config, and lfx-secrets-management YAML
  • Mode 2 (existing service): Minimal steps to add a new secret to an already-wired service

All YAML examples are grounded in the real lfx-v2-email-service and lfx-v2-invite-service implementations and match the lfx-secrets-management schema (environments:, json_fields:, service-*: enabled tags, accounts mapping, regions as list).

Ticket

N/A

🤖 Generated with Claude Code

…V2-1783)

Adds the lfx-v2-secrets AI skill and expands the secrets-management.md
Step 6 TODO into seven concise steps (6-12) covering the full one-time
setup for a new LFX V2 service:

- Step 6: IAM role registration in lfx-v2-opentofu (IRSA, tag-scoped
  Secrets Manager policy, account IDs for dev/staging/prod)
- Step 7-9: ServiceAccount, SecretStore, and ExternalSecret Helm
  templates with both tag-discovery (recommended) and explicit-data
  patterns documented
- Step 10: values.yaml defaults and the three ESO render gates
- Step 11: per-environment lfx-v2-argocd values with IRSA role ARNs
- Step 12: local development config (ESO disabled, manual K8s Secret)

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Copilot AI review requested due to automatic review settings June 1, 2026 06:55
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a detailed Steps 1–12 "New service setup" flow to secrets-management.md (IRSA, Helm templates, values gating, per-environment argocd config, tag-based discovery) and a new SKILL.md guide covering architecture, two operational modes, templates, workflows, verification, and debugging for ESO + AWS Secrets Manager in LFX V2.

Changes

AWS Secrets Manager Documentation

Layer / File(s) Summary
Expanded secrets-management.md with new service setup flow
lfx_one/secrets-management.md
Table of contents now enumerates Steps 1–12. Adds a new-service setup path (IRSA/IAM role registration, Helm templates for ServiceAccount/SecretStore/ExternalSecret with tag discovery and explicit-data options), values.yaml gating to disable ESO, per-environment lfx-v2-argocd config (awsRegion, IRSA role ARN), local-dev ESO disable instructions, and updates examples to service-<name>: enabled tag format.
SKILL.md front-matter and architecture overview
lfx_one/skills/lfx-v2-secrets/SKILL.md
New doc front-matter and "Understanding the Architecture" section describing end-to-end flow, fixed naming/ARN/region patterns, SecretStore/ESO JWT auth details, and AWS Secrets Manager path/tag conventions.
SKILL.md: Mode 1 (New Service full setup)
lfx_one/skills/lfx-v2-secrets/SKILL.md
Mode 1 step-by-step cross-repo setup: prepare inputs, add IAM service account in lfx-v2-opentofu, add sync entries in lfx-secrets-management, generate ServiceAccount/SecretStore/ExternalSecret Helm templates, update service values.yaml, deployment wiring with local-dev overrides, and update lfx-v2-argocd global/per-environment values.
SKILL.md: Mode 2 (Existing service incremental)
lfx_one/skills/lfx-v2-secrets/SKILL.md
Mode 2 incremental instructions: add sync entry in lfx-secrets-management, append ExternalSecret data mapping in lfx-v2-argocd per-service values, and add deployment env var mapping to the Kubernetes Secret key.
SKILL.md: verification, workflows, and debugging
lfx_one/skills/lfx-v2-secrets/SKILL.md
Verification checklist across repos, reference implementation pointers, common workflows for adding JWT/SMTP secrets, stepwise debugging from pod/ESO logs through AWS permissions and ExternalSecret status, and communication-style guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly and specifically summarizes the main change: completing the secrets management guide with new-service setup documentation.
Description check ✅ Passed The PR description comprehensively explains the changes across both modified files, detailing the step restructuring, tag format updates, and the new lfx-v2-secrets skill with clear examples and operational modes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/LFXV2-1783-add-lfx-v2-secrets-skill

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@lfx_one/skills/lfx-v2-secrets/SKILL.md`:
- Around line 76-83: The fenced code block containing "Service: invite-service
(short: invite)" is missing a language specifier and surrounding blank lines
which triggers markdownlint errors MD040 and MD031; update the block by adding
an explicit language (e.g., "text") after the opening triple backticks and
ensure there is a blank line before and after the fenced block so the example
block validates correctly.
- Around line 151-156: Add a blank line between the "**Tips**:" header and the
following list inside the blockquote so the list is separated from the header
(fixes MD032); update the block that contains the "**Tips**:" header and the
subsequent dash-list (the quoted list with entries like "Each secret..." and
"The `path` convention...") by inserting a single empty line after "**Tips**:".
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dc651f79-45cd-4b31-bbc8-0dee52175ba7

📥 Commits

Reviewing files that changed from the base of the PR and between 1d98cd1 and a0bc2ea.

📒 Files selected for processing (2)
  • lfx_one/secrets-management.md
  • lfx_one/skills/lfx-v2-secrets/SKILL.md

Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands LFX V2 secrets documentation by adding a dedicated AI skill for ESO+IRSA setup and by replacing the previous Step 6 TODO in secrets-management.md with an end-to-end, multi-repo new-service setup flow.

Changes:

  • Added a new lfx-v2-secrets skill documenting ESO + IRSA secrets wiring for new services and for adding secrets to existing services.
  • Expanded secrets-management.md with detailed Steps 6–12 covering OpenTofu IRSA role registration, service chart templates/values, Argo CD per-environment values, and local development guidance.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 21 comments.

File Description
lfx_one/skills/lfx-v2-secrets/SKILL.md New skill doc covering ESO+IRSA architecture and step-by-step setup workflows.
lfx_one/secrets-management.md Replaces Step 6 TODO with detailed, ordered Steps 6–12 for new-service secrets setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/secrets-management.md
- Add `text` language specifier to fenced example block (MD040)
- Add blank line before example block (MD031)
- Add blank line after **Tips**: header inside blockquote (MD032)

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
@andrest50

Copy link
Copy Markdown
Contributor Author

Addressed the two CodeRabbit findings in `SKILL.md`:

  • MD040 / MD031 (line 77): Added `text` language specifier to the fenced example block and added a blank line before it.
  • MD032 (line 151): Added a blank line between the `Tips:` header and the following list inside the blockquote.

Both files now pass `markdownlint` locally. CI should be green on the new commit.

Address review comments from copilot-pull-request-reviewer, coderabbitai:

- SKILL.md Step 2: add service_account_roles: top-level wrapper to both
  template and example blocks for consistency with secrets-management.md
  and the actual iam-service-accounts-definitions.yaml schema
  (per copilot-pull-request-reviewer)
- SKILL.md Step 4 serviceaccount.yaml: add {{- if .Values.serviceAccount.create }}
  guard; replace non-existent include helpers with inline {{ .Chart.Name }}
  and {{ .Values.serviceAccount.name | default .Chart.Name }}; add namespace
  and app label to match real service chart pattern
  (per copilot-pull-request-reviewer)
- SKILL.md Step 4 secretstore.yaml: update apiVersion from v1beta1 to v1;
  replace include helpers with direct Chart.Name references; add namespace
  (per copilot-pull-request-reviewer, coderabbitai)
- SKILL.md Step 4 externalsecret.yaml: update apiVersion from v1beta1 to v1;
  replace include helpers with direct Chart.Name references; add
  {{- if .Values.externalSecretsOperator.externalSecret.data }} guard to
  prevent rendering empty data block; update data item shape to
  .secretKey/.remoteRef.key/.remoteRef.property matching real chart pattern;
  add deletionPolicy: Retain and namespace
  (per copilot-pull-request-reviewer)
- SKILL.md values.yaml example: update data: shape to show .secretKey /
  .remoteRef.key / .remoteRef.property structure

Resolves 21 review threads (threads 1-2 were fixed in previous commit).

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Copilot AI review requested due to automatic review settings June 1, 2026 07:07
@andrest50

Copy link
Copy Markdown
Contributor Author

Review Feedback Addressed

Commits: 0b7429a (prior), d8b20e9 (this iteration)

Changes Made (d8b20e9)

All changes are in lfx_one/skills/lfx-v2-secrets/SKILL.md:

  • Step 2 — service_account_roles: wrapper: Added the top-level service_account_roles: key to both the template block and the invite-service example, making it consistent with secrets-management.md Step 6 and the actual iam-service-accounts-definitions.yaml file (per copilot-pull-request-reviewer)
  • Step 4 serviceaccount.yaml: Added {{- if .Values.serviceAccount.create }} / {{- end }} guard; replaced non-existent include helper calls with inline {{ .Chart.Name }} and {{ .Values.serviceAccount.name | default .Chart.Name }} to match the real service chart pattern (per copilot-pull-request-reviewer)
  • Step 4 secretstore.yaml: Updated apiVersion from external-secrets.io/v1beta1v1; replaced include helper calls with direct {{ .Chart.Name }} references; added namespace: {{ .Release.Namespace }} (per copilot-pull-request-reviewer)
  • Step 4 externalsecret.yaml: Updated apiVersion from v1beta1v1; replaced include helpers with direct references; added {{- if .Values.externalSecretsOperator.externalSecret.data }} guard to prevent rendering an empty data: block; updated data item shape to .secretKey / .remoteRef.key / .remoteRef.property matching the real chart pattern; added deletionPolicy: Retain (per copilot-pull-request-reviewer)
  • values.yaml example: Updated data: shape to show the correct .secretKey / .remoteRef.key / .remoteRef.property structure

Fixed in Prior Commit (0b7429a)

  • SKILL.md line 77: Added text language specifier and blank line before example block — MD040/MD031 (per coderabbitai)
  • SKILL.md line 151: Added blank line after **Tips**: inside blockquote — MD032 (per coderabbitai)

Threads Resolved

23 of 23 unresolved threads addressed and resolved.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Rearrange step-by-step procedure so first-time infrastructure setup
(Steps 1-7: IAM role, ServiceAccount, SecretStore, ExternalSecret,
values.yaml, argocd values, local dev) comes before per-secret steps
(Steps 8-12: 1Password, YAML config, PR, deploy, consume in K8s).

Add a prominent callout at the top of the procedure: services already
wired can skip directly to Step 8.

Update AWS Secrets Manager tag format throughout from the legacy
service: <name> to the current service-<name>: enabled convention.
This format allows a single secret to carry tags for multiple consuming
services simultaneously. Updates affect:
- Service Tag Integration section (description + role name example)
- Mermaid architecture diagram (ASM and ExternalSecret labels)
- ExternalSecret tag-discovery template (new format listed first)
- Configuration Example (destinations.aws_secretsmanager.tags)
- Configuration Breakdown (tags field description)

Fix outdated role name example (k8s-secret-access-pcc -> lfx-v2-pcc).
Fix cross-references from step renumbering throughout prose.
Fix prose typo: "and the in the corresponding" -> "and in the".

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@lfx_one/secrets-management.md`:
- Around line 602-604: The product name casing is inconsistent: change the
lowercase "argocd" in the sentence that mentions "extending the
`externalSecretsOperator.externalSecret.data` list in the argocd values
(explicit data)" to the proper "ArgoCD" so it matches the rest of the document
and maintains consistent capitalization.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0b1baf8-d22f-4e27-ad26-95e66925516d

📥 Commits

Reviewing files that changed from the base of the PR and between d8b20e9 and 23d30cd.

📒 Files selected for processing (1)
  • lfx_one/secrets-management.md

Comment thread lfx_one/secrets-management.md Outdated
Address review comments from copilot-pull-request-reviewer:

- SKILL.md: replace envs: with environments: in all lfx-secrets-management
  YAML examples (Mode 1 template, Mode 1 example, Mode 2 template, and
  tips text) to match the schema documented in secrets-management.md
- SKILL.md: replace fields: <scalar> with json_fields: [list] in all three
  onepassword source blocks (Mode 1 template, Mode 1 example, Mode 2
  template) to match the actual lfx-secrets-management schema
- SKILL.md: fix argocd values externalSecret.data item shape from
  {key, path} to {secretKey, remoteRef: {key}} in both the Mode 1
  global values example and the Mode 2 values example, aligning with
  the ExternalSecret template that ranges over these items
- SKILL.md: update Mode 2 deployment secretKeyRef name from hard-coded
  {{ .Chart.Name }} to {{ .Values.app.jwtSecretName | default .Chart.Name }}
  for consistency with Mode 1's values-driven approach
- secrets-management.md: clarify that serviceAccount.create defaults to
  true (SA always created) while global.awsRegion and
  externalSecretsOperator.enabled default to off; the prior wording
  "all default to off" was misleading

Resolves 11 review threads.

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Copilot AI review requested due to automatic review settings June 1, 2026 07:30
@andrest50

Copy link
Copy Markdown
Contributor Author

Review Feedback Addressed

Commit: 3d33acd

Changes Made

`lfx_one/skills/lfx-v2-secrets/SKILL.md` (per copilot-pull-request-reviewer):

  • `envs:` → `environments:` in all lfx-secrets-management YAML examples — Mode 1 template, Mode 1 invite-service example, Mode 2 template, and the tips blockquote — to match the key name in `secrets-management.md` and the actual schema
  • `fields: ` → `json_fields: [list]` in all three `source.onepassword` blocks (Mode 1 template, Mode 1 example, Mode 2 template) to match the `source.onepassword.json_fields` schema documented elsewhere
  • ArgoCD values `data` shape fixed from `{key, path}` → `{secretKey, remoteRef: {key}}` in both the Mode 1 global values example and the Mode 2 values example, aligning with the ExternalSecret template that iterates over these items
  • Mode 2 deployment `secretKeyRef.name` updated from hard-coded `{{ .Chart.Name }}` to `{{ .Values.app.jwtSecretName | default .Chart.Name }}` for consistency with Mode 1

`lfx_one/secrets-management.md` (per copilot-pull-request-reviewer):

  • Default values wording clarified: `serviceAccount.create` defaults to `true` (ServiceAccount is always created); `global.awsRegion` and `externalSecretsOperator.enabled` default to off and gate the SecretStore/ExternalSecret resources

Threads Resolved

11 of 11 unresolved threads addressed and resolved.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx_one/secrets-management.md Outdated
Comment thread lfx_one/skills/lfx-v2-secrets/SKILL.md Outdated
…istency

Address review comments from coderabbitai, copilot-pull-request-reviewer:

- secrets-management.md: fix ArgoCD casing in prose (was lowercase argocd)
  (per coderabbitai)
- secrets-management.md mermaid diagram: update SA role labels from
  k8s-secret-access-pcc to lfx-v2-pcc and ExternalSecret filter labels
  from Filters by service: pcc to Filters by service-pcc: enabled to match
  the updated tag and IRSA naming conventions throughout the document
  (per copilot-pull-request-reviewer)
- SKILL.md Mode 1 template: add destinations.aws_secretsmanager.tags
  (service-<service>: enabled), accounts mapping (dev/staging/prod), and
  fix regions from scalar to list form — required for IRSA tag-scoped
  access and consistent with the secrets-management.md Configuration Example
  (per copilot-pull-request-reviewer)
- SKILL.md Mode 1 invite-service example: same additions as template
  (per copilot-pull-request-reviewer)
- SKILL.md Mode 2 template: same additions as Mode 1 template
  (per copilot-pull-request-reviewer)
- SKILL.md verification checklist: fix fields: reference to json_fields:
  (per copilot-pull-request-reviewer)
- SKILL.md eso_service_tag note: correct the description — eso_service_tag
  scopes the IAM role's Secrets Manager access policy and must match the
  service-* AWS tag; it is not read by lfx-secrets-management directly
  (per copilot-pull-request-reviewer)

Resolves 7 review threads.

Jira: https://linuxfoundation.atlassian.net/browse/LFXV2-1783

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
@andrest50

Copy link
Copy Markdown
Contributor Author

Review Feedback Addressed

Commit: ca698e2

Changes Made

`lfx_one/secrets-management.md`:

  • ArgoCD casing: Fixed lowercase `argocd` → `ArgoCD` in closing prose of Step 7 (per coderabbitai)
  • Mermaid diagram: Updated remaining stale references — SA role labels changed from `k8s-secret-access-pcc` to `lfx-v2-pcc`; ExternalSecret filter labels changed from `Filters by service: pcc` to `Filters by service-pcc: enabled` (per copilot-pull-request-reviewer)

`lfx_one/skills/lfx-v2-secrets/SKILL.md`:

  • Mode 1 lfx-secrets-management template: Added `destinations.aws_secretsmanager.tags` (`service-: enabled`), `accounts` mapping (dev/staging/prod), and converted `regions` from scalar to list — required for IRSA tag-scoped access (per copilot-pull-request-reviewer)
  • Mode 1 invite-service example: Same schema additions (per copilot-pull-request-reviewer)
  • Mode 2 lfx-secrets-management template: Same schema additions (per copilot-pull-request-reviewer)
  • Verification checklist: Updated `fields:` reference to `json_fields:` (per copilot-pull-request-reviewer)
  • eso_service_tag note: Corrected description — `eso_service_tag` scopes the IAM role's Secrets Manager access policy and must match the `service-*` AWS tag; it is not read by lfx-secrets-management directly (per copilot-pull-request-reviewer)

Threads Resolved

7 of 7 unresolved threads addressed and resolved.

@andrest50 andrest50 changed the title [LFXV2-1783] docs(secrets): fill Step 6 gap with end-to-end new-service setup [LFXV2-1783] docs(secrets): complete secrets management guide with new-service setup procedure Jun 1, 2026
@andrest50 andrest50 changed the title [LFXV2-1783] docs(secrets): complete secrets management guide with new-service setup procedure docs(secrets): complete secrets management guide with new-service setup procedure Jun 1, 2026
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 1, 2026 19:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 13 comments.

Comment on lines 355 to +358
## Step-by-Step Process

### 1. Add Secret to 1Password
> **Already set up?** If your service already has an IAM role, ServiceAccount, SecretStore, and
> ExternalSecret configured, **skip to [Step 4](#4-add-secret-to-1password)** to add a new secret.
Comment thread lfx_one/secrets-management.md Outdated
- **External Secrets Operator**: Automatically discovers and merges secrets into Kubernetes
- **IRSA Authentication**: Secure role assumption without storing credentials
- **10-minute Refresh**: Secrets are automatically refreshed every 10 minutes
- **Event-Based Refresh**: An AWS Lambda listens for tagged secret updates/creations for automatic refreshing of External Secrets Operator
subgraph "Dev External Secrets"
SS1["pcc-secret-store<br/>🏪 SecretStore<br/>🔗 Uses IRSA"]
ES1["pcc-secrets<br/>📊 ExternalSecret<br/>🏷️ Filters by service: pcc<br/>⏱️ Refreshes every 10m"]
ES1["pcc-secrets<br/>📊 ExternalSecret<br/>🏷️ Filters by service-pcc: enabled<br/>⏱️ Refreshes every 10m"]
Comment thread lfx_one/secrets-management.md Outdated
3. **Deployment**: GitHub Actions deploy secrets to AWS Secrets Manager with appropriate tags
4. **Discovery**: External Secrets Operator uses IRSA to authenticate and discover tagged secrets
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed every 10 minutes
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed upon event
Comment on lines +484 to +488
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: lfx-v2-myresource-service
namespace: lfx-v2-myresource-service
production: LFX V2 - Production
item: LiteLLM LFXv2 Key
json_fields:
fields:
- **Environments**: List of environments where this secret should be deployed
- **Source**: 1Password configuration with vault mappings and item details
- **source.onepassword.json_fields**: Specifies which fields from the 1Password item to include in the secret
- **source.onepassword.fields**: Specifies which fields from the 1Password item to include in the secret
Comment on lines +460 to +463
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::788942260905:role/lfx-v2-myresource-service
automountServiceAccountToken: true
Comment thread lfx_one/secrets-management.md Outdated

### 1Password Item Field Names

The `fields` configuration when using 1Password as a source determins the name of the secret value
Comment thread lfx_one/secrets-management.md Outdated
`lfx-v2-pcc` service account uses role `arn:aws:iam::788942260905:role/lfx-v2-pcc` in dev to only
access secrets tagged `"aws:ResourceTag/service-pcc": "enabled"`
2. **Auto-Discovery**: The External Secrets Operator automatically finds and merges all secrets with the
service tag into a single Kubernetes Secret. Then, the approriate Secret Store is annotated for sync.
agaetep added 2 commits June 1, 2026 15:52
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 2, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 9 comments.

Comment thread lfx_one/secrets-management.md Outdated
Comment on lines +63 to +66
- **Tag-Based Access**: Services only access secrets tagged with their service name
- **External Secrets Operator**: Automatically discovers and merges secrets into Kubernetes
- **IRSA Authentication**: Secure role assumption without storing credentials
- **10-minute Refresh**: Secrets are automatically refreshed every 10 minutes
- **Event-Based Refresh**: An AWS Lambda listens for tagged secret updates/creations for automatic refreshing of External Secrets Operator
Comment on lines 204 to 209
1. **Source**: Secrets are stored in environment-specific 1Password vaults
2. **Configuration**: YAML files define the secret mapping and deployment rules
3. **Deployment**: GitHub Actions deploy secrets to AWS Secrets Manager with appropriate tags
4. **Discovery**: External Secrets Operator uses IRSA to authenticate and discover tagged secrets
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed every 10 minutes
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed upon event
6. **Consumption**: Applications reference the service account and secret to access environment variables
Comment thread lfx_one/secrets-management.md Outdated
`lfx-v2-pcc` service account uses role `arn:aws:iam::788942260905:role/lfx-v2-pcc` in dev to only
access secrets tagged `"aws:ResourceTag/service-pcc": "enabled"`
2. **Auto-Discovery**: The External Secrets Operator automatically finds and merges all secrets with the
service tag into a single Kubernetes Secret. Then, the approriate Secret Store is annotated for sync.
Comment thread lfx_one/secrets-management.md Outdated

### 1Password Item Field Names

The `fields` configuration when using 1Password as a source determins the name of the secret value
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::788942260905:role/lfx-v2-myresource-service
automountServiceAccountToken: true
Comment on lines +499 to +502
decodingStrategy: None
tags:
service-lfx-v2-myresource-service: enabled
rewrite:
Comment on lines +560 to +563
decodingStrategy: None
tags:
service-lfx-v2-myresource-service: enabled
rewrite:
Comment thread lfx_one/secrets-management.md Outdated
Comment on lines +380 to +386
By default, the namespace, service account name, and service tag are the same as the top level
entry of the service account role. In the case above, when this PR is merged and applied by CI,
OpenTofu creates per environment:

- An IAM role `lfx-v2-myresource-service` with an OIDC trust policy bound to
`system:serviceaccount:myresource-service:lfx-v2-myresource-service`
- Tag-scoped `secretsmanager:GetSecretValue` policies granting access to secrets tagged either
Comment thread lfx_one/secrets-management.md Outdated
The `annotations` block is empty by default and is populated per environment in `lfx-v2-argocd`
with the IRSA role ARN (shown below).

### Register the service account:
agaetep added 2 commits June 2, 2026 10:11
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 2, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 8 comments.

Comment on lines 49 to 52
- **Centralized Management**: All secrets are managed through a single repository
- **Environment Isolation**: Separate vaults and AWS accounts for dev, staging, and production
- **Automated Deployment**: Secrets are deployed using GitHub Actions or local tooling
- **Automated Deployment**: Secrets are deployed using GitHub Actions
- **Security**: Secrets never leave secure storage systems during transit
Comment on lines 63 to +67
- **Tag-Based Access**: Services only access secrets tagged with their service name
- **External Secrets Operator**: Automatically discovers and merges secrets into Kubernetes
- **IRSA Authentication**: Secure role assumption without storing credentials
- **10-minute Refresh**: Secrets are automatically refreshed every 10 minutes
- **Event-Based Refresh**: An AWS Lambda listens for tagged secret updates/creations for automatic
refreshing of External Secrets Operator
Comment on lines 205 to 210
1. **Source**: Secrets are stored in environment-specific 1Password vaults
2. **Configuration**: YAML files define the secret mapping and deployment rules
3. **Deployment**: GitHub Actions deploy secrets to AWS Secrets Manager with appropriate tags
4. **Discovery**: External Secrets Operator uses IRSA to authenticate and discover tagged secrets
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed every 10 minutes
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed upon event via Lambda
6. **Consumption**: Applications reference the service account and secret to access environment variables
Comment on lines +361 to +366
The steps below are split into two phases:

- **First-time setup (Steps 1–3):** One-time infrastructure wiring for a new service across three
repositories. Do this once per service.
- **Adding a secret (Steps 4–8):** Repeat these steps each time you need to add a new secret to
the service.
Comment thread lfx_one/secrets-management.md Outdated
Comment on lines +382 to +387
By default, the namespace, service account name, and service tag are the same as the top level
entry of the service account role. In the case above, when this PR is merged and applied by CI,
OpenTofu creates per environment:

- An IAM role `lfx-v2-myresource-service` with an OIDC trust policy bound to
`system:serviceaccount:myresource-service:lfx-v2-myresource-service`
Comment on lines +461 to +465
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::788942260905:role/lfx-v2-myresource-service
automountServiceAccountToken: true
```
Comment thread lfx_one/secrets-management.md Outdated
Comment on lines +608 to +612
directory. See the [Configuration Example](#configuration-example) for the full schema.

The key field to note is `destinations.aws_secretsmanager.tags` — use `service-<name>: enabled`
format (e.g., `service-myresource: enabled`) to tag the secret for each service the secret needs
to be deployed into.
Comment thread lfx_one/secrets-management.md Outdated
Comment on lines +388 to +390
- Tag-scoped `secretsmanager:GetSecretValue` policies granting access to secrets tagged either
`service-myresource = enabled` or `service = myresource`

agaetep added 2 commits June 4, 2026 12:07
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 15, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 7 comments.

Comment thread lfx_one/secrets-management.md Outdated
conversionStrategy: Default
decodingStrategy: None
tags:
service-lfx-v2-myresource-service: enabled
conversionStrategy: Default
decodingStrategy: None
tags:
service-lfx-v2-myresource-service: enabled
Comment on lines +66 to +67
- **Event-Based Refresh**: An AWS Lambda listens for tagged secret updates/creations for automatic
refreshing of External Secrets Operator
3. **Deployment**: GitHub Actions deploy secrets to AWS Secrets Manager with appropriate tags
4. **Discovery**: External Secrets Operator uses IRSA to authenticate and discover tagged secrets
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed every 10 minutes
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed upon event via Lambda
make audit-aws ACCOUNTS="lfx-development"
```

## Best Practices
Comment on lines +363 to +366
- **First-time setup (Steps 1–3):** One-time infrastructure wiring for a new service across three
repositories. Do this once per service.
- **Adding a secret (Steps 4–8):** Repeat these steps each time you need to add a new secret to
the service.
agaetep added 2 commits June 15, 2026 15:46
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 16, 2026 20:34
Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.

Comment on lines +66 to +67
- **Event-Based Refresh**: An AWS Lambda listens for tagged secret updates/creations for automatic
refreshing of External Secrets Operator
Comment on lines 208 to 210
4. **Discovery**: External Secrets Operator uses IRSA to authenticate and discover tagged secrets
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed every 10 minutes
5. **Synchronization**: Secrets are merged into Kubernetes secrets and refreshed upon event via Lambda
6. **Consumption**: Applications reference the service account and secret to access environment variables
Comment on lines +454 to +456
In the [lfx-v2-argocd](https://github.com/linuxfoundation/lfx-v2-argocd) repository, in
**`values/dev/lfx-v2-myresource-service.yaml`** (repeat for staging and prod with the
matching account ID) — set the AWS region and the IRSA role ARN:
data:
- secretKey: username
remoteRef:
key: /cloudops/lfx-v2/myresource-username
Comment on lines +698 to +706
envs: [development, staging, production]
source:
onepassword:
vaults:
development: LFX V2 - Development
staging: LFX V2 - Staging
production: LFX V2 - Production
item: LiteLLM LFXv2 Key
json_fields:
fields:
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.

3 participants