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 <bryantbiggs@gmail.com>
This commit is contained in:
Robbie Blaine
2024-03-25 23:01:59 +02:00
committed by GitHub
parent 70866e6fb2
commit 07be37dc7a
13 changed files with 123 additions and 122 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

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

View File

@@ -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
--//--
--//--

View File

@@ -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--

View File

@@ -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--

View File

@@ -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--

View File

@@ -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--

View File

@@ -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--