Skip to content

Commit

Permalink
Merge pull request #359 from furkatgofurov7/add-metadata
Browse files Browse the repository at this point in the history
Add release-0.4 metadata
  • Loading branch information
furkatgofurov7 committed Jul 8, 2024
2 parents 07eef9b + ccc265e commit ad8a159
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 8 deletions.
3 changes: 3 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ releaseSeries:
contract: v1beta1
- major: 0
minor: 3
contract: v1beta1
- major: 0
minor: 4
contract: v1beta1
56 changes: 52 additions & 4 deletions test/e2e/config/e2e_conf.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
managementClusterName: caprke2-e2e

images:
- name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:v0.2.7
- name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:v0.4.0
loadBehavior: tryLoad
- name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-controlplane:v0.2.7
- name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-controlplane:v0.4.0
loadBehavior: tryLoad
- name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:dev
loadBehavior: mustLoad
Expand Down Expand Up @@ -64,7 +64,31 @@ providers:
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: v0.3.99
- name: "v0.3.0"
value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.3.0/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../../../metadata.yaml"
targetName: "metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: "v0.4.0"
value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.4.0/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../../../metadata.yaml"
targetName: "metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: v0.4.99
value: "../../../controlplane/config/default"
contract: v1beta1
files:
Expand All @@ -90,7 +114,31 @@ providers:
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: v0.3.99
- name: "v0.3.0"
value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.3.0/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../../../metadata.yaml"
targetName: "metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: "v0.4.0"
value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.4.0/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../../../metadata.yaml"
targetName: "metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- old: "--leader-elect"
new: "--leader-elect=false"
- name: v0.4.99
value: ../../../bootstrap/config/default
contract: v1beta1
files:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ func initBootstrapCluster(bootstrapClusterProxy framework.ClusterProxy, config *
InfrastructureProviders: config.InfrastructureProviders(),
IPAMProviders: config.IPAMProviders(),
RuntimeExtensionProviders: config.RuntimeExtensionProviders(),
BootstrapProviders: []string{"rke2-bootstrap"},
ControlPlaneProviders: []string{"rke2-control-plane"},
BootstrapProviders: []string{"rke2-bootstrap:v0.4.0"},
ControlPlaneProviders: []string{"rke2-control-plane:v0.4.0"},
LogFolder: filepath.Join(artifactFolder, "clusters", bootstrapClusterProxy.GetName()),
}, config.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
}
Expand Down
13 changes: 11 additions & 2 deletions test/e2e/e2e_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,21 @@ var _ = Describe("Workload cluster creation", func() {
ControlPlane: client.ObjectKeyFromObject(result.LegacyControlPlane),
}, e2eConfig.GetIntervals(specName, "wait-control-plane")...)

By("Upgrading to v0.3.0 boostrap/controlplane provider version")
clusterctl.UpgradeManagementClusterAndWait(ctx, clusterctl.UpgradeManagementClusterAndWaitInput{
ClusterProxy: bootstrapClusterProxy,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapProviders: []string{"rke2-bootstrap:v0.3.0"},
ControlPlaneProviders: []string{"rke2-control-plane:v0.3.0"},
LogFolder: clusterctlLogFolder,
}, e2eConfig.GetIntervals(specName, "wait-controllers")...)

By("Upgrading to current boostrap/controlplane provider version")
clusterctl.UpgradeManagementClusterAndWait(ctx, clusterctl.UpgradeManagementClusterAndWaitInput{
ClusterProxy: bootstrapClusterProxy,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapProviders: []string{"rke2-bootstrap:v0.3.99"},
ControlPlaneProviders: []string{"rke2-control-plane:v0.3.99"},
BootstrapProviders: []string{"rke2-bootstrap:v0.4.99"},
ControlPlaneProviders: []string{"rke2-control-plane:v0.4.99"},
LogFolder: clusterctlLogFolder,
}, e2eConfig.GetIntervals(specName, "wait-controllers")...)

Expand Down

0 comments on commit ad8a159

Please sign in to comment.