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

fix: updates serfice account token generation #17

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stoopidJSON
Copy link

@stoopidJSON stoopidJSON commented Mar 16, 2023

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.

  • Does the code actually solve the problem it was meant to solve?
  • Is the code covered by unit tests? Integration tests?
  • Does anything here need documentation? (Focus on why, not what.)
  • Does any of this code deal with privacy sensitive information or affects security? Ask an additional reviewer.
  • Is the code easy to understand and change in the future?
  • Is the same code or concept duplicated? Find a balance between DRYness and readability.
  • Does the code reasonably adhere to the Kabisa coding standards?
  • Be kind.

Jason Anton and others added 4 commits March 16, 2023 19:44
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...
Copy link
Contributor

@tmeijn tmeijn left a 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"
Copy link
Contributor

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.

Suggested change
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
Copy link
Contributor

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.

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