Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2e] Use different K8s version with each ClusterctlUpgrade test #5704

Closed
sedefsavas opened this issue Nov 19, 2021 · 13 comments · Fixed by #7244
Closed

[e2e] Use different K8s version with each ClusterctlUpgrade test #5704

sedefsavas opened this issue Nov 19, 2021 · 13 comments · Fixed by #7244
Assignees
Labels
area/testing Issues or PRs related to testing good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sedefsavas
Copy link

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

InitWithBinary string

@sedefsavas sedefsavas changed the title [e2e] Use different K8s version with each ClusterctlUpgrade e2e call [e2e] Use different K8s version with each ClusterctlUpgrade test Nov 19, 2021
@sedefsavas
Copy link
Author

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 19, 2021
@sbueringer
Copy link
Member

+1

@sbueringer
Copy link
Member

/area testing

@fabriziopandini
Copy link
Member

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

@k8s-ci-robot
Copy link
Contributor

@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 k8s-ci-robot added this to the v1.2 milestone Jan 26, 2022
@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 26, 2022
@sbueringer
Copy link
Member

sbueringer commented Jan 26, 2022

Some details:

The clusterctl upgrade test currently takes the following configuration as input parameter:

type ClusterctlUpgradeSpecInput struct {
E2EConfig *clusterctl.E2EConfig
ClusterctlConfigPath string
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
// InitWithBinary can be used to override the INIT_WITH_BINARY e2e config variable with the URL of the clusterctl binary of the old version of Cluster API. The spec will interpolate the
// strings `{OS}` and `{ARCH}` to `runtime.GOOS` and `runtime.GOARCH` respectively, e.g. https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/clusterctl-{OS}-{ARCH}
InitWithBinary string
// InitWithProvidersContract can be used to override the INIT_WITH_PROVIDERS_CONTRACT e2e config variable with a specific
// provider contract to use to initialise the secondary management cluster, e.g. `v1alpha3`
InitWithProvidersContract string
SkipCleanup bool
PreInit func(managementClusterProxy framework.ClusterProxy)
PreUpgrade func(managementClusterProxy framework.ClusterProxy)
PostUpgrade func(managementClusterProxy framework.ClusterProxy)
MgmtFlavor string
WorkloadFlavor string
}

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

@fabriziopandini
Copy link
Member

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

@k8s-ci-robot
Copy link
Contributor

@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 k8s-ci-robot added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jan 26, 2022
@arvryna
Copy link

arvryna commented Jan 27, 2022

/assign

@SubhasmitaSw
Copy link
Contributor

/assign

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 27, 2022
@sbueringer
Copy link
Member

/remove-lifecycle stale
/lifecycle active

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 27, 2022
@fabriziopandini fabriziopandini added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 29, 2022
@fabriziopandini fabriziopandini removed this from the v1.2 milestone Jul 29, 2022
@fabriziopandini fabriziopandini removed the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 29, 2022
@fabriziopandini
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
7 participants