-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add e2e test for internal load balancer
Adds an e2e test when the internal load balancer is configured. This requires #1222
- Loading branch information
Showing
4 changed files
with
172 additions
and
1 deletion.
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
146 changes: 146 additions & 0 deletions
146
test/e2e/data/infrastructure-gcp/cluster-template-ci-with-internal-lb.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,146 @@ | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: "${CLUSTER_NAME}" | ||
labels: | ||
cni: "${CLUSTER_NAME}-crs-cni" | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: ["192.168.0.0/16"] | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPCluster | ||
name: "${CLUSTER_NAME}" | ||
controlPlaneRef: | ||
kind: KubeadmControlPlane | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
name: "${CLUSTER_NAME}-control-plane" | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPCluster | ||
metadata: | ||
name: "${CLUSTER_NAME}" | ||
spec: | ||
project: "${GCP_PROJECT}" | ||
region: "${GCP_REGION}" | ||
network: | ||
name: "${GCP_NETWORK_NAME}" | ||
subnets: | ||
- name: control-plane-subnet | ||
cidrBlock: "10.0.0.0/17" | ||
purpose: PRIVATE | ||
region: us-east4 | ||
loadBalancer: | ||
loadBalancerType: InternalExternal | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
machineTemplate: | ||
infrastructureRef: | ||
kind: GCPMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
name: "${CLUSTER_NAME}-control-plane" | ||
kubeadmConfigSpec: | ||
useExperimentalRetryJoin: true | ||
initConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
clusterConfiguration: | ||
apiServer: | ||
timeoutForControlPlane: 20m | ||
extraArgs: | ||
cloud-provider: gce | ||
controllerManager: | ||
extraArgs: | ||
cloud-provider: gce | ||
allocate-node-cidrs: "false" | ||
kubernetesVersion: "${KUBERNETES_VERSION}" | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
version: "${KUBERNETES_VERSION}" | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
template: | ||
spec: | ||
instanceType: "${GCP_CONTROL_PLANE_MACHINE_TYPE}" | ||
image: "${IMAGE_ID}" | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
replicas: ${WORKER_MACHINE_COUNT} | ||
selector: | ||
matchLabels: | ||
template: | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
version: "${KUBERNETES_VERSION}" | ||
bootstrap: | ||
configRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
infrastructureRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
instanceType: "${GCP_NODE_MACHINE_TYPE}" | ||
image: "${IMAGE_ID}" | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
name: '{{ ds.meta_data.local_hostname.split(".")[0] }}' | ||
kubeletExtraArgs: | ||
cloud-provider: gce | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "${CLUSTER_NAME}-crs-cni" | ||
data: ${CNI_RESOURCES} | ||
--- | ||
apiVersion: addons.cluster.x-k8s.io/v1beta1 | ||
kind: ClusterResourceSet | ||
metadata: | ||
name: "${CLUSTER_NAME}-crs-cni" | ||
spec: | ||
strategy: ApplyOnce | ||
clusterSelector: | ||
matchLabels: | ||
cni: "${CLUSTER_NAME}-crs-cni" | ||
resources: | ||
- name: "${CLUSTER_NAME}-crs-cni" | ||
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