Repository navigation
feat(chart): IRSA web-identity for AWS creds, retire static key (#257) - #258
Merged
Merged
Conversation
…257) Migrate aether off the static IAM access key onto IRSA web-identity (self-hosted pod-identity-webhook + irsa.palermo.dev). Code inventory corrected the issue's premise: the AGENT never calls AWS — it reaches the registry only via the registrar (NewRegistrarRegistry), and agent/internal/awsconfig was dead code imported by nothing. AWS is used solely by the REGISTRAR's dynamodb backend (NewDynamoDBRegistry). So: - Agent: drop the vestigial AWS_ACCESS_KEY_ID/SECRET env (it was mounted, never read), agent-secret.yaml, agent.awsCredentials values, the awsSecretName helper, and the dead agent/internal/awsconfig package. The agent SA gets no role (it needs no AWS). - Registrar: replace the static envFrom secretRef with IRSA — annotate the registrar SA with eks.amazonaws.com/role-arn when registrar.aws.roleArn is set (the webhook injects AWS_ROLE_ARN + a projected token). Keep AWS_REGION as a plain env. Values: registrar.aws.{region, roleArn} (was credentialsSecret). - aether chart 0.17.0. No static keys anywhere in the chart now. The IRSA role is dormant on the etcd/kubernetes backends and assumed only by the dynamodb backend. AWS-side work (create the registrar IRSA role, delete the talos-main-aether-agent IAM user) is tracked in #257 and done out-of-band. Build green; helm renders the SA annotation only when roleArn set, and zero AWS creds otherwise. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the app/chart side of #257 — migrate aether off the static IAM access key onto IRSA web-identity. (AWS IAM steps — create the role, delete the user — are out-of-band, below.)
Key correction to the issue's premise
A code inventory showed 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's dynamodb backend (NewDynamoDBRegistry). The agent'sAWS_ACCESS_KEY_ID/SECRETmount was vestigial — present, never read. So only the registrar needs a role, and only for DynamoDB.Changes
agent-daemonset.yaml),agent-secret.yaml,agent.awsCredentialsvalues, theawsSecretNamehelper, and the deadagent/internal/awsconfigpackage. No SA role.envFromsecretRef; the registrar SA is annotatedeks.amazonaws.com/role-arnwhenregistrar.aws.roleArnis set (webhook injectsAWS_ROLE_ARN+ token). KeptAWS_REGION. Values:registrar.aws.{region, roleArn}(wascredentialsSecret).Validation
bazel build //...green;helm templaterenders the role-arn annotation only whenroleArnis set and zero AWS-cred env/secret otherwise.Remaining (AWS side, account
988966554486— out of band)talos-main-aether-agentinline policy (DynamoDB perms).talos-main-aether-registrar-irsa(trustirsa.palermo.dev, subsystem:serviceaccount:aether-system:aether-registrar, audsts.amazonaws.com; inline = the perms). No agent role.registrar.aws.roleArn, deploy.python:3.12-slim+boto3 pod on the registrar SA (theamazon/aws-cliARMv8.2 crash).rmthe local gitignoredagent/deploy/secrets.yaml.🤖 Generated with Claude Code