-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle Provisioners with provider field
- Loading branch information
1 parent
de4388d
commit 7fc98c7
Showing
9 changed files
with
203 additions
and
59 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
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
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
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
79 changes: 79 additions & 0 deletions
79
tools/karpenter-convert/pkg/convert/testdata/nodepool_nodeclass_provider_combined.yaml
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,79 @@ | ||
apiVersion: karpenter.sh/v1beta1 | ||
kind: NodePool | ||
metadata: | ||
name: default | ||
spec: | ||
disruption: | ||
consolidationPolicy: WhenUnderutilized | ||
expireAfter: Never | ||
template: | ||
metadata: | ||
annotations: | ||
example.com/owner: my-team | ||
labels: | ||
billing-team: my-team | ||
spec: | ||
nodeClassRef: | ||
name: default | ||
requirements: | ||
- key: kubernetes.io/arch | ||
operator: Exists | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: | ||
- spot | ||
- on-demand | ||
- 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-generation | ||
operator: Gt | ||
values: | ||
- "2" | ||
startupTaints: | ||
- effect: NoSchedule | ||
key: example.com/another-taint | ||
taints: | ||
- effect: NoSchedule | ||
key: example.com/special-taint | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: default | ||
spec: | ||
amiFamily: AL2 | ||
blockDeviceMappings: | ||
- deviceName: /dev/xvda | ||
ebs: | ||
deleteOnTermination: true | ||
encrypted: true | ||
iops: 10000 | ||
kmsKeyID: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab | ||
snapshotID: snap-0123456789 | ||
throughput: 125 | ||
volumeSize: 100Gi | ||
volumeType: gp3 | ||
context: test-context-id | ||
metadataOptions: | ||
httpEndpoint: disabled | ||
httpProtocolIPv6: enabled | ||
httpPutResponseHopLimit: 2 | ||
httpTokens: required | ||
role: $KARPENTER_NODE_ROLE | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: karpenter-demo | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: karpenter-demo | ||
tags: | ||
app.kubernetes.io/created-by: karpenter-demo | ||
aws-node-termination-handler/managed: "true" |
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
49 changes: 49 additions & 0 deletions
49
tools/karpenter-convert/pkg/convert/testdata/provisioner_provider.yaml
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,49 @@ | ||
apiVersion: karpenter.sh/v1alpha5 | ||
kind: Provisioner | ||
metadata: | ||
name: default | ||
spec: | ||
consolidation: | ||
enabled: true | ||
taints: | ||
- key: example.com/special-taint | ||
effect: NoSchedule | ||
startupTaints: | ||
- key: example.com/another-taint | ||
effect: NoSchedule | ||
labels: | ||
billing-team: my-team | ||
annotations: | ||
example.com/owner: "my-team" | ||
requirements: | ||
- key: "kubernetes.io/arch" | ||
operator: Exists | ||
- key: "karpenter.sh/capacity-type" # If not included, the webhook for the AWS cloud provider will default to on-demand | ||
operator: In | ||
values: ["spot", "on-demand"] | ||
provider: | ||
subnetSelector: | ||
karpenter.sh/discovery: karpenter-demo | ||
securityGroupSelector: | ||
karpenter.sh/discovery: karpenter-demo | ||
context: test-context-id | ||
instanceProfile: "KarpenterInstanceProfile-karpenter-demo" | ||
tags: | ||
app.kubernetes.io/created-by: karpenter-demo | ||
aws-node-termination-handler/managed: "true" | ||
metadataOptions: | ||
httpEndpoint: disabled | ||
httpProtocolIPv6: enabled | ||
httpPutResponseHopLimit: 2 | ||
httpTokens: required | ||
blockDeviceMappings: | ||
- deviceName: /dev/xvda | ||
ebs: | ||
volumeSize: 100Gi | ||
volumeType: gp3 | ||
iops: 10000 | ||
encrypted: true | ||
kmsKeyID: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" | ||
deleteOnTermination: true | ||
throughput: 125 | ||
snapshotID: snap-0123456789 |