Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Dec 12, 2023
1 parent a5ffd1d commit b0c947e
Show file tree
Hide file tree
Showing 28 changed files with 46 additions and 3,760 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ endif
GINKGO_FOCUS ?=
GINKGO_SKIP ?=
GINKGO_TIMEOUT ?= 2h
E2E_CONF_FILE ?= "$(abspath test/e2e/config/vsphere-dev.yaml)"
INTEGRATION_CONF_FILE ?= "$(abspath test/integration/integration-dev.yaml)"
E2E_CONF_FILE ?= $(abspath test/e2e/config/vsphere-dev.yaml)
INTEGRATION_CONF_FILE ?= $(abspath test/integration/integration-dev.yaml)
E2E_TEMPLATE_DIR := $(abspath test/e2e/data/infrastructure-vsphere/)
SKIP_RESOURCE_CLEANUP ?= false
USE_EXISTING_CLUSTER ?= false
Expand Down
2 changes: 2 additions & 0 deletions packaging/flavorgen/flavors/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ func kubeVipEnabledPatch() clusterv1.ClusterClassPatch {
Op: "add",
Path: "/spec/template/spec/kubeadmConfigSpec/files/-",
ValueFrom: &clusterv1.JSONPatchValue{
// This patch ensures that the ControlPlaneIP which is set as variable `controlPlaneIPAddr` is also set
// in the kube-vip static pod manifest.
Template: pointer.String(`owner: root:root
path: "/etc/kubernetes/manifests/kube-vip.yaml"
content: {{ printf "%q" (regexReplaceAll "(name: address\n +value:).*" .kubeVipPodManifest (printf "$1 %s" .controlPlaneIpAddr)) }}`),
Expand Down
24 changes: 12 additions & 12 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,54 @@ limitations under the License.
package e2e

import (
"context"

. "github.com/onsi/ginkgo/v2"
capi_e2e "sigs.k8s.io/cluster-api/test/e2e"
)

var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.8=>current, CAPI 1.5=>1.6) [ClusterClass]", func() {
capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput {
capi_e2e.ClusterctlUpgradeSpec(ctx, 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.4/clusterctl-{OS}-{ARCH}",
InitWithCoreProvider: "cluster-api:v1.5.4",
InitWithBootstrapProviders: []string{"kubeadm:v1.5.4"},
InitWithControlPlaneProviders: []string{"kubeadm:v1.5.4"},
InitWithInfrastructureProviders: []string{"vsphere:v1.8.4"},
InitWithRuntimeExtensionProviders: []string{},
InitWithKubernetesVersion: "v1.28.0",
WorkloadKubernetesVersion: "v1.28.0",
WorkloadFlavor: "workload",
// InitWithKubernetesVersion should be the highest kubernetes version supported by the init Cluster API version.
// This is to guarantee that both, the old and new CAPI version, support the defined version.
InitWithKubernetesVersion: "v1.28.0",
WorkloadKubernetesVersion: "v1.28.0",
WorkloadFlavor: "workload",
}
})
})

var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.7=>current, CAPI 1.4=>1.6) [ClusterClass]", func() {
capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput {
capi_e2e.ClusterctlUpgradeSpec(ctx, 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.4.9/clusterctl-{OS}-{ARCH}",
InitWithCoreProvider: "cluster-api:v1.4.9",
InitWithBootstrapProviders: []string{"kubeadm:v1.4.9"},
InitWithControlPlaneProviders: []string{"kubeadm:v1.4.9"},
InitWithInfrastructureProviders: []string{"vsphere:v1.7.4"},
InitWithRuntimeExtensionProviders: []string{},
InitWithKubernetesVersion: "v1.27.3",
WorkloadKubernetesVersion: "v1.27.3",
WorkloadFlavor: "workload",
// InitWithKubernetesVersion should be the highest kubernetes version supported by the init Cluster API version.
// This is to guarantee that both, the old and new CAPI version, support the defined version.
InitWithKubernetesVersion: "v1.27.3",
WorkloadKubernetesVersion: "v1.27.3",
WorkloadFlavor: "workload",
}
})
})
12 changes: 6 additions & 6 deletions test/e2e/config/vsphere-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -54,7 +54,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.7/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -78,7 +78,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -88,7 +88,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -112,7 +112,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -122,7 +122,7 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand Down
24 changes: 12 additions & 12 deletions test/e2e/config/vsphere-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.4.
- name: v1.4.9
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4./core-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.9/core-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.7/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -81,17 +81,17 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.4.
- name: v1.4.9
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4./bootstrap-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.9/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand All @@ -115,17 +115,17 @@ providers:
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.4.
- name: v1.4.9
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4./control-plane-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.9/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/main/v1beta1/metadata.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
Expand Down
Loading

0 comments on commit b0c947e

Please sign in to comment.