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

aws-for-fluent-bit chart missing rbac serviceaccount role arn annotation #395

Open
rojomisin opened this issue Dec 14, 2020 · 2 comments · May be fixed by #1168
Open

aws-for-fluent-bit chart missing rbac serviceaccount role arn annotation #395

rojomisin opened this issue Dec 14, 2020 · 2 comments · May be fixed by #1168
Assignees

Comments

@rojomisin
Copy link

how do we pass the role arn for the service account? annotation?

docs list duplicate key too
Screen Shot 2020-12-14 at 3 08 10 PM

is one of those meant to show how to pass a role 🤞

@andynelson
Copy link
Contributor

You can do this by setting the following in values.yaml

serviceAccount:
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::***YOUR AWS ACCOUNT NUMBER***:role/***NAME OF YOUR ROLE***

The role needs to trust the OIDC issuer for your cluster - put this into the role's trust relationship policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowFromOIDC",
      "Effect": "Allow",
      "Principal": {
        "Federated": "arn:aws:iam::***YOUR AWS ACCOUNT NUMBER***:oidc-provider/oidc.eks.***REGION***.amazonaws.com/id/***ID***"
      },
      "Action": "sts:AssumeRoleWithWebIdentity",
      "Condition": {
        "StringEquals": {
          "oidc.eks.***REGION***.amazonaws.com/id/***ID***:sub": "system:serviceaccount:***KUBERNETES NAMESPACE***:***SERVICE ACCOUNT NAME***"
        }
      }
    }
  ]
}

@RalphSleighK
Copy link

This just tripped me up, the values.yaml has

serviceAccount:
  create: true
  annotations: {}
  name:

...

annotations:
  {}
  # iam.amazonaws.com/role: arn:aws:iam::123456789012:role/role-for-fluent-bit

Suggesting the role goes in annotations rather than serviceAccount.annotations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants