Skip to content

Commit

Permalink
CC test
Browse files Browse the repository at this point in the history
  • Loading branch information
shivi28 committed Jun 23, 2022
1 parent f691bcf commit 5fff532
Show file tree
Hide file tree
Showing 6 changed files with 421 additions and 202 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ jobs:
- name: Set netfilter conntrack max
run: sudo sysctl -w net.netfilter.nf_conntrack_max=131072

- name: Run Cluster Class e2e tests
run: yes | GINKGO_FOCUS="\[Cluster-Class\]" make test-e2e

- name: Run PR-Blocking e2e tests
run: yes | GINKGO_FOCUS="\[PR-Blocking\]" make test-e2e
3 changes: 3 additions & 0 deletions test/e2e/config/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ providers:
files:
# Add a cluster template
- sourcePath: "../data/infrastructure-provider-byoh/v1beta1/templates/e2e/cluster-template.yaml"
- sourcePath: "../data/infrastructure-provider-byoh/v1beta1/templates/e2e/clusterclass-quickstart.yaml"
- sourcePath: "../data/infrastructure-provider-byoh/v1beta1/templates/e2e/cluster-template-topology.yaml"
- sourcePath: "../../../metadata.yaml"
variables:
# default variables for the e2e test; those values could be overridden via env variables, thus
Expand All @@ -91,6 +93,7 @@ variables:
CNI: "./data/cni/kindnet/kindnet.yaml"
EXP_CLUSTER_RESOURCE_SET: "true"
EXP_MACHINE_POOL: "true"
CLUSTER_TOPOLOGY: "true"
KUBETEST_CONFIGURATION: "./data/kubetest/conformance.yaml"
NODE_DRAIN_TIMEOUT: "60s"
# NOTE: INIT_WITH_BINARY is used only by the clusterctl upgrade test to initialize the management cluster to be upgraded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ spec:
clusterNetwork:
services:
cidrBlocks:
- "10.128.0.0/12"
- 10.128.0.0/12
pods:
cidrBlocks:
- "192.168.0.0/16"
serviceDomain: "cluster.local"
- 192.168.0.0/16
serviceDomain: cluster.local
topology:
class: ${CLUSTER_CLASS_NAME}
version: ${KUBERNETES_VERSION}
class: quickstart
version: v1.23.5
controlPlane:
metadata: {}
replicas: 1
variables:
- name: bundleLookupBaseRegistry
value: "projects.registry.vmware.com/cluster_api_provider_bringyourownhost"
- name: controlPlaneIpAddr
value: ${CONTROL_PLANE_ENDPOINT}
value: ${CONTROL_PLANE_ENDPOINT_IP}
- name: kubeVipPodManifest
value: |
apiVersion: v1
Expand All @@ -47,7 +47,7 @@ spec:
- name: vip_leaderelection
value: "true"
- name: vip_address
value: ${CONTROL_PLANE_ENDPOINT}
value: ${CONTROL_PLANE_ENDPOINT_IP}
- name: vip_interface
value: "{{ .DefaultNetworkInterfaceName }}"
- name: vip_leaseduration
Expand Down Expand Up @@ -81,7 +81,142 @@ spec:
status: {}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
- class: quickstart-worker
metadata: { }
name: md-0
replicas: 1
---
kind: KubeadmControlPlaneTemplate
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
metadata:
name: quickstart-control-plane
namespace: ${NAMESPACE}
spec:
template:
spec:
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
certSANs:
- localhost
- 127.0.0.1
- 0.0.0.0
- host.docker.internal
controllerManager:
extraArgs:
enable-hostpath-provisioner: "true"
files:
- owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
initConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
ignorePreflightErrors:
- Swap
- DirAvailable--etc-kubernetes-manifests
- FileAvailable--etc-kubernetes-kubelet.conf
kubeletExtraArgs:
cgroup-driver: cgroupfs
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
joinConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
ignorePreflightErrors:
- Swap
- DirAvailable--etc-kubernetes-manifests
- FileAvailable--etc-kubernetes-kubelet.conf
kubeletExtraArgs:
cgroup-driver: cgroupfs
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: ByoMachineTemplate
metadata:
name: quickstart-control-plane-machine
namespace: ${NAMESPACE}
spec:
template:
spec:
installerRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: K8sInstallerConfigTemplate
name: quickstart-control-plane-machine
namespace: "${NAMESPACE}"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: K8sInstallerConfigTemplate
metadata:
name: quickstart-control-plane-machine
namespace: ${NAMESPACE}
spec:
template:
spec:
bundleRepo: projects.registry.vmware.com/cluster_api_provider_bringyourownhost
bundleType: k8s
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: ByoClusterTemplate
metadata:
name: quickstart-cluster
namespace: ${NAMESPACE}
spec:
template:
spec: {}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: quickstart-worker-bootstrap-template
namespace: ${NAMESPACE}
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cgroup-driver: cgroupfs
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: ByoMachineTemplate
metadata:
name: quickstart-worker-machinetemplate
namespace: ${NAMESPACE}
spec:
template:
spec:
installerRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: K8sInstallerConfigTemplate
name: ${CLUSTER_NAME}-md-0
namespace: ${NAMESPACE}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: K8sInstallerConfigTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
spec:
template:
spec:
bundleRepo: projects.registry.vmware.com/cluster_api_provider_bringyourownhost
bundleType: k8s
---
apiVersion: v1
binaryData: null
data: ${CNI_RESOURCES}
kind: ConfigMap
metadata:
name: cni-${CLUSTER_NAME}-crs-0
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: ${CLUSTER_NAME}-crs-0
spec:
clusterSelector:
matchLabels:
cni: ${CLUSTER_NAME}-crs-0
resources:
- kind: ConfigMap
name: cni-${CLUSTER_NAME}-crs-0
strategy: ApplyOnce
Loading

0 comments on commit 5fff532

Please sign in to comment.