-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: killianmuldoon <[email protected]>
- Loading branch information
1 parent
e77d02c
commit c788513
Showing
18 changed files
with
1,222 additions
and
3 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 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,47 @@ | ||
/* | ||
Copyright 2021 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package e2e | ||
|
||
import ( | ||
"context" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
capi_e2e "sigs.k8s.io/cluster-api/test/e2e" | ||
) | ||
|
||
var _ = Describe("Upgrading cluster from CAPV 1.8.X to main using clusterctl [PR-Blocking]", func() { | ||
capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { | ||
return capi_e2e.ClusterctlUpgradeSpecInput{ | ||
E2EConfig: e2eConfig, | ||
ClusterctlConfigPath: clusterctlConfigPath, | ||
BootstrapClusterProxy: bootstrapClusterProxy, | ||
ArtifactFolder: artifactFolder, | ||
SkipCleanup: skipCleanup, | ||
InitWithProvidersContract: "v1beta1", | ||
MgmtFlavor: "remote-management", | ||
InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-{OS}-{ARCH}", | ||
InitWithCoreProvider: "cluster-api:v1.5.2", | ||
InitWithBootstrapProviders: []string{"kubeadm:v1.5.2"}, | ||
InitWithControlPlaneProviders: []string{"kubeadm:v1.5.2"}, | ||
InitWithInfrastructureProviders: []string{"vsphere:v1.8.1"}, | ||
InitWithRuntimeExtensionProviders: []string{}, | ||
InitWithKubernetesVersion: "v1.28.0", | ||
WorkloadKubernetesVersion: "v1.28.0", | ||
WorkloadFlavor: "", | ||
} | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
test/e2e/data/infrastructure-vsphere/main/base/cluster-network-CIDR.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,10 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
namespace: '${NAMESPACE}' | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.30.0/24 |
28 changes: 28 additions & 0 deletions
28
test/e2e/data/infrastructure-vsphere/main/base/cluster-resource-set-csi-insecure.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,28 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: csi-vsphere-config | ||
namespace: '${NAMESPACE}' | ||
stringData: | ||
data: | | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: csi-vsphere-config | ||
namespace: kube-system | ||
stringData: | ||
csi-vsphere.conf: |+ | ||
[Global] | ||
cluster-id = "${NAMESPACE}/${CLUSTER_NAME}" | ||
[VirtualCenter "${VSPHERE_SERVER}"] | ||
insecure-flag = "${VSPHERE_INSECURE_CSI}" | ||
user = "${VSPHERE_USERNAME}" | ||
password = "${VSPHERE_PASSWORD}" | ||
datacenters = "${VSPHERE_DATACENTER}" | ||
[Network] | ||
public-network = "${VSPHERE_NETWORK}" | ||
type: Opaque | ||
type: addons.cluster.x-k8s.io/resource-set |
7 changes: 7 additions & 0 deletions
7
test/e2e/data/infrastructure-vsphere/main/base/cluster-resource-set-label.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,7 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
namespace: '${NAMESPACE}' | ||
labels: | ||
cni: "${CLUSTER_NAME}-crs-cni" |
18 changes: 18 additions & 0 deletions
18
test/e2e/data/infrastructure-vsphere/main/base/cluster-resource-set.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,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "cni-${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: "cni-${CLUSTER_NAME}-crs-cni" | ||
kind: ConfigMap |
2 changes: 2 additions & 0 deletions
2
test/e2e/data/infrastructure-vsphere/main/base/remove-storage-policy.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,2 @@ | ||
- op: remove | ||
path: /spec/template/spec/storagePolicyName |
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,13 @@ | ||
# VSphereMachineTemplate object with the number of CPUs raised to 4 | ||
# for the purposes of mitigating the CPU spikes caused by scaling up | ||
# the control plane (during upgrades and for HA control planes) | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: VSphereMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
namespace: ${NAMESPACE} | ||
spec: | ||
template: | ||
spec: | ||
numCPUs: 4 |
10 changes: 10 additions & 0 deletions
10
test/e2e/data/infrastructure-vsphere/v1.8/bases/cluster-network-CIDR.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,10 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
namespace: '${NAMESPACE}' | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.30.0/24 |
28 changes: 28 additions & 0 deletions
28
test/e2e/data/infrastructure-vsphere/v1.8/bases/cluster-resource-set-csi-insecure.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,28 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: csi-vsphere-config | ||
namespace: '${NAMESPACE}' | ||
stringData: | ||
data: | | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: csi-vsphere-config | ||
namespace: kube-system | ||
stringData: | ||
csi-vsphere.conf: |+ | ||
[Global] | ||
cluster-id = "${NAMESPACE}/${CLUSTER_NAME}" | ||
[VirtualCenter "${VSPHERE_SERVER}"] | ||
insecure-flag = "${VSPHERE_INSECURE_CSI}" | ||
user = "${VSPHERE_USERNAME}" | ||
password = "${VSPHERE_PASSWORD}" | ||
datacenters = "${VSPHERE_DATACENTER}" | ||
[Network] | ||
public-network = "${VSPHERE_NETWORK}" | ||
type: Opaque | ||
type: addons.cluster.x-k8s.io/resource-set |
7 changes: 7 additions & 0 deletions
7
test/e2e/data/infrastructure-vsphere/v1.8/bases/cluster-resource-set-label.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,7 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: '${CLUSTER_NAME}' | ||
namespace: '${NAMESPACE}' | ||
labels: | ||
cni: "${CLUSTER_NAME}-crs-cni" |
18 changes: 18 additions & 0 deletions
18
test/e2e/data/infrastructure-vsphere/v1.8/bases/cluster-resource-set.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,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "cni-${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: "cni-${CLUSTER_NAME}-crs-cni" | ||
kind: ConfigMap |
2 changes: 2 additions & 0 deletions
2
test/e2e/data/infrastructure-vsphere/v1.8/bases/remove-storage-policy.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,2 @@ | ||
- op: remove | ||
path: /spec/template/spec/storagePolicyName |
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,13 @@ | ||
# VSphereMachineTemplate object with the number of CPUs raised to 4 | ||
# for the purposes of mitigating the CPU spikes caused by scaling up | ||
# the control plane (during upgrades and for HA control planes) | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: VSphereMachineTemplate | ||
metadata: | ||
name: ${CLUSTER_NAME} | ||
namespace: ${NAMESPACE} | ||
spec: | ||
template: | ||
spec: | ||
numCPUs: 4 |
Oops, something went wrong.