-
Notifications
You must be signed in to change notification settings - Fork 48
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
🐛 Use API Server DNS Names by default when logging into VM Web Console #735
🐛 Use API Server DNS Names by default when logging into VM Web Console #735
Conversation
4296bf1
to
60882f1
Compare
cdb36ef
to
4f4742b
Compare
controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_controller.go
Outdated
Show resolved
Hide resolved
controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_controller.go
Outdated
Show resolved
Hide resolved
641051a
to
374470e
Compare
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.
Thanks for adding this change to support the web console feature in Simplified Supervisor. Left some comments/suggestions and overall LGTM.
controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go
Outdated
Show resolved
Hide resolved
controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go
Outdated
Show resolved
Hide resolved
controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_controller.go
Outdated
Show resolved
Hide resolved
e2427d1
to
6378df7
Compare
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.
Change looks good to me otherwise. Reminder to squash commits into one with a rebase.
ce10654
to
12f6340
Compare
controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_controller.go
Outdated
Show resolved
Hide resolved
controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_intg_test.go
Outdated
Show resolved
Hide resolved
558b911
to
5763b6c
Compare
In certain environments, a load balancer, and therefore a virtual IP, may not be present. In these cases, rather than relying on the virtual IP to log into the VM web console, we need to instead rely on an FQDN / DNS name to login. This change plumbs the API Server DNS Names from the app platform CRD, and uses that by default to login to the VM Web Console. If no DNS Name is found, then we fall back to the previous method of using the virtual IP to login. Testing Done: Used an existing testbed - note that this setup has a load balancer already Setup steps: Deployed a VM named my-vm on test-namespace On control plane VM, changed /usr/lib/vmware-wcp/objects/PodVM-GuestCluster/30-vmop/vmop.yaml file to add rbac permissions for appplatform (since vmop tar won't load those changes) and re-applied yaml Loaded vmop tar image using make docker-build, docker save docker.io/library/vmoperator-controller:latest > vmopfqdn.tar, and deploy-wcp.sh Next, verified that web console returns API Server DNS name for login: root@localhost [ ~ ]# kubectl vsphere vm web-console my-vm -n test-namespace Successfully created a new WebConsoleRequest 'my-vm-b498r' in namespace 'test-namespace' Waiting for the above WebConsoleRequest to be processed... Web-Console URL: https://domain-1.test/vm/web-console?host=10.167.71.251&namespace=test-namespace&port=443&ticket=36fcf5b74000d104f4b3a5038381326f&uuid=77c1da1f-dbea-4bc2-af55-78303afc21d4 This URL is for one-time use and will expire at 2024-10-17T22:12:56Z (in about 2m0s)
5763b6c
to
356a13e
Compare
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.
LGTM, thanks @ammujumdar-bcom!
Minimum allowed line rate is |
What does this PR do, and why is it needed?
In certain environments, a load balancer, and therefore a virtual IP, may not be present. In these cases, rather than relying on the virtual IP to log into the VM web console, we need to instead rely on an FQDN / DNS name to login.
This change plumbs the API Server DNS Names from the app platform CRD, and uses that by default to login to the VM Web Console. If no DNS Name is found, then we fall back to the previous method of using the virtual IP to login.
Testing Done:
Used an existing testbed - note that this setup has a load balancer already
Setup steps:
my-vm
ontest-namespace
/usr/lib/vmware-wcp/objects/PodVM-GuestCluster/30-vmop/vmop.yaml
file to add rbac permissions for appplatform (since vmop tar won't load those changes) and re-applied yamlmake docker-build
,docker save docker.io/library/vmoperator-controller:latest > vmopfqdn.tar
, anddeploy-wcp.sh
Next, verified that web console returns API Server DNS name for login:
Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Are there any special notes for your reviewer:
Please add a release note if necessary: