Skip to content

feat: secrets management skill#60

Open
agaetep wants to merge 13 commits into
mainfrom
agaete/secrets-management
Open

feat: secrets management skill#60
agaetep wants to merge 13 commits into
mainfrom
agaete/secrets-management

Conversation

@agaetep

@agaetep agaetep commented Jun 5, 2026

Copy link
Copy Markdown

Adds a new Claude Code skill lfx-v2-secrets/SKILL.md that guides an agent through wiring up secrets for LFX V2 services using External Secrets Operator + IRSA on AWS.

Signed-off-by: Antonia Gaete <agaete@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 5, 2026 20:36

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

Adds a new lfx-v2-secrets skill documenting the standard workflow for managing LFX V2 microservice secrets via External Secrets Operator (ESO) + IRSA on AWS, covering both full initial setup and incremental secret additions.

Changes:

  • Introduces a new lfx-v2-secrets/SKILL.md with two operational modes (new service vs. existing service).
  • Documents end-to-end steps spanning lfx-v2-opentofu, lfx-secrets-management, service Helm chart changes, and lfx-v2-argocd.
  • Provides templates, verification checklists, and common troubleshooting workflows.

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

Comment thread lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md
Comment thread lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md
agaetep added 2 commits June 5, 2026 16:44
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 5, 2026 20:52

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 thread skills/lfx-v2-secrets/SKILL.md Outdated
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken | default true }}
Comment thread lfx-v2-secrets/SKILL.md Outdated

Ask the user to collect:

1. **Service name** — fully qualified name (e.g., `lfx-v2-invite-service`, `lfx-v2-email-service`)
Comment thread lfx-v2-secrets/SKILL.md Outdated
|------|-------|
| AWS Region | `us-west-2` |
| K8s Secret name | `lfx-v2-<service>-secrets` (e.g., `lfx-v2-invite-service-secrets`) |
| SecretStore name | `{{ .Chart.Name }}` |
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
conversionStrategy: Default
decodingStrategy: None
tags:
service-lfx-v2-<service>: enabled
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
>
> - Each secret in the lfx-secrets-management source becomes a separate AWS SM path entry
> - The `path` convention is `cloud/<service-short-name>/<secret-group>`
> - Use the `environments` list to sync to all three environments in parallel
detjensrobert
detjensrobert previously approved these changes Jun 5, 2026

@detjensrobert detjensrobert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good!

Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +158 to +169
> **Important**: All secrets must be stored as JSON in AWS SM, even single-field ones.
> Two equivalent ways to express this:
>
> ```yaml
> # implicit JSON (list form)
> fields:
> - <field_name>
>
> # explicit JSON (scalar + flag)
> fields: <field_name>
> store_as_json: true
> ```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this a new requirement from AWS SM? I don't remember this being a restriction for previous secrets.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is a kubernetes ESO requirement, based on how we use dataFrom to pull secrets into a single secret store. A single string without a key causes errors in the secret store pull

dealako and others added 2 commits June 10, 2026 09:34
Copilot AI review requested due to automatic review settings June 15, 2026 17:49

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.

whenever someone says "set up secrets", "wire up ESO", "add a secret to this service",
"IRSA configuration", "External Secrets for V2", or any mention of AWS Secrets Manager
integration with Kubernetes for LFX V2 services.
allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, WebFetch
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +313 to +314
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken | default true }}
{{- end }}
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +377 to +378
tags:
service-lfx-v2-<service>: enabled
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +386 to +388
> **Tag-based discovery**: ESO finds and merges all AWS SM secrets tagged
> `service-lfx-v2-<service>: enabled` into a single Kubernetes Secret named
> `lfx-v2-<service>-secrets`. No manual `data` list is needed — new secrets are picked up
Comment thread lfx-v2-secrets/SKILL.md Outdated
|------|-------|
| AWS Region | `us-west-2` |
| K8s Secret name | `lfx-v2-<service>-secrets` (e.g., `lfx-v2-invite-service-secrets`) |
| SecretStore name | `{{ .Chart.Name }}` |
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated

Then ask the user to collect:

