-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: updates serfice account token generation #17
base: master
Are you sure you want to change the base?
Conversation
This generates a token secret for the service account in compliance with kubernetes versions greater than 1.24. I also updated the versions in the README for folks who are lazy like me and just copy the thing and use it without checking it...
This generates a token secret for the service account in compliance with kubernetes versions greater than 1.24. I also updated the versions in the README for folks who are lazy like me and just copy the thing and use it without checking it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @revjtanton thanks for your contribution, appreciate it! Got one question for now.
@@ -55,5 +61,9 @@ resource "kubernetes_service_account" "alb_ingress_controller" { | |||
"eks.amazonaws.com/role-arn" = "arn:aws:iam::${var.account_id}:role/${aws_iam_role.alb-ingress-controller-iam-role.name}" | |||
} | |||
} | |||
automount_service_account_token = true | |||
secret { | |||
name = "alb-ingress-controller" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: without having tested this: I wonder if this is not possible? 🤔 If this is possible we could remove the depends_on
since we communicate the relation to Terraform.
name = "alb-ingress-controller" | |
name = kubernetes_secret.alb_ingress_controller.metadata.name |
@@ -55,5 +61,9 @@ resource "kubernetes_service_account" "alb_ingress_controller" { | |||
"eks.amazonaws.com/role-arn" = "arn:aws:iam::${var.account_id}:role/${aws_iam_role.alb-ingress-controller-iam-role.name}" | |||
} | |||
} | |||
automount_service_account_token = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: nice catch, this is indeed the default.
This generates a token secret for the service account in compliance with kubernetes versions greater than 1.24. I also updated the versions in the README for folks who are lazy like me and just copy the thing and use it without checking it...
What
Explain what changes inside the code, this can be as simple or complicated as you want as long as it's clear
Why
Explain why these things are changes. This explanation is for your colleagues and your future self.
Code Review
Please consider the following checklist when reviewing this Pull Request.
More background and details here.