[e2e] Use different K8s version with each ClusterctlUpgrade test
In ClusterctlUpgrade e2e test, independent of the clusterctl version specified with INIT_WITH_BINARY, we can only specify a single K8s version (INIT_WITH_KUBERNETES_VERSION) for the cluster.
More specifically, providers might call ClusterctlUpgrade to test both v1alpha3-->v1beta1 test and v1alpha4-->v1beta1 upgrade, but both calls use the same K8s version specified with INIT_WITH_KUBERNETES_VERSION.
One way to use a different version for each upgrade test, instead of parsing a pre-defined variable, we can add a field for the K8s version in ClusterctlUpgradeSpecInput similar to https://github.com/kubernetes-sigs/cluster-api/blob/aafa086da595450ff1f75d4a29b213c873f15e4d/test/e2e/clusterctl_upgrade.go#L61
/kind feature
+1
/area testing
/milestone v1.2 /help It will be great to add few more detail so this qualifies as a good first issue
@fabriziopandini: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/milestone v1.2 /help It will be great to add few more detail so this qualifies as a good first issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Some details:
The clusterctl upgrade test currently takes the following configuration as input parameter: https://github.com/kubernetes-sigs/cluster-api/blob/3d2876c5b9a13f9c36b042bfb474a109808b6b59/test/e2e/clusterctl_upgrade.go#L56-L73 Additional configuration can be set via environment variables.
Some configuration can be set both via environment variables and the ClusterctlUpgradeSpecInput struct.
The Kubernetes version we use for the clusterctl init at the beginning of the test can currently only be set via the INIT_WITH_KUBERNETES_VERSION environment variable. Goal of this issue is to add a field to the ClusterctlUpgradeSpecInput so the init Kubernetes version can be also set via the struct.
Essentially, we want an InitWithKubernetesVersion field which works the same way as InitWithBinary. If InitWithKubernetesVersion is set, this version should be used. Otherwise we want to fallback to the environment variable.
Feel free to ask here or in Slack if there are any questions :)
/good-first-issue given that the ask is very similar to what already implemented for InitWithBinary
@fabriziopandini: This request has been marked as suitable for new contributors.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.
In response to this:
/good-first-issue given that the ask is very similar to what already implemented for InitWithBinary
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign
/assign
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale /lifecycle active
/triage accepted