Repository navigation
Closed
Description
Context
Every other workload on the talos-main cluster has been migrated off static AWS access keys onto IRSA web-identity (self-hosted amazon-eks-pod-identity-webhook + the irsa.palermo.dev OIDC issuer). The aether mesh is the last workload still using a static IAM access key.
The cluster-side mechanism is already fully in place — no cluster changes are needed. The webhook injects AWS_ROLE_ARN + a projected SA token into any pod whose ServiceAccount carries an eks.amazonaws.com/role-arn annotation (including initContainers). AWS validates those tokens against irsa.palermo.dev (OIDC provider already published, served via Envoy directResponse). All that's left is on the app + AWS side, which is why this lives here.
Current state (static creds)
- IAM user
talos-main-aether-agent(1 access key, 1 inline policy) — credentials inAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY. - Consumers (both reference that user's key):
- agent — DaemonSet, SA
aether-agent(charts/aether/templates/agent-daemonset.yaml) - registrar — Deployment (
charts/aether/templates/registrar-deployment.yaml)
- agent — DaemonSet, SA
- Static creds Secret:
charts/aether/templates/agent-secret.yaml.
Cutover plan
- Inventory the perms — read the
talos-main-aether-agentIAM user's inline policy (the exactAction/Resource). Confirm the registrar's SA name and whether agent + registrar need the same perms. - Create IRSA role(s) in account
988966554486(e.g.talos-main-aether-agent-irsa, + a registrar role if its SA differs):- Trust:
Federated=arn:aws:iam::988966554486:oidc-provider/irsa.palermo.dev,sts:AssumeRoleWithWebIdentity - Conditions:
irsa.palermo.dev:aud = sts.amazonaws.comandirsa.palermo.dev:sub = system:serviceaccount:aether-system:<sa> - Inline policy = the perms from step 1.
- (One role can serve both SAs via
StringLikeon:sub, or use two roles — preference.)
- Trust:
- Chart changes (
charts/aether):- Annotate the agent + registrar ServiceAccounts:
eks.amazonaws.com/role-arn: <role-arn>. - Remove the static AWS env (
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/ theagent-secretsecretRef/envFrom) and dropagent-secret.yaml. - Keep
AWS_REGIONas a plain env (the webhook injects onlyAWS_ROLE_ARN+ the token file; the webhook'sdefaultAwsRegionalso injects a region).
- Annotate the agent + registrar ServiceAccounts:
- Deploy via the usual CI/OCI path.
- Validate each pod assumes its role before deleting the key — e.g. a throwaway pod using the SA running
sts:get-caller-identity+ the relevant AWS op. - Delete the
talos-main-aether-agentIAM user + its access key.
Gotchas (learned during the talos-main migration)
- ARMv8.0 nodes:
amazon/aws-cli(Amazon Linux base) crashes with aglibc … requires ARMv8.2-afatal error on the Pi-class nodes. Usepython:3.12-slim+boto3for any validation pod. The real Go workloads are fine (Go binaries are ARMv8.0-safe). - The webhook does inject into initContainers (confirmed).
- For a PSS-restricted namespace, a validation pod needs
runAsNonRoot+runAsUser+ dropped caps +seccompProfile: RuntimeDefault(andpip install --targetsince non-root).
References
- Cluster IRSA setup + webhook +
irsa.palermo.devissuer live inbpalermo/k8s-talos-main(clusters/talos-main/{irsa-oidc,pod-identity-webhook}). - This is the same pattern already applied to
kustomize-controller,spire-int-rotator, andspire-server.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(chart): IRSA web-identity for AWS creds, retire the static key (#…
bpalermo commentedon Jun 22, 2026
Done — the static IAM key is fully retired.
App/chart side (PR #258, deployed talos-main
0.17.0rev 18)A code inventory corrected the issue's premise: the agent never calls AWS — it reaches the registry only via the registrar (
NewRegistrarRegistry), andagent/internal/awsconfigwas dead code imported by nothing. AWS is used only by the registrar'sdynamodbbackend. So:AWS_ACCESS_KEY_ID/SECRETenv (mounted, never read),agent-secret.yaml,agent.awsCredentials, theawsSecretNamehelper, and the deadawsconfigpackage. No SA role.envFromreplaced with IRSA — the registrar SA is annotatedeks.amazonaws.com/role-arnwhenregistrar.aws.roleArnis set (webhook injectsAWS_ROLE_ARN+ token).AWS_REGIONkept as plain env.AWS side — already done
Account
988966554486has only thetf-clouduser; the live secret's access key had no owning IAM user (an access key can't exist without one). Sotalos-main-aether-agentand its key were already gone — nothing to delete on the IAM side.Cleanup
aether-agent-aws-credentialsSecret (held an invalid key) after rolling the agent off it.agent/deploy/secrets.yaml.Deferred (not blocking)
The registrar IRSA role isn't needed yet — talos is on the etcd backend, so the registrar makes zero AWS calls. Create
talos-main-aether-registrar-irsa(trustirsa.palermo.dev, subsystem:serviceaccount:aether-system:aether-registrar) from theddbbackend's perms and setregistrar.aws.roleArnif/when DynamoDB is redeployed.Mesh healthy on
0.17.0: 13×1/1 + 2×2/2 (edge).