Skip to content

Commit 3fa33f3

Browse files
authored
Revert "Update to Karpenter v1.3.0"
1 parent b9bbc10 commit 3fa33f3

File tree

6 files changed

+15
-91
lines changed

6 files changed

+15
-91
lines changed

cluster/cluster.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,7 @@ Resources:
668668
"arn:${AWS::Partition}:ec2:${AWS::Region}::image/*",
669669
"arn:${AWS::Partition}:ec2:${AWS::Region}::snapshot/*",
670670
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:security-group/*",
671-
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:subnet/*",
672-
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:capacity-reservation/*"
671+
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:subnet/*"
673672
],
674673
"Action": [
675674
"ec2:RunInstances",
@@ -702,8 +701,7 @@ Resources:
702701
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:volume/*",
703702
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:network-interface/*",
704703
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:launch-template/*",
705-
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:spot-instances-request/*",
706-
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:capacity-reservation/*"
704+
"arn:${AWS::Partition}:ec2:${AWS::Region}:*:spot-instances-request/*"
707705
],
708706
"Action": [
709707
"ec2:RunInstances",
@@ -797,7 +795,6 @@ Resources:
797795
"Resource": "*",
798796
"Action": [
799797
"ec2:DescribeAvailabilityZones",
800-
"ec2:DescribeCapacityReservations",
801798
"ec2:DescribeImages",
802799
"ec2:DescribeInstances",
803800
"ec2:DescribeInstanceTypeOfferings",

cluster/manifests/z-karpenter/02-role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{ if eq .Cluster.ConfigItems.karpenter_pools_enabled "true"}}
2+
23
---
34
# Source: karpenter/templates/role.yaml
45
apiVersion: rbac.authorization.k8s.io/v1

cluster/manifests/z-karpenter/07-karpenter.k8s.aws_ec2nodeclasses.yaml

Lines changed: 6 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.17.2
7+
controller-gen.kubebuilder.io/version: v0.17.1
88
name: ec2nodeclasses.karpenter.k8s.aws
99
spec:
1010
group: karpenter.k8s.aws
@@ -237,39 +237,6 @@ spec:
237237
x-kubernetes-validations:
238238
- message: must have only one blockDeviceMappings with rootVolume
239239
rule: self.filter(x, has(x.rootVolume)?x.rootVolume==true:false).size() <= 1
240-
capacityReservationSelectorTerms:
241-
description: |-
242-
CapacityReservationSelectorTerms is a list of capacity reservation selector terms. Each term is ORed together to
243-
determine the set of eligible capacity reservations.
244-
items:
245-
properties:
246-
id:
247-
description: ID is the capacity reservation id in EC2
248-
pattern: ^cr-[0-9a-z]+$
249-
type: string
250-
ownerID:
251-
description: Owner is the owner id for the ami.
252-
pattern: ^[0-9]{12}$
253-
type: string
254-
tags:
255-
additionalProperties:
256-
type: string
257-
description: |-
258-
Tags is a map of key/value tags used to select capacity reservations.
259-
Specifying '*' for a value selects all values for a given tag key.
260-
maxProperties: 20
261-
type: object
262-
x-kubernetes-validations:
263-
- message: empty tag keys or values aren't supported
264-
rule: self.all(k, k != '' && self[k] != '')
265-
type: object
266-
maxItems: 30
267-
type: array
268-
x-kubernetes-validations:
269-
- message: expected at least one, got none, ['tags', 'id']
270-
rule: self.all(x, has(x.tags) || has(x.id))
271-
- message: '''id'' is mutually exclusive, cannot be set along with tags in a capacity reservation selector term'
272-
rule: '!self.all(x, has(x.id) && (has(x.tags) || has(x.ownerID)))'
273240
context:
274241
description: |-
275242
Context is a Reserved field in EC2 APIs
@@ -500,7 +467,7 @@ spec:
500467
- message: immutable field changed
501468
rule: self == oldSelf
502469
securityGroupSelectorTerms:
503-
description: SecurityGroupSelectorTerms is a list of security group selector terms. The terms are ORed.
470+
description: SecurityGroupSelectorTerms is a list of or security group selector terms. The terms are ORed.
504471
items:
505472
description: |-
506473
SecurityGroupSelectorTerm defines selection logic for a security group used by Karpenter to launch nodes.
@@ -534,12 +501,12 @@ spec:
534501
rule: self.size() != 0
535502
- message: expected at least one, got none, ['tags', 'id', 'name']
536503
rule: self.all(x, has(x.tags) || has(x.id) || has(x.name))
537-
- message: '''id'' is mutually exclusive, cannot be set with a combination of other fields in a security group selector term'
504+
- message: '''id'' is mutually exclusive, cannot be set with a combination of other fields in securityGroupSelectorTerms'
538505
rule: '!self.all(x, has(x.id) && (has(x.tags) || has(x.name)))'
539-
- message: '''name'' is mutually exclusive, cannot be set with a combination of other fields in a security group selector term'
506+
- message: '''name'' is mutually exclusive, cannot be set with a combination of other fields in securityGroupSelectorTerms'
540507
rule: '!self.all(x, has(x.name) && (has(x.tags) || has(x.id)))'
541508
subnetSelectorTerms:
542-
description: SubnetSelectorTerms is a list of subnet selector terms. The terms are ORed.
509+
description: SubnetSelectorTerms is a list of or subnet selector terms. The terms are ORed.
543510
items:
544511
description: |-
545512
SubnetSelectorTerm defines selection logic for a subnet used by Karpenter to launch nodes.
@@ -568,7 +535,7 @@ spec:
568535
rule: self.size() != 0
569536
- message: expected at least one, got none, ['tags', 'id']
570537
rule: self.all(x, has(x.tags) || has(x.id))
571-
- message: '''id'' is mutually exclusive, cannot be set with a combination of other fields in a subnet selector term'
538+
- message: '''id'' is mutually exclusive, cannot be set with a combination of other fields in subnetSelectorTerms'
572539
rule: '!self.all(x, has(x.id) && has(x.tags))'
573540
tags:
574541
additionalProperties:
@@ -671,46 +638,6 @@ spec:
671638
- requirements
672639
type: object
673640
type: array
674-
capacityReservations:
675-
description: |-
676-
CapacityReservations contains the current capacity reservation values that are available to this NodeClass under the
677-
CapacityReservation selectors.
678-
items:
679-
properties:
680-
availabilityZone:
681-
description: The availability zone the capacity reservation is available in.
682-
type: string
683-
endTime:
684-
description: |-
685-
The time at which the capacity reservation expires. Once expired, the reserved capacity is released and Karpenter
686-
will no longer be able to launch instances into that reservation.
687-
format: date-time
688-
type: string
689-
id:
690-
description: The id for the capacity reservation.
691-
pattern: ^cr-[0-9a-z]+$
692-
type: string
693-
instanceMatchCriteria:
694-
description: Indicates the type of instance launches the capacity reservation accepts.
695-
enum:
696-
- open
697-
- targeted
698-
type: string
699-
instanceType:
700-
description: The instance type for the capacity reservation.
701-
type: string
702-
ownerID:
703-
description: The ID of the AWS account that owns the capacity reservation.
704-
pattern: ^[0-9]{12}$
705-
type: string
706-
required:
707-
- availabilityZone
708-
- id
709-
- instanceMatchCriteria
710-
- instanceType
711-
- ownerID
712-
type: object
713-
type: array
714641
conditions:
715642
description: Conditions contains signals for health and readiness
716643
items:

cluster/manifests/z-karpenter/08-karpenter.sh_nodeclaims.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.17.2
7+
controller-gen.kubebuilder.io/version: v0.17.1
88
name: nodeclaims.karpenter.sh
99
spec:
1010
group: karpenter.sh
@@ -135,7 +135,7 @@ spec:
135135
- message: label "kubernetes.io/hostname" is restricted
136136
rule: self != "kubernetes.io/hostname"
137137
- message: label domain "karpenter.k8s.aws" is restricted
138-
rule: self in ["karpenter.k8s.aws/capacity-reservation-id", "karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.aws")
138+
rule: self in ["karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.aws")
139139
minValues:
140140
description: |-
141141
This field is ALPHA and can be dropped or replaced at any time

cluster/manifests/z-karpenter/09-karpenter.sh_nodepools.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.17.2
7+
controller-gen.kubebuilder.io/version: v0.17.1
88
name: nodepools.karpenter.sh
99
spec:
1010
group: karpenter.sh
@@ -208,7 +208,7 @@ spec:
208208
- message: label "kubernetes.io/hostname" is restricted
209209
rule: self.all(x, x != "kubernetes.io/hostname")
210210
- message: label domain "karpenter.k8s.aws" is restricted
211-
rule: self.all(x, x in ["karpenter.k8s.aws/capacity-reservation-id", "karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !x.find("^([^/]+)").endsWith("karpenter.k8s.aws"))
211+
rule: self.all(x, x in ["karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !x.find("^([^/]+)").endsWith("karpenter.k8s.aws"))
212212
type: object
213213
spec:
214214
description: |-
@@ -281,7 +281,7 @@ spec:
281281
- message: label "kubernetes.io/hostname" is restricted
282282
rule: self != "kubernetes.io/hostname"
283283
- message: label domain "karpenter.k8s.aws" is restricted
284-
rule: self in ["karpenter.k8s.aws/capacity-reservation-id", "karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.aws")
284+
rule: self in ["karpenter.k8s.aws/ec2nodeclass", "karpenter.k8s.aws/instance-encryption-in-transit-supported", "karpenter.k8s.aws/instance-category", "karpenter.k8s.aws/instance-hypervisor", "karpenter.k8s.aws/instance-family", "karpenter.k8s.aws/instance-generation", "karpenter.k8s.aws/instance-local-nvme", "karpenter.k8s.aws/instance-size", "karpenter.k8s.aws/instance-cpu", "karpenter.k8s.aws/instance-cpu-manufacturer", "karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz", "karpenter.k8s.aws/instance-memory", "karpenter.k8s.aws/instance-ebs-bandwidth", "karpenter.k8s.aws/instance-network-bandwidth", "karpenter.k8s.aws/instance-gpu-name", "karpenter.k8s.aws/instance-gpu-manufacturer", "karpenter.k8s.aws/instance-gpu-count", "karpenter.k8s.aws/instance-gpu-memory", "karpenter.k8s.aws/instance-accelerator-name", "karpenter.k8s.aws/instance-accelerator-manufacturer", "karpenter.k8s.aws/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.aws")
285285
minValues:
286286
description: |-
287287
This field is ALPHA and can be dropped or replaced at any time

cluster/manifests/z-karpenter/deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ spec:
3232
prometheus.io/scrape: "true"
3333
spec:
3434
dnsPolicy: Default
35-
automountServiceAccountToken: true
3635
serviceAccountName: karpenter
3736
securityContext:
3837
fsGroup: 65532
@@ -51,7 +50,7 @@ spec:
5150
drop:
5251
- ALL
5352
readOnlyRootFilesystem: true
54-
image: "container-registry.zalando.net/teapot/karpenter:1.3.0-main-32.patched"
53+
image: "container-registry.zalando.net/teapot/karpenter:1.2.0-main-30.patched"
5554
imagePullPolicy: IfNotPresent
5655
env:
5756
- name: KUBERNETES_MIN_VERSION

0 commit comments

Comments
 (0)