-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiarch-spot-nodepool.yaml
More file actions
95 lines (92 loc) · 3.33 KB
/
multiarch-spot-nodepool.yaml
File metadata and controls
95 lines (92 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# hephy-builder: Multi-Architecture NodePool Configuration
# NodePool configuration for multi-architecture CI/CD builds supporting hephy-builder vision
# Add this to your Crossplane composition alongside the existing eks-spot-nodepool
#
# Purpose: Enable true multi-arch builds (AMD64 + ARM64) for hephy-builder pipeline
# Related: GitHub Issue #16 - Deploy multi-architecture NodePool for CI/CD builds
## EKS Multi-Architecture Nodepool (Spot)
- name: eks-multiarch-spot-nodepool
base:
apiVersion: kubernetes.crossplane.io/v1alpha2
kind: Object
metadata:
labels:
role: eks-multiarch-spot-nodepool
spec:
forProvider:
manifest:
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: multiarch-spot
annotations:
kubernetes.io/description: "Multi-architecture Spot NodePool for CI/CD builds"
spec:
disruption:
consolidateAfter: 30s # Faster consolidation for ephemeral CI workloads
consolidationPolicy: WhenEmpty
template:
metadata:
labels:
lifecycle: Ec2Spot
intent: cicd-builds
aws.amazon.com/spot: "true"
spec:
# Taint to prevent non-CI workloads from scheduling here
taints:
- key: cicd-builds
value: "true"
effect: NoSchedule
nodeClassRef:
group: eks.amazonaws.com
kind: NodeClass
name: eks-nodeclass
requirements:
- key: "karpenter.sh/capacity-type"
operator: In
values: ["spot"]
- key: "eks.amazonaws.com/instance-category"
operator: In
values: ["c", "m", "r"]
- key: "eks.amazonaws.com/instance-cpu"
operator: Gt
values: ["1"]
- key: "topology.kubernetes.io/zone"
operator: In
values: ["patch-me"] # Will be patched with actual AZ
- key: "kubernetes.io/arch"
operator: In
values: ["amd64", "arm64"] # KEY: Both architectures supported
limits:
cpu: "32" # Focused limit for CI workloads
memory: 64Gi
patches:
- type: PatchSet
patchSetName: common-parameters
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.manifest.spec.template.spec.requirements[3].values[0]
transforms:
- type: string
string:
fmt: "%sa" # Use az 'a' in region
- name: eks-multiarch-spot-nodepool-uses-cluster
base:
apiVersion: apiextensions.crossplane.io/v1beta1
kind: Usage
spec:
replayDeletion: true
of:
apiVersion: eks.aws.upbound.io/v1beta1
kind: ClusterAuth
resourceSelector:
matchControllerRef: true
matchLabels:
role: eks-cluster-auth
by:
apiVersion: kubernetes.crossplane.io/v1alpha2
kind: Object
resourceSelector:
matchControllerRef: true
matchLabels:
role: eks-multiarch-spot-nodepool