cluster-api icon indicating copy to clipboard operation
cluster-api copied to clipboard

[e2e] Use different K8s version with each ClusterctlUpgrade test

Open sedefsavas opened this issue 4 years ago • 13 comments

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

sedefsavas avatar Nov 19 '21 00:11 sedefsavas

/kind feature

sedefsavas avatar Nov 19 '21 00:11 sedefsavas

+1

sbueringer avatar Nov 19 '21 10:11 sbueringer

/area testing

sbueringer avatar Nov 19 '21 10:11 sbueringer

/milestone v1.2 /help It will be great to add few more detail so this qualifies as a good first issue

fabriziopandini avatar Jan 26 '22 14:01 fabriziopandini

@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.

k8s-ci-robot avatar Jan 26 '22 14:01 k8s-ci-robot

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 :)

sbueringer avatar Jan 26 '22 14:01 sbueringer

/good-first-issue given that the ask is very similar to what already implemented for InitWithBinary

fabriziopandini avatar Jan 26 '22 20:01 fabriziopandini

@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.

k8s-ci-robot avatar Jan 26 '22 20:01 k8s-ci-robot

/assign

arvpo avatar Jan 27 '22 06:01 arvpo

/assign

whtssub avatar Feb 26 '22 07:02 whtssub

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar May 27 '22 07:05 k8s-triage-robot

/remove-lifecycle stale /lifecycle active

sbueringer avatar May 27 '22 08:05 sbueringer

/triage accepted

fabriziopandini avatar Aug 05 '22 17:08 fabriziopandini