-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
624ddb0
commit 8cdceba
Showing
20 changed files
with
615 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,4 +110,3 @@ spec: | |
- name: lib-modules | ||
hostPath: | ||
path: /lib/modules | ||
--- |
70 changes: 70 additions & 0 deletions
70
test/e2e/data/infrastructure-docker/bases/cluster-with-kcp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
# DockerCluster object referenced by the Cluster object | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
kind: DockerCluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
--- | ||
# Cluster object with | ||
# - Reference to the KubeadmControlPlane object | ||
# - the label cni=${CLUSTER_NAME}-crs-0, so the cluster can be selected by the ClusterResourceSet. | ||
apiVersion: cluster.x-k8s.io/v1alpha3 | ||
kind: Cluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
labels: | ||
cni: "${CLUSTER_NAME}-crs-0" | ||
spec: | ||
clusterNetwork: | ||
services: | ||
cidrBlocks: ['${DOCKER_SERVICE_CIDRS}'] | ||
pods: | ||
cidrBlocks: ['${DOCKER_POD_CIDRS}'] | ||
serviceDomain: '${DOCKER_SERVICE_DOMAIN}' | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
kind: DockerCluster | ||
name: '${CLUSTER_NAME}' | ||
controlPlaneRef: | ||
kind: KubeadmControlPlane | ||
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 | ||
name: "${CLUSTER_NAME}-control-plane" | ||
--- | ||
# DockerMachineTemplate object referenced by the KubeadmControlPlane object | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
template: | ||
spec: {} | ||
--- | ||
# KubeadmControlPlane referenced by the Cluster object with | ||
# - the label kcp-adoption.step2, because it should be created in the second step of the kcp-adoption test. | ||
kind: KubeadmControlPlane | ||
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
labels: | ||
kcp-adoption.step2: "" | ||
spec: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
infrastructureTemplate: | ||
kind: DockerMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
name: "${CLUSTER_NAME}-control-plane" | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
controllerManager: | ||
extraArgs: {enable-hostpath-provisioner: 'true'} | ||
apiServer: | ||
certSANs: [localhost, 127.0.0.1] | ||
initConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: {eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'} | ||
joinConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: {eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'} | ||
version: "${KUBERNETES_VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# ConfigMap object referenced by the ClusterResourceSet object and with | ||
# the CNI resource defined in the test config file | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "cni-${CLUSTER_NAME}-crs-0" | ||
data: ${CNI_RESOURCES} | ||
binaryData: | ||
--- | ||
# ClusterResourceSet object with | ||
# a selector that targets all the Cluster with label cni=${CLUSTER_NAME}-crs-0 | ||
apiVersion: addons.cluster.x-k8s.io/v1alpha3 | ||
kind: ClusterResourceSet | ||
metadata: | ||
name: "${CLUSTER_NAME}-crs-0" | ||
spec: | ||
strategy: ApplyOnce | ||
clusterSelector: | ||
matchLabels: | ||
cni: "${CLUSTER_NAME}-crs-0" | ||
resources: | ||
- name: "cni-${CLUSTER_NAME}-crs-0" | ||
kind: ConfigMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
# DockerMachineTemplate referenced by the MachineDeployment and with | ||
# - extraMounts for the docker sock, thus allowing self-hosting test | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
extraMounts: | ||
- containerPath: "/var/run/docker.sock" | ||
hostPath: "/var/run/docker.sock" | ||
--- | ||
# KubeadmConfigTemplate referenced by the MachineDeployment | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: {eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'} | ||
--- | ||
# MachineDeployment object with | ||
# - the label nodepool=pool1 that applies to all the machines, so those machine can be targeted by the MachineHealthCheck object | ||
apiVersion: cluster.x-k8s.io/v1alpha3 | ||
kind: MachineDeployment | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
replicas: ${WORKER_MACHINE_COUNT} | ||
selector: | ||
matchLabels: | ||
template: | ||
metadata: | ||
labels: | ||
"nodepool": "pool1" | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
version: "${KUBERNETES_VERSION}" | ||
bootstrap: | ||
configRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 | ||
kind: KubeadmConfigTemplate | ||
infrastructureRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | ||
kind: DockerMachineTemplate |
Oops, something went wrong.