-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'aws:main' into scale_test
- Loading branch information
Showing
11 changed files
with
336 additions
and
7 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,7 @@ | ||
repositoryID: fda7ffc4-4672-4218-8264-321ec3b4e3cc | ||
owners: [] | ||
# - name: awsadmin1 | ||
# email: [email protected] | ||
ignore: | ||
- name: karpenter-crd | ||
version: (?:^\d+$)|(?:^v?0\.0\.0)|(?:^v?\d+\-) |
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,7 @@ | ||
repositoryID: 356cb63f-9ee3-4956-9c20-003e416715c7 | ||
owners: [] | ||
# - name: awsadmin1 | ||
# email: [email protected] | ||
ignore: | ||
- name: karpenter | ||
version: (?:^\d+$)|(?:^v?0\.0\.0)|(?:^v?\d+\-) |
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,52 @@ | ||
# This example will use spot instance type for all provisioned instances | ||
# and enforces minValues to instance families which means at least that number of unique instance | ||
# families is required by the scheduler for the NodeClaim creation. | ||
--- | ||
apiVersion: karpenter.sh/v1beta1 | ||
kind: NodePool | ||
metadata: | ||
name: spot | ||
annotations: | ||
kubernetes.io/description: "NodePool for provisioning spot capacity" | ||
spec: | ||
template: | ||
spec: | ||
requirements: | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: ["spot"] | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: ["amd64"] | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: ["linux"] | ||
- key: karpenter.k8s.aws/instance-category | ||
operator: In | ||
values: ["c", "m", "r"] | ||
- key: karpenter.k8s.aws/instance-family | ||
operator: Exists | ||
minValues: 5 | ||
- key: karpenter.k8s.aws/instance-generation | ||
operator: Gt | ||
values: ["2"] | ||
nodeClassRef: | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
name: default | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: default | ||
annotations: | ||
kubernetes.io/description: "General purpose EC2NodeClass for running Amazon Linux 2 nodes" | ||
spec: | ||
amiFamily: AL2 # Amazon Linux 2 | ||
role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name |
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,56 @@ | ||
# This example will use spot instance type for all provisioned instances and enforces minValues to various keys where it is defined i.e | ||
# at least 2 unique instance families from [c,m,r], 5 unique instance families [eg: "m5","m5d","m5dn","c5","c5d","c4" etc], 2 unique instance types [eg: "c5.2xlarge","c4.xlarge" etc] are required by the scheduler for the NodeClaim creation. | ||
# This ensures minimum flexiblity required to schedule pods into spot nodes. | ||
--- | ||
apiVersion: karpenter.sh/v1beta1 | ||
kind: NodePool | ||
metadata: | ||
name: spot | ||
annotations: | ||
kubernetes.io/description: "NodePool for provisioning spot capacity" | ||
spec: | ||
template: | ||
spec: | ||
requirements: | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: ["spot"] | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: ["amd64"] | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: ["linux"] | ||
- key: karpenter.k8s.aws/instance-category | ||
operator: In | ||
values: ["c", "m", "r"] | ||
minValues: 2 | ||
- key: karpenter.k8s.aws/instance-family | ||
operator: Exists | ||
minValues: 5 | ||
- key: node.kubernetes.io/instance-type | ||
operator: Exists | ||
minValues: 2 | ||
- key: karpenter.k8s.aws/instance-generation | ||
operator: Gt | ||
values: ["2"] | ||
nodeClassRef: | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
name: default | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: default | ||
annotations: | ||
kubernetes.io/description: "General purpose EC2NodeClass for running Amazon Linux 2 nodes" | ||
spec: | ||
amiFamily: AL2 # Amazon Linux 2 | ||
role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name |
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
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
Oops, something went wrong.