Skip to content

Commit

Permalink
chore: Fix typo in nodeadm examples (terraform-aws-modules#2986)
Browse files Browse the repository at this point in the history
* 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 hashicorp/terraform#32910

---------

Co-authored-by: Bryant Biggs <[email protected]>
  • Loading branch information
rblaine95 and bryantbiggs authored Mar 25, 2024
1 parent 70866e6 commit 07be37d
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 122 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 1 addition & 1 deletion examples/eks_managed_node_group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/self_managed_node_group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions examples/user_data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions examples/user_data/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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"
}

################################################################################
Expand Down Expand Up @@ -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"
}

################################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -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

--//--

--//--
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
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:
config:
shutdownGracePeriod: 30s
featureGates:
DisableKubeletCloudCredentialProviders: true

--MIMEBOUNDARY--

--MIMEBOUNDARY--
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
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:
config:
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
Expand All @@ -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--
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
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:
config:
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
Expand All @@ -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--
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
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:
config:
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
Expand All @@ -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--
Loading

0 comments on commit 07be37d

Please sign in to comment.