Skip to content

Commit befe2f4

Browse files
authored
Merge pull request #5121 from nojnhuh/dra-e2e
Add test templates for DRA-enabled clusters
2 parents 1b87cf0 + 5f6f405 commit befe2f4

File tree

10 files changed

+2026
-9
lines changed

10 files changed

+2026
-9
lines changed

templates/test/ci/cluster-template-prow-ci-version-dra.yaml

Lines changed: 981 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- op: add
2+
path: /spec/template/spec/files/-
3+
value:
4+
content: |
5+
#!/bin/bash
6+
7+
echo "enabling containerd CDI plugin"
8+
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
9+
systemctl restart containerd
10+
owner: root:root
11+
path: /tmp/containerd-config.sh
12+
permissions: "0744"
13+
- op: add
14+
path: /spec/template/spec/preKubeadmCommands/0
15+
value: bash -c /tmp/containerd-config.sh
16+
- op: add
17+
path: /spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
18+
value: ${NODE_FEATURE_GATES:-"DynamicResourceAllocation=true"}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
- op: add
2+
path: /spec/kubeadmConfigSpec/files/-
3+
value:
4+
content: |
5+
#!/bin/bash
6+
7+
echo "enabling containerd CDI plugin"
8+
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
9+
systemctl restart containerd
10+
owner: root:root
11+
path: /tmp/containerd-config.sh
12+
permissions: "0744"
13+
- op: add
14+
path: /spec/kubeadmConfigSpec/preKubeadmCommands/0
15+
value: bash -c /tmp/containerd-config.sh
16+
- op: add
17+
path: /spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/feature-gates
18+
value: ${K8S_FEATURE_GATES:-"DynamicResourceAllocation=true"}
19+
- op: add
20+
path: /spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/feature-gates
21+
value: HPAContainerMetrics=true,DynamicResourceAllocation=true
22+
- op: add
23+
path: /spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/runtime-config
24+
value: resource.k8s.io/v1alpha3=true
25+
- op: add
26+
path: /spec/kubeadmConfigSpec/clusterConfiguration/scheduler
27+
value:
28+
extraArgs:
29+
feature-gates: DynamicResourceAllocation=true
30+
- op: add
31+
path: /spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
32+
value: DynamicResourceAllocation=true
33+
- op: add
34+
path: /spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
35+
value: DynamicResourceAllocation=true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$patch: delete
2+
apiVersion: cluster.x-k8s.io/v1beta1
3+
kind: MachineDeployment
4+
metadata:
5+
name: win
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: default
4+
resources:
5+
- ../prow-ci-version
6+
patches:
7+
- path: ../patches/no-windows.yaml
8+
target:
9+
name: .*-win.*
10+
- path: ../patches/dra-kubeadmcontrolplane.yaml
11+
target:
12+
kind: KubeadmControlPlane
13+
- path: ../patches/dra-kubeadmconfigtemplate.yaml
14+
target:
15+
kind: KubeadmConfigTemplate
16+
17+
sortOptions:
18+
order: fifo

0 commit comments

Comments
 (0)