Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add managed-by label to eksctl created service accounts #3463

Merged
merged 2 commits into from Mar 22, 2021

Conversation

aclevername
Copy link
Contributor

Description

As part of #3422 we need to be able to track serviceaccounts that don't have CloudFormation stacks. SA's with no stacks are using the attachRoleARN functionality. Alternatively it might be that the stack was deleted, which we need to pick up on.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 馃く

  • Backfilled missing tests for code in same general area 馃帀
  • Refactored something and made the world a better place 馃専

@aclevername
Copy link
Contributor Author

---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: jk
  region: us-west-2

iam:
  withOIDC: true
  serviceAccounts:
  - metadata:
      name: s3-reader-1
      # if no namespace is set, "default" will be used;
      # the namespace will be created if it doesn't exist already
      namespace: default
    attachPolicyARNs:
    - "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
  - metadata:
      name: s3-reader-2
      # if no namespace is set, "default" will be used;
      # the namespace will be created if it doesn't exist already
      namespace: default
      labels: {aws-usage: "application"}
    attachPolicyARNs:
    - "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
k get serviceaccounts --show-labels
NAME          SECRETS   AGE    LABELS
default       1         106m   <none>
s3-reader-1   1         48s    app.kubernetes.io/managed-by=eksctl
s3-reader-2   1         48s    app.kubernetes.io/managed-by=eksctl,aws-usage=application

@aclevername aclevername enabled auto-merge (squash) March 22, 2021 14:01
@aclevername aclevername merged commit 3bf6a90 into eksctl-io:main Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants