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

remove subnet from the output in kubectl get #1609

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

jichenjc
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1608

Special notes for your reviewer:

we made it subnets now , seems we can't get it if it's CRD
kubernetes-sigs/controller-tools#652

so remove seems better than show nothing ..

type NetworkStatusWithSubnets struct {
        NetworkStatus `json:",inline"`

        // Subnets is a list of subnets associated with the default cluster network. Machines which use the default cluster network will get an address from all of these subnets.
        Subnets []Subnet `json:"subnets,omitempty"`
}

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 14, 2023
@netlify
Copy link

netlify bot commented Jul 14, 2023

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 8f3dbff
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/64b0c32e3bb09e00084222a8
😎 Deploy Preview https://deploy-preview-1609--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 14, 2023
@jichenjc
Copy link
Contributor Author

@mdbooth pleaes take a quick look :)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, mnaser

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

@jichenjc
Copy link
Contributor Author

jichenjc commented Jul 14, 2023

/test pull-cluster-api-provider-openstack-e2e-test

1 similar comment
@jichenjc
Copy link
Contributor Author

/test pull-cluster-api-provider-openstack-e2e-test

Copy link
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

I knew it would be something like that! Thanks.

Are users going to miss this information? Is there any way to specify all subnet ids from the new slice in the JSONPath?

@jichenjc
Copy link
Contributor Author

subnet => subnets means this is array.., as in the commit msg, I searched kubernetes-sigs/controller-tools#652 but seems they don't want to support it or maybe I missed something ?

@mdbooth
Copy link
Contributor

mdbooth commented Jul 14, 2023

It looks like yes: https://kubernetes.io/docs/reference/kubectl/jsonpath/

I can try to construct the correct incantation when I get back if you like (I'm on my phone right now).

Or... we could report network id instead.

Or just remove it like this. I don't understand how this information is used in practise, so it's hard for me to judge. That's the only reason I feel like the safest thing might be to retain it as a list of subnet ids.

What do you think?

@jichenjc
Copy link
Contributor Author

jichenjc commented Jul 14, 2023

no rush :)

I think we already provide net id ?
#1608 (comment)

I believe if they need subnet ID they can always describe ? if we can figure out better later we can add it back
for now, remove the heading is better than emty value to confuse people ?

@mdbooth
Copy link
Contributor

mdbooth commented Jul 19, 2023

/lgtm

Lets get rid of it because, as you say: it's definitely wrong right now. We can add subnets later if anybody asks for it, but as we're removing subnet anyway I think this is reasonable.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2023
@jichenjc
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit 434cfe2 into kubernetes-sigs:main Jul 20, 2023
10 checks passed
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. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubectl describe reports empty subnet in v1alpha7
4 participants