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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotation support for serviceaccount #271

Merged
merged 4 commits into from
Jul 18, 2022

Conversation

dreampuf
Copy link
Contributor

@dreampuf dreampuf commented Apr 13, 2022

  • Annotation support for ServiceAccount resource.

Changes

In EKS, It's necessary to have an IAM role to associate with a service account. (details in link).
I added the ability to customize it.

Verification

You can test it via a common config:

local commonConfig = {
  local cfg = self,
  ...
  serviceAccountAnnotations: {
    "eks.amazonaws.com/role-arn": "arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME",
  },
}

The generated config would be like:

./manifests//thanos-bucket-serviceAccount.yaml:kind: ServiceAccount
./manifests//thanos-bucket-serviceAccount.yaml-metadata:
./manifests//thanos-bucket-serviceAccount.yaml-  annotations:
./manifests//thanos-bucket-serviceAccount.yaml-    arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

Looking good. Only one thing that caught my eye and the CI failures need to be fixed!

jsonnet/kube-thanos/kube-thanos-bucket-replicate.libsonnet Outdated Show resolved Hide resolved
Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

You need to format and generate examples. You can find the necessary commands to do these in the Makefile.

@dreampuf
Copy link
Contributor Author

@kakkoyun Re-generated doc and example code.

@kakkoyun kakkoyun merged commit f1928b8 into thanos-io:main Jul 18, 2022
@dreampuf dreampuf deleted the serviceaccount_annotation branch July 18, 2022 10:45
@dreampuf dreampuf restored the serviceaccount_annotation branch July 18, 2022 10:45
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.

2 participants