Skip to content

Commit

Permalink
Add test templates for DRA-enabled clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Sep 10, 2024
1 parent 96f023b commit 5f6f405
Show file tree
Hide file tree
Showing 10 changed files with 2,026 additions and 9 deletions.
981 changes: 981 additions & 0 deletions templates/test/ci/cluster-template-prow-ci-version-dra.yaml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions templates/test/ci/patches/dra-kubeadmconfigtemplate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- op: add
path: /spec/template/spec/files/-
value:
content: |
#!/bin/bash
echo "enabling containerd CDI plugin"
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
systemctl restart containerd
owner: root:root
path: /tmp/containerd-config.sh
permissions: "0744"
- op: add
path: /spec/template/spec/preKubeadmCommands/0
value: bash -c /tmp/containerd-config.sh
- op: add
path: /spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
value: ${NODE_FEATURE_GATES:-"DynamicResourceAllocation=true"}
35 changes: 35 additions & 0 deletions templates/test/ci/patches/dra-kubeadmcontrolplane.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- op: add
path: /spec/kubeadmConfigSpec/files/-
value:
content: |
#!/bin/bash
echo "enabling containerd CDI plugin"
sed -i '/\[plugins."io.containerd.grpc.v1.cri"\]/a\ enable_cdi = true' /etc/containerd/config.toml
systemctl restart containerd
owner: root:root
path: /tmp/containerd-config.sh
permissions: "0744"
- op: add
path: /spec/kubeadmConfigSpec/preKubeadmCommands/0
value: bash -c /tmp/containerd-config.sh
- op: add
path: /spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/feature-gates
value: ${K8S_FEATURE_GATES:-"DynamicResourceAllocation=true"}
- op: add
path: /spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/feature-gates
value: HPAContainerMetrics=true,DynamicResourceAllocation=true
- op: add
path: /spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/runtime-config
value: resource.k8s.io/v1alpha3=true
- op: add
path: /spec/kubeadmConfigSpec/clusterConfiguration/scheduler
value:
extraArgs:
feature-gates: DynamicResourceAllocation=true
- op: add
path: /spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
value: DynamicResourceAllocation=true
- op: add
path: /spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/feature-gates
value: DynamicResourceAllocation=true
5 changes: 5 additions & 0 deletions templates/test/ci/patches/no-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$patch: delete
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: win
18 changes: 18 additions & 0 deletions templates/test/ci/prow-ci-version-dra/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ../prow-ci-version
patches:
- path: ../patches/no-windows.yaml
target:
name: .*-win.*
- path: ../patches/dra-kubeadmcontrolplane.yaml
target:
kind: KubeadmControlPlane
- path: ../patches/dra-kubeadmconfigtemplate.yaml
target:
kind: KubeadmConfigTemplate

sortOptions:
order: fifo
Loading

0 comments on commit 5f6f405

Please sign in to comment.