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

Enhancements from web-platform #337

Merged
merged 4 commits into from
Mar 24, 2023
Merged

Conversation

errm
Copy link
Member

@errm errm commented Mar 17, 2023

📝 These are some enhancements we have been using on the web platform clusters for some time!

It would be great to merge them in so we can use the mainline release!

  • Removes the provisioner that "waits" for the cluster to be ready, and instead adding a similar check to the kubectl command fixes a lot of errors that can require a re-run when provisioning a cluster.
  • In our environment we need to give all our IAM roles a specific prefix - this change (optionally) allows this to be done!

@errm errm requested a review from a team as a code owner March 17, 2023 12:57
@errm errm requested review from arunagw, ezavgorodniy, jportasa, pray and a team and removed request for a team March 17, 2023 12:57
@errm errm force-pushed the errm/remove-cluster-waiting-provisioner branch from 0365d2a to 1ac1c20 Compare March 17, 2023 13:14
@@ -23,7 +23,7 @@ data "aws_iam_policy_document" "aws_ebs_csi_driver_assume_role_policy" {

resource "aws_iam_role" "aws_ebs_csi_driver" {
count = local.aws_ebs_csi_driver_iam_role_count
name = "EksEBSCSIDriver-${var.name}"
name = "${var.iam_role_name_prefix}EksEBSCSIDriver-${var.name}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name = "${var.iam_role_name_prefix}EksEBSCSIDriver-${var.name}"
name = "${var.iam_role_name_prefix}-EksEBSCSIDriver-${var.name}"

would be nice for readability - or do you need this as-written to be compatible with with what you've implemented for the web platform clusters?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this makes the prefix non optional (default role name will be -EksEBSCSIDriver-nanana)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps we can do something like

Suggested change
name = "${var.iam_role_name_prefix}EksEBSCSIDriver-${var.name}"
name = join("-", compact([var.iam_role_name_prefix, "EksEBSCSIDriver", var.name]))

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷 then we have - in the middle of camelcased names though

GlobalWebPlatformEksEBSCSIDriver-clustername

vs

GlobalWebPlatform-EksEBSCSIDriver-clustername

Copy link
Contributor

@ettiee ettiee Mar 17, 2023

Choose a reason for hiding this comment

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

ah yes neater than the suggestion I was mid-writing with a var null condition ❤️

@pray pray merged commit 3bcb55d into main Mar 24, 2023
@pray pray deleted the errm/remove-cluster-waiting-provisioner branch March 24, 2023 12:42
@pray pray added the enhancement New feature or request label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants