@@ -18,24 +18,30 @@ inputs:
1818 description : ' '
1919 required : false
2020 default : ' true'
21+ mode :
22+ description : ' '
23+ required : false
24+ default : ' '
25+ client_node_number :
26+ description : ' Node number, will only be used for egw mode'
27+ required : false
28+ default : ' 4'
29+ egw_default_zone :
30+ description : ' Availability zone that will be used for egw nodegroups'
31+ required : false
32+ default : ' '
33+ egw_no_cilium_zone :
34+ description : ' Availability zone that will be used for no-cilium egw nodegroup'
35+ required : false
36+ default : ' '
2137runs :
2238 using : composite
2339 steps :
24- - name : Create EKS nodegroup
40+ - name : Create nodegroup details (regular mode)
41+ if : ${{ inputs.mode != 'egw' }}
2542 shell : bash
2643 run : |
27- cat <<EOF > eks-nodegroups.yaml
28- apiVersion: eksctl.io/v1alpha5
29- kind: ClusterConfig
30-
31- metadata:
32- name: ${{ inputs.cluster_name }}
33- region: ${{ inputs.region }}
34- version: "${{ inputs.version }}"
35- tags:
36- usage: "${{ github.repository_owner }}-${{ github.event.repository.name }}"
37- owner: "${{ inputs.owner }}"
38-
44+ cat <<EOF > nodegroup-details.yaml
3945 managedNodeGroups:
4046 - name: ng-amd64
4147 instanceTypes:
@@ -63,4 +69,104 @@ runs:
6369 effect: "NoExecute"
6470 EOF
6571
72+ - name : Create nodegroup details (EGW mode)
73+ if : ${{ inputs.mode == 'egw' }}
74+ shell : bash
75+ run : |
76+ cat <<EOF > nodegroup-details.yaml
77+ managedNodeGroups:
78+ - name: ng-amd64-client
79+ instanceTypes:
80+ - m5n.xlarge
81+ availabilityZones:
82+ - ${{ inputs.egw_default_zone }}
83+ desiredCapacity: ${{ inputs.client_node_number }}
84+ spot: false
85+ privateNetworking: true
86+ volumeType: "gp3"
87+ volumeSize: 20
88+ maxPodsPerNode: 110
89+ taints:
90+ - key: "node.cilium.io/agent-not-ready"
91+ value: "true"
92+ effect: "NoExecute"
93+ labels:
94+ role.scaffolding/egw-client: "true"
95+ - name: ng-amd64-egw-node
96+ instanceTypes:
97+ - m5n.xlarge
98+ availabilityZones:
99+ - ${{ inputs.egw_default_zone }}
100+ desiredCapacity: 1
101+ spot: false
102+ privateNetworking: true
103+ volumeType: "gp3"
104+ volumeSize: 20
105+ maxPodsPerNode: 110
106+ taints:
107+ - key: "node.cilium.io/agent-not-ready"
108+ value: "true"
109+ effect: "NoExecute"
110+ labels:
111+ role.scaffolding/egw-node: "true"
112+ - name: ng-amd64-heapster
113+ instanceTypes:
114+ - m5n.xlarge
115+ availabilityZones:
116+ - ${{ inputs.egw_default_zone }}
117+ desiredCapacity: 1
118+ spot: false
119+ privateNetworking: true
120+ volumeType: "gp3"
121+ volumeSize: 20
122+ maxPodsPerNode: 110
123+ taints:
124+ - key: "node.cilium.io/agent-not-ready"
125+ value: "true"
126+ effect: "NoExecute"
127+ labels:
128+ role.scaffolding/monitoring: "true"
129+ - name: ng-amd64-no-cilium
130+ instanceTypes:
131+ - m5n.xlarge
132+ availabilityZones:
133+ - ${{ inputs.egw_no_cilium_zone }}
134+ desiredCapacity: 1
135+ spot: false
136+ privateNetworking: true
137+ volumeType: "gp3"
138+ volumeSize: 20
139+ taints:
140+ - key: "cilium.io/no-schedule"
141+ value: "true"
142+ effect: "NoSchedule"
143+ labels:
144+ cilium.io/no-schedule: "true"
145+ # Manually inject a dummy CNI configuration to let the Kubelet turn
146+ # ready. This is necessary as otherwise the node creation would
147+ # never complete. Regardless, no pods will be scheduled here given
148+ # that the node is tainted.
149+ preBootstrapCommands:
150+ - "echo '{ \"cniVersion\": \"0.3.1\", \"name\": \"dummy\", \"type\": \"dummy-cni\", \"log-file\": \"/var/run/dummy.log\" }' > /etc/cni/net.d/05-dummy.conf"
151+ EOF
152+
153+ - name : Create EKS nodegroup
154+ shell : bash
155+ run : |
156+ cat <<EOF > eks-nodegroups.yaml
157+ apiVersion: eksctl.io/v1alpha5
158+ kind: ClusterConfig
159+
160+ metadata:
161+ name: ${{ inputs.cluster_name }}
162+ region: ${{ inputs.region }}
163+ version: "${{ inputs.version }}"
164+ tags:
165+ usage: "${{ github.repository_owner }}-${{ github.event.repository.name }}"
166+ owner: "${{ inputs.owner }}"
167+
168+ EOF
169+
170+ cat ./nodegroup-details.yaml >> ./eks-nodegroups.yaml
171+
66172 eksctl create nodegroup -f ./eks-nodegroups.yaml
0 commit comments