mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-24 02:11:04 +01:00
docs: Move examples that are more like test cases to the new tests/ directory; add better example configurations (#3069)
* chore: Move examples that are more like test cases to the new `tests/` directory * chore: Stash * feat: Add better examples for EKS managed node groups * chore: Add better examples for self-managed node groups * chore: Update docs and correct `nodegroup` to `node group`
This commit is contained in:
15
tests/user-data/templates/al2023_custom.tpl
Normal file
15
tests/user-data/templates/al2023_custom.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
%{ if enable_bootstrap_user_data ~}
|
||||
---
|
||||
apiVersion: node.eks.aws/v1alpha1
|
||||
kind: NodeConfig
|
||||
spec:
|
||||
cluster:
|
||||
name: ${cluster_name}
|
||||
apiServerEndpoint: ${cluster_endpoint}
|
||||
certificateAuthority: ${cluster_auth_base64}
|
||||
cidr: ${cluster_service_cidr}
|
||||
containerd:
|
||||
config: |
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd]
|
||||
discard_unpacked_layers = false
|
||||
%{ endif ~}
|
||||
7
tests/user-data/templates/bottlerocket_custom.tpl
Normal file
7
tests/user-data/templates/bottlerocket_custom.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
# Custom user data template provided for rendering
|
||||
[settings.kubernetes]
|
||||
"cluster-name" = "${cluster_name}"
|
||||
"api-server" = "${cluster_endpoint}"
|
||||
"cluster-certificate" = "${cluster_auth_base64}"
|
||||
|
||||
${bootstrap_extra_args~}
|
||||
11
tests/user-data/templates/linux_custom.tpl
Normal file
11
tests/user-data/templates/linux_custom.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
${pre_bootstrap_user_data ~}
|
||||
|
||||
# Custom user data template provided for rendering
|
||||
B64_CLUSTER_CA=${cluster_auth_base64}
|
||||
API_SERVER_URL=${cluster_endpoint}
|
||||
/etc/eks/bootstrap.sh ${cluster_name} ${bootstrap_extra_args} --b64-cluster-ca $B64_CLUSTER_CA --apiserver-endpoint $API_SERVER_URL \
|
||||
--ip-family ${cluster_ip_family} --service-${cluster_ip_family}-cidr ${cluster_service_cidr}
|
||||
${post_bootstrap_user_data ~}
|
||||
10
tests/user-data/templates/windows_custom.tpl
Normal file
10
tests/user-data/templates/windows_custom.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
# Custom user data template provided for rendering
|
||||
<powershell>
|
||||
${pre_bootstrap_user_data ~}
|
||||
[string]$EKSBinDir = "$env:ProgramFiles\Amazon\EKS"
|
||||
[string]$EKSBootstrapScriptName = 'Start-EKSBootstrap.ps1'
|
||||
[string]$EKSBootstrapScriptFile = "$EKSBinDir\$EKSBootstrapScriptName"
|
||||
& $EKSBootstrapScriptFile -EKSClusterName ${cluster_name} -APIServerEndpoint ${cluster_endpoint} -Base64ClusterCA ${cluster_auth_base64} ${bootstrap_extra_args} 3>&1 4>&1 5>&1 6>&1
|
||||
$LastError = if ($?) { 0 } else { $Error[0].Exception.HResult }
|
||||
${post_bootstrap_user_data ~}
|
||||
</powershell>
|
||||
Reference in New Issue
Block a user