-
Notifications
You must be signed in to change notification settings - Fork 181
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
(wip) Update vm-operator spec to v1alpha2 #2831
(wip) Update vm-operator spec to v1alpha2 #2831
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adikul30 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 |
cdac8da
to
b3403f7
Compare
pkg/syncer/cnsoperator/util/util.go
Outdated
@@ -127,7 +153,7 @@ func GetTKGVMIP(ctx context.Context, vmOperatorClient client.Client, dc dynamic. | |||
return "", fmt.Errorf("failed to get SNAT IP annotation from VirtualMachine %s/%s", vmNamespace, vmName) | |||
} | |||
} else { | |||
networkInterfaceName := networkName + "-" + vmName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use latest image with this change on the older setup with v1alpha1 API, then are we breaking this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if this change is run on a setup where VMs are deployed with spec from v1alpha1 then this logic won't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VM operator team confirmed offline that in case of upgrades, this conversion webhook https://github.com/vmware-tanzu/vm-operator/blob/ace7d6109146e8350df8e49fac8f8ebbf3141487/api/v1alpha1/virtualmachine_conversion.go#L29 will handle converting CRDs from v1alpha1 to v1alpha2 so we don't have to worry about such a scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface name pattern is not something about which y'all should care. In VM Op this depends on a myriad of factors. Why are y'all using it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @bryanv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This knowledge should not be here. The prior or current network interface CR naming convention is not anything sort of contract. This also has assumptions about how CAPV works today by not doing defaulting via an empty NetworkName, not using DHCP, and is broke for the upcoming VCP work since that uses a new CRD.
This isn't something that the conversion webhook matters here because the underlying network interface CR has a different naming convention with the v1a2 work because the Spec.Network.Interfaces[] now has a Name field.
Why isn't this using what's in the VM.Status?
/ok-to-test |
tests/e2e/vmservice_utils.go
Outdated
@@ -338,10 +346,10 @@ func waitNgetVmsvcVmIp(ctx context.Context, c ctlrclient.Client, namespace strin | |||
} | |||
return false, nil | |||
} | |||
if vm.Status.VmIp == "" { | |||
if vm.Status.Network.PrimaryIP4 == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm.Status.Network
is a pointer that can be nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
tests/e2e/vmservice_utils.go
Outdated
"golang.org/x/crypto/ssh" | ||
|
||
vmopv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1" | ||
vmopv2 "github.com/vmware-tanzu/vm-operator/api/v1alpha2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: keep your import alias as vmopv1
`cause it is still v1 and the diff is smaller. For whenever we get around to a v1a3, it will be an small, incremental change from v1a2 so most likely the only change required here will be to update the import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
7c1eb3f
to
0a3698e
Compare
2c21b4c
to
81f4143
Compare
81f4143
to
76eee40
Compare
|
cc: @nikhilbarge |
PR needs rebase. 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-sigs/prow repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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-sigs/prow repository. |
What this PR does / why we need it:
vm-operator has shifted from API version
v1alpha1
tov1alpha2
. CSI moving it's client from v1a1 to v1a2 would mean the vm-op conversion webhook won't be involved thus saving time and resources.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Testing done:
#2831 (comment)
Special notes for your reviewer:
Release note: