-
Notifications
You must be signed in to change notification settings - Fork 980
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add docs for customAMIs, tests for UserData (#2169)
* docs: Add docs for customAMIs, tests for UserData
- Loading branch information
Showing
10 changed files
with
254 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This example provisioner will provision instances using a custom EKS-Optimized AMI that belongs to the | ||
# AL2 AMIFamily. If your AMIs are built off https://github.com/awslabs/amazon-eks-ami and can be bootstrapped | ||
# by Karpenter, this may be a good fit for you. | ||
|
||
apiVersion: karpenter.sh/v1alpha5 | ||
kind: Provisioner | ||
metadata: | ||
name: default | ||
spec: | ||
limits: | ||
resources: | ||
cpu: 20 | ||
providerRef: | ||
name: al2 | ||
ttlSecondsAfterEmpty: 30 | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1alpha1 | ||
kind: AWSNodeTemplate | ||
metadata: | ||
name: al2 | ||
spec: | ||
amiFamily: AL2 | ||
instanceProfile: myInstanceProfile | ||
subnetSelector: | ||
karpenter.sh/discovery: my-cluster | ||
securityGroupSelector: | ||
karpenter.sh/discovery: my-cluster | ||
amiSelector: | ||
ami-ids: ami-123,ami456 | ||
userData: | | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/mixed; boundary="BOUNDARY" | ||
--BOUNDARY | ||
Content-Type: text/x-shellscript; charset="us-ascii" | ||
#!/bin/bash | ||
echo "Running a custom user data script" | ||
--BOUNDARY-- |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This example provisioner will provision instances using an AMI that belongs to a custom AMIFamily | ||
# Keep in mind, that you're in charge of bootstrapping your worker nodes. | ||
|
||
apiVersion: karpenter.sh/v1alpha5 | ||
kind: Provisioner | ||
metadata: | ||
name: default | ||
spec: | ||
limits: | ||
resources: | ||
cpu: 20 | ||
providerRef: | ||
name: custom-family | ||
ttlSecondsAfterEmpty: 30 | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1alpha1 | ||
kind: AWSNodeTemplate | ||
metadata: | ||
name: custom-family | ||
spec: | ||
amiFamily: Custom | ||
instanceProfile: myInstanceProfile | ||
subnetSelector: | ||
karpenter.sh/discovery: my-cluster | ||
securityGroupSelector: | ||
karpenter.sh/discovery: my-cluster | ||
amiSelector: | ||
ami-ids: ami-123,ami456 | ||
userData: | | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/mixed; boundary="BOUNDARY" | ||
--BOUNDARY | ||
Content-Type: text/x-shellscript; charset="us-ascii" | ||
#!/bin/bash | ||
echo "Running my custom set-up" | ||
/etc/eks/bootstrap.sh my-cluster --kubelet-extra-args='--node-labels=foo=bar' | ||
--BOUNDARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/suites/integration/testdata/al2_userdata_input.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/mixed; boundary="BOUNDARY" | ||
|
||
--BOUNDARY | ||
Content-Type: text/x-shellscript; charset="us-ascii" | ||
|
||
#!/bin/bash | ||
echo "Running custom user data script" | ||
|
||
--BOUNDARY-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings.kubernetes] | ||
kube-api-qps = 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters