From 07be37dc7a7506f685717b63e913fbac7737c998 Mon Sep 17 00:00:00 2001 From: Robbie Blaine <4052340+rblaine95@users.noreply.github.com> Date: Mon, 25 Mar 2024 23:01:59 +0200 Subject: [PATCH] chore: Fix typo in `nodeadm` examples (#2986) * Fix `nodeadm` example typo * `apiVersion: node.eks.aws/v1alpha` -> `apiVersion: node.eks.aws/v1alpha1` * Revert whitespace changes * `tofu apply` in `examples/user_data` * chore: Fix file extension type for MIME multipart user data * chore: Fix line endings based off this https://github.com/hashicorp/terraform/issues/32910 --------- Co-authored-by: Bryant Biggs --- .gitattributes | 1 + examples/eks_managed_node_group/main.tf | 2 +- examples/self_managed_node_group/main.tf | 2 +- examples/user_data/main.tf | 10 ++--- examples/user_data/outputs.tf | 16 +++---- ...g-additional.sh => eks-mng-additional.txt} | 18 ++++---- ...g-additional.sh => eks-mng-additional.txt} | 20 ++++----- ...ng-bootstrap.sh => eks-mng-custom-ami.txt} | 44 +++++++++---------- ...emplate.sh => eks-mng-custom-template.txt} | 44 +++++++++---------- .../{eks-mng-no-op.sh => eks-mng-no-op.txt} | 0 ...g-custom-ami.sh => self-mng-bootstrap.txt} | 44 +++++++++---------- ...mplate.sh => self-mng-custom-template.txt} | 44 +++++++++---------- .../{self-mng-no-op.sh => self-mng-no-op.txt} | 0 13 files changed, 123 insertions(+), 122 deletions(-) create mode 100644 .gitattributes rename examples/user_data/rendered/al2/{eks-mng-additional.sh => eks-mng-additional.txt} (95%) rename examples/user_data/rendered/al2023/{eks-mng-additional.sh => eks-mng-additional.txt} (89%) rename examples/user_data/rendered/al2023/{self-mng-bootstrap.sh => eks-mng-custom-ami.txt} (96%) rename examples/user_data/rendered/al2023/{self-mng-custom-template.sh => eks-mng-custom-template.txt} (97%) rename examples/user_data/rendered/al2023/{eks-mng-no-op.sh => eks-mng-no-op.txt} (100%) rename examples/user_data/rendered/al2023/{eks-mng-custom-ami.sh => self-mng-bootstrap.txt} (96%) rename examples/user_data/rendered/al2023/{eks-mng-custom-template.sh => self-mng-custom-template.txt} (97%) rename examples/user_data/rendered/al2023/{self-mng-no-op.sh => self-mng-no-op.txt} (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..176a458f94 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/examples/eks_managed_node_group/main.tf b/examples/eks_managed_node_group/main.tf index 2f828ec8e4..1af1800c8d 100644 --- a/examples/eks_managed_node_group/main.tf +++ b/examples/eks_managed_node_group/main.tf @@ -99,7 +99,7 @@ module "eks" { content_type = "application/node.eks.aws" content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: diff --git a/examples/self_managed_node_group/main.tf b/examples/self_managed_node_group/main.tf index c18f29e0dc..3074ca6a47 100644 --- a/examples/self_managed_node_group/main.tf +++ b/examples/self_managed_node_group/main.tf @@ -82,7 +82,7 @@ module "eks" { content_type = "application/node.eks.aws" content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: diff --git a/examples/user_data/main.tf b/examples/user_data/main.tf index 580b3d5981..21bc0fbb28 100644 --- a/examples/user_data/main.tf +++ b/examples/user_data/main.tf @@ -125,7 +125,7 @@ module "eks_mng_al2023_additional" { cloudinit_pre_nodeadm = [{ content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -153,7 +153,7 @@ module "eks_mng_al2023_custom_ami" { cloudinit_pre_nodeadm = [{ content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -189,7 +189,7 @@ module "eks_mng_al2023_custom_template" { cloudinit_pre_nodeadm = [{ content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -467,7 +467,7 @@ module "self_mng_al2023_bootstrap" { cloudinit_pre_nodeadm = [{ content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -505,7 +505,7 @@ module "self_mng_al2023_custom_template" { cloudinit_pre_nodeadm = [{ content = <<-EOT --- - apiVersion: node.eks.aws/v1alpha + apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: diff --git a/examples/user_data/outputs.tf b/examples/user_data/outputs.tf index dade25ac65..c40f6632d0 100644 --- a/examples/user_data/outputs.tf +++ b/examples/user_data/outputs.tf @@ -17,7 +17,7 @@ resource "local_file" "eks_mng_al2_no_op" { resource "local_file" "eks_mng_al2_additional" { content = base64decode(module.eks_mng_al2_additional.user_data) - filename = "${path.module}/rendered/al2/eks-mng-additional.sh" + filename = "${path.module}/rendered/al2/eks-mng-additional.txt" } resource "local_file" "eks_mng_al2_custom_ami" { @@ -41,22 +41,22 @@ resource "local_file" "eks_mng_al2_custom_template" { resource "local_file" "eks_mng_al2023_no_op" { content = base64decode(module.eks_mng_al2023_no_op.user_data) - filename = "${path.module}/rendered/al2023/eks-mng-no-op.sh" + filename = "${path.module}/rendered/al2023/eks-mng-no-op.txt" } resource "local_file" "eks_mng_al2023_additional" { content = base64decode(module.eks_mng_al2023_additional.user_data) - filename = "${path.module}/rendered/al2023/eks-mng-additional.sh" + filename = "${path.module}/rendered/al2023/eks-mng-additional.txt" } resource "local_file" "eks_mng_al2023_custom_ami" { content = base64decode(module.eks_mng_al2023_custom_ami.user_data) - filename = "${path.module}/rendered/al2023/eks-mng-custom-ami.sh" + filename = "${path.module}/rendered/al2023/eks-mng-custom-ami.txt" } resource "local_file" "eks_mng_al2023_custom_template" { content = base64decode(module.eks_mng_al2023_custom_template.user_data) - filename = "${path.module}/rendered/al2023/eks-mng-custom-template.sh" + filename = "${path.module}/rendered/al2023/eks-mng-custom-template.txt" } ################################################################################ @@ -137,17 +137,17 @@ resource "local_file" "self_mng_al2_custom_template" { resource "local_file" "self_mng_al2023_no_op" { content = base64decode(module.self_mng_al2023_no_op.user_data) - filename = "${path.module}/rendered/al2023/self-mng-no-op.sh" + filename = "${path.module}/rendered/al2023/self-mng-no-op.txt" } resource "local_file" "self_mng_al2023_bootstrap" { content = base64decode(module.self_mng_al2023_bootstrap.user_data) - filename = "${path.module}/rendered/al2023/self-mng-bootstrap.sh" + filename = "${path.module}/rendered/al2023/self-mng-bootstrap.txt" } resource "local_file" "self_mng_al2023_custom_template" { content = base64decode(module.self_mng_al2023_custom_template.user_data) - filename = "${path.module}/rendered/al2023/self-mng-custom-template.sh" + filename = "${path.module}/rendered/al2023/self-mng-custom-template.txt" } ################################################################################ diff --git a/examples/user_data/rendered/al2/eks-mng-additional.sh b/examples/user_data/rendered/al2/eks-mng-additional.txt similarity index 95% rename from examples/user_data/rendered/al2/eks-mng-additional.sh rename to examples/user_data/rendered/al2/eks-mng-additional.txt index 70b3142abb..151f0cba7a 100755 --- a/examples/user_data/rendered/al2/eks-mng-additional.sh +++ b/examples/user_data/rendered/al2/eks-mng-additional.txt @@ -1,11 +1,11 @@ Content-Type: multipart/mixed; boundary="//" -MIME-Version: 1.0 - ---// -Content-Transfer-Encoding: 7bit -Content-Type: text/x-shellscript -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--// +Content-Transfer-Encoding: 7bit +Content-Type: text/x-shellscript +Mime-Version: 1.0 + export USE_MAX_PODS=false - ---//-- + +--//-- diff --git a/examples/user_data/rendered/al2023/eks-mng-additional.sh b/examples/user_data/rendered/al2023/eks-mng-additional.txt similarity index 89% rename from examples/user_data/rendered/al2023/eks-mng-additional.sh rename to examples/user_data/rendered/al2023/eks-mng-additional.txt index d8d3a1fdb4..fe3c75c898 100755 --- a/examples/user_data/rendered/al2023/eks-mng-additional.sh +++ b/examples/user_data/rendered/al2023/eks-mng-additional.txt @@ -1,13 +1,13 @@ Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" -MIME-Version: 1.0 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- -apiVersion: node.eks.aws/v1alpha +apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -15,5 +15,5 @@ spec: shutdownGracePeriod: 30s featureGates: DisableKubeletCloudCredentialProviders: true - ---MIMEBOUNDARY-- + +--MIMEBOUNDARY-- diff --git a/examples/user_data/rendered/al2023/self-mng-bootstrap.sh b/examples/user_data/rendered/al2023/eks-mng-custom-ami.txt similarity index 96% rename from examples/user_data/rendered/al2023/self-mng-bootstrap.sh rename to examples/user_data/rendered/al2023/eks-mng-custom-ami.txt index 676edd1df6..46362c2030 100755 --- a/examples/user_data/rendered/al2023/self-mng-bootstrap.sh +++ b/examples/user_data/rendered/al2023/eks-mng-custom-ami.txt @@ -1,13 +1,13 @@ Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" -MIME-Version: 1.0 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- -apiVersion: node.eks.aws/v1alpha +apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -15,12 +15,12 @@ spec: shutdownGracePeriod: 30s featureGates: DisableKubeletCloudCredentialProviders: true - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig @@ -30,12 +30,12 @@ spec: apiServerEndpoint: https://012345678903AB2BAE5D1E0BFE0E2B50.gr7.us-east-1.eks.amazonaws.com certificateAuthority: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKbXFqQ1VqNGdGR2w3ZW5PeWthWnZ2RjROOTVOUEZCM2o0cGhVZUsrWGFtN2ZSQnZya0d6OGxKZmZEZWF2b2plTwpQK2xOZFlqdHZncmxCUEpYdHZIZmFzTzYxVzdIZmdWQ2EvamdRM2w3RmkvL1dpQmxFOG9oWUZkdWpjc0s1SXM2CnNkbk5KTTNYUWN2TysrSitkV09NT2ZlNzlsSWdncmdQLzgvRU9CYkw3eUY1aU1hS3lsb1RHL1V3TlhPUWt3ZUcKblBNcjdiUmdkQ1NCZTlXYXowOGdGRmlxV2FOditsTDhsODBTdFZLcWVNVlUxbjQyejVwOVpQRTd4T2l6L0xTNQpYV2lXWkVkT3pMN0xBWGVCS2gzdkhnczFxMkI2d1BKZnZnS1NzWllQRGFpZTloT1NNOUJkNFNPY3JrZTRYSVBOCkVvcXVhMlYrUDRlTWJEQzhMUkVWRDdCdVZDdWdMTldWOTBoL3VJUy9WU2VOcEdUOGVScE5DakszSjc2aFlsWm8KWjNGRG5QWUY0MWpWTHhiOXF0U1ROdEp6amYwWXBEYnFWci9xZzNmQWlxbVorMzd3YWM1eHlqMDZ4cmlaRUgzZgpUM002d2lCUEVHYVlGeWN5TmNYTk5aYW9DWDJVL0N1d2JsUHAKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ== cidr: 192.168.0.0/16 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: text/x-shellscript; charset="us-ascii" -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: text/x-shellscript; charset="us-ascii" +Mime-Version: 1.0 + echo "All done" - ---MIMEBOUNDARY-- + +--MIMEBOUNDARY-- diff --git a/examples/user_data/rendered/al2023/self-mng-custom-template.sh b/examples/user_data/rendered/al2023/eks-mng-custom-template.txt similarity index 97% rename from examples/user_data/rendered/al2023/self-mng-custom-template.sh rename to examples/user_data/rendered/al2023/eks-mng-custom-template.txt index 3fe97563e2..a97e188c83 100755 --- a/examples/user_data/rendered/al2023/self-mng-custom-template.sh +++ b/examples/user_data/rendered/al2023/eks-mng-custom-template.txt @@ -1,13 +1,13 @@ Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" -MIME-Version: 1.0 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- -apiVersion: node.eks.aws/v1alpha +apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -15,12 +15,12 @@ spec: shutdownGracePeriod: 30s featureGates: DisableKubeletCloudCredentialProviders: true - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig @@ -34,12 +34,12 @@ spec: config: | [plugins."io.containerd.grpc.v1.cri".containerd] discard_unpacked_layers = false - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: text/x-shellscript; charset="us-ascii" -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: text/x-shellscript; charset="us-ascii" +Mime-Version: 1.0 + echo "All done" - ---MIMEBOUNDARY-- + +--MIMEBOUNDARY-- diff --git a/examples/user_data/rendered/al2023/eks-mng-no-op.sh b/examples/user_data/rendered/al2023/eks-mng-no-op.txt similarity index 100% rename from examples/user_data/rendered/al2023/eks-mng-no-op.sh rename to examples/user_data/rendered/al2023/eks-mng-no-op.txt diff --git a/examples/user_data/rendered/al2023/eks-mng-custom-ami.sh b/examples/user_data/rendered/al2023/self-mng-bootstrap.txt similarity index 96% rename from examples/user_data/rendered/al2023/eks-mng-custom-ami.sh rename to examples/user_data/rendered/al2023/self-mng-bootstrap.txt index 676edd1df6..46362c2030 100755 --- a/examples/user_data/rendered/al2023/eks-mng-custom-ami.sh +++ b/examples/user_data/rendered/al2023/self-mng-bootstrap.txt @@ -1,13 +1,13 @@ Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" -MIME-Version: 1.0 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- -apiVersion: node.eks.aws/v1alpha +apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -15,12 +15,12 @@ spec: shutdownGracePeriod: 30s featureGates: DisableKubeletCloudCredentialProviders: true - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig @@ -30,12 +30,12 @@ spec: apiServerEndpoint: https://012345678903AB2BAE5D1E0BFE0E2B50.gr7.us-east-1.eks.amazonaws.com certificateAuthority: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKbXFqQ1VqNGdGR2w3ZW5PeWthWnZ2RjROOTVOUEZCM2o0cGhVZUsrWGFtN2ZSQnZya0d6OGxKZmZEZWF2b2plTwpQK2xOZFlqdHZncmxCUEpYdHZIZmFzTzYxVzdIZmdWQ2EvamdRM2w3RmkvL1dpQmxFOG9oWUZkdWpjc0s1SXM2CnNkbk5KTTNYUWN2TysrSitkV09NT2ZlNzlsSWdncmdQLzgvRU9CYkw3eUY1aU1hS3lsb1RHL1V3TlhPUWt3ZUcKblBNcjdiUmdkQ1NCZTlXYXowOGdGRmlxV2FOditsTDhsODBTdFZLcWVNVlUxbjQyejVwOVpQRTd4T2l6L0xTNQpYV2lXWkVkT3pMN0xBWGVCS2gzdkhnczFxMkI2d1BKZnZnS1NzWllQRGFpZTloT1NNOUJkNFNPY3JrZTRYSVBOCkVvcXVhMlYrUDRlTWJEQzhMUkVWRDdCdVZDdWdMTldWOTBoL3VJUy9WU2VOcEdUOGVScE5DakszSjc2aFlsWm8KWjNGRG5QWUY0MWpWTHhiOXF0U1ROdEp6amYwWXBEYnFWci9xZzNmQWlxbVorMzd3YWM1eHlqMDZ4cmlaRUgzZgpUM002d2lCUEVHYVlGeWN5TmNYTk5aYW9DWDJVL0N1d2JsUHAKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ== cidr: 192.168.0.0/16 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: text/x-shellscript; charset="us-ascii" -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: text/x-shellscript; charset="us-ascii" +Mime-Version: 1.0 + echo "All done" - ---MIMEBOUNDARY-- + +--MIMEBOUNDARY-- diff --git a/examples/user_data/rendered/al2023/eks-mng-custom-template.sh b/examples/user_data/rendered/al2023/self-mng-custom-template.txt similarity index 97% rename from examples/user_data/rendered/al2023/eks-mng-custom-template.sh rename to examples/user_data/rendered/al2023/self-mng-custom-template.txt index 3fe97563e2..a97e188c83 100755 --- a/examples/user_data/rendered/al2023/eks-mng-custom-template.sh +++ b/examples/user_data/rendered/al2023/self-mng-custom-template.txt @@ -1,13 +1,13 @@ Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" -MIME-Version: 1.0 - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - +MIME-Version: 1.0 + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- -apiVersion: node.eks.aws/v1alpha +apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: @@ -15,12 +15,12 @@ spec: shutdownGracePeriod: 30s featureGates: DisableKubeletCloudCredentialProviders: true - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: application/node.eks.aws -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: application/node.eks.aws +Mime-Version: 1.0 + --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig @@ -34,12 +34,12 @@ spec: config: | [plugins."io.containerd.grpc.v1.cri".containerd] discard_unpacked_layers = false - ---MIMEBOUNDARY -Content-Transfer-Encoding: 7bit -Content-Type: text/x-shellscript; charset="us-ascii" -Mime-Version: 1.0 - + +--MIMEBOUNDARY +Content-Transfer-Encoding: 7bit +Content-Type: text/x-shellscript; charset="us-ascii" +Mime-Version: 1.0 + echo "All done" - ---MIMEBOUNDARY-- + +--MIMEBOUNDARY-- diff --git a/examples/user_data/rendered/al2023/self-mng-no-op.sh b/examples/user_data/rendered/al2023/self-mng-no-op.txt similarity index 100% rename from examples/user_data/rendered/al2023/self-mng-no-op.sh rename to examples/user_data/rendered/al2023/self-mng-no-op.txt