1. **Service name** — fully qualified name (e.g., `lfx-v2-invite-service`, `lfx-v2-email-service`)
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
| IAM account — staging | `844790888233` |
| IAM account — prod | `372256339901` |
| IRSA role ARN pattern | `arn:aws:iam::<account-id>:role/lfx-v2-<service>` |
| AWS SM path pattern | `cloud/<3rd-party-service>/<name_or_identifier>` |
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
```yaml
<Secret Name>:
tags: [auth0, <service_tag>]
envs: [development, staging, production]
Copilot AI review requested due to automatic review settings June 15, 2026 21:17

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 6 comments.

Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +1 to +5
---
name: lfx-v2-secrets
description: >
Guide an agent through wiring up secrets for LFX V2 microservices using External Secrets
Operator (ESO) + IRSA. Supports two modes: (1) full setup for new services touching
whenever someone says "set up secrets", "wire up ESO", "add a secret to this service",
"IRSA configuration", "External Secrets for V2", or any mention of AWS Secrets Manager
integration with Kubernetes for LFX V2 services.
allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, WebFetch
Comment thread lfx-v2-secrets/SKILL.md Outdated
Comment thread lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
agaetep added 2 commits June 15, 2026 14:39
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 21:42

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 6 comments.

Comment on lines +1 to +12
---
name: lfx-v2-secrets
description: >
Guide an agent through wiring up secrets for LFX V2 microservices using External Secrets
Operator (ESO) + IRSA. Supports two modes: (1) full setup for new services touching
lfx-v2-opentofu, lfx-secrets-management, the service Helm chart, and lfx-v2-argocd;
(2) adding secrets to existing services already configured with ESO. Use this skill
whenever someone says "set up secrets", "wire up ESO", "add a secret to this service",
"IRSA configuration", "External Secrets for V2", or any mention of AWS Secrets Manager
integration with Kubernetes for LFX V2 services.
allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion, WebFetch
---
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +185 to +189
<Secret Name>:
tags: [lfx_v2, <service_tag>, <type_tag>]
environments: [development, staging, production]
source:
onepassword:
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +221 to +224
- aws_secretsmanager:
tags:
service: pcc
path: cloud/supabase/api_key
Comment on lines +314 to +324
metadata:
name: {{ .Values.serviceAccount.name | default .Chart.Name }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Chart.Name }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken | default true }}
{{- end }}
Comment on lines +387 to +389
tags:
service-lfx-v2-<service>: enabled
rewrite:
Comment on lines +396 to +399
> **Tag-based discovery**: ESO finds and merges all AWS SM secrets tagged
> `service-lfx-v2-<service>: enabled` into a single Kubernetes Secret named
> `lfx-v2-<service>-secrets`. No manual `data` list is needed — new secrets are picked up
> automatically after the next sync.
agaetep added 2 commits June 15, 2026 14:55
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:12

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 6 comments.

2. ESO's **SecretStore** uses that ServiceAccount's JWT token to authenticate to AWS
3. ESO watches **ExternalSecret** manifests and syncs matching secrets from AWS SM into K8s Secrets
4. Application deployments reference the K8s Secret via environment variable or volume mount
5. Local development skips ESO entirely and injects secret values directly via `environment` in values
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated

Then ask the user to collect:

1. **Service name** — fully qualified name (e.g., `lfx-v2-invite-service`, `lfx-v2-email-service`)
**1Password example:**

```text
Service: lfx-v2-invite-service
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
`auth0` (client_secret, simpler M2M or BFF clients):

```text
Service: lfx-v2-invite-service
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
`auth0_jwt` (JWT private key, standard for LFX V2 microservices):

```text
Service: lfx-v2-invite-service
Comment thread skills/lfx-v2-secrets/SKILL.md Outdated
Comment on lines +229 to +231
> - Each secret in the lfx-secrets-management source becomes a separate AWS SM path entry
> - The `path` convention is `cloud/<service-short-name>/<secret-group>`
> - Use the `envs` list to sync to all three environments in parallel
agaetep added 2 commits June 15, 2026 15:39
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

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 2 comments.

>
> - Each secret becomes a separate AWS SM path entry
> - The `path` must include the service name: `<3rd-party-service>/<service>` (e.g., `atlassian/lfx-v2-committee-service`)
> - The `tags` list must include the service tag (`eso_service_tag` from Step 2a) so the secret is identifiable by service
Comment on lines +323 to +325
In the [lfx-secrets-management](https://github.com/linuxfoundation/lfx-secrets-management) repo,
add an entry for each secret to `secrets/lfx/<service>.yml` — one file per LFX V2 service.
If the file doesn't exist yet, create it. If it already exists, append the new entry.
@agaetep agaetep requested a review from a team June 17, 2026 14:10
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.

4 participants