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

Replace deprecated loadBalancerIP field from created Service objects with custom annotations #156

Open
srm09 opened this issue Jun 2, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@srm09
Copy link
Contributor

srm09 commented Jun 2, 2023

Please describe the solution you would like.
The VirtualMachineService controller has the logic to create a Service CR without selectors which gets the load balancer IP address as provided by the configured LoadBalancer provider. Currently, the created Service CR has the IP address populates in its Spec.loadBalancerIP field.
This field has been deprecated since k8s 1.24 and will be removed in a future release. The alternate course of action suggested is to use a custom annotation to set the information on the Service object instead of setting the spec.loadBalancerIP value on the Service CR.

This issue is to track updating the controller logic for the VirtualMachineService CR to set the load balancer IP address via a custom annotation along with setting the value on the Service.Spec.loadBalancerIP. Eventually, for backwards compatibility we will need to replace the logic for the creation of a Service object with:

  1. Fetch the existing Service object, if any, into a k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured type
  2. Depending upon the presence of the loadBalancerIP field, we'd set the custom annotation on the Service CR.
  3. Update the object with the newer annotation type.

Is there anything else you would like to add?
The documentation for the deprecation and the alternate course of action can be found here:

@srm09 srm09 added enhancement New feature or request help wanted Extra attention is needed labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant