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

Stop trying to populate arbitrary cluster fields from the channel #14691

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

johngmyers
Copy link
Member

When I refactored Spec.Networking to be a non-pointer, this code started forcing new clusters to have Kubenet.

This seems to be an extremely dubious feature.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 30, 2022
@hakman
Copy link
Member

hakman commented Dec 1, 2022

Would it be safe to also start ignoring the the cluster field in ChannelSpec in general (maybe even removing it)?
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2022
@johngmyers
Copy link
Member Author

This does ignore the cluster field in ChannelSpec. We can't remove it from the published channels, as the previous code requires it be present in order to look at the kubernetesVersion field of the appropriate kOps version.

Comment on lines -205 to -206
if channel.Spec.Cluster != nil {
cluster.Spec = *channel.Spec.Cluster
Copy link
Member

@hakman hakman Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intention here was to be able to populate ClusterSpec from channels. I guess this is more or less unused.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except it then overwrites large sections of the config.

The current code works only because it overwrites the kubenet setting in the channel with a blank networking struct.

@hakman
Copy link
Member

hakman commented Dec 1, 2022

This does ignore the cluster field in ChannelSpec. We can't remove it from the published channels, as the previous code requires it be present in order to look at the kubernetesVersion field of the appropriate kOps version.

I meant that, we could do something in API like Cluster *ClusterSpec json:"-"``, to make it clear that it's ignored and deprecated.

@hakman
Copy link
Member

hakman commented Dec 1, 2022

Let's go with it, we can optimise late if needed.
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2022
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@johngmyers
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit cfde66d into kubernetes:master Dec 1, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Dec 1, 2022
@johngmyers johngmyers deleted the no-channel-cluster branch December 1, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants