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

Cannot change the type of the Service from ClusterIP to ExternalName with PATCH #2853

Closed
jorsol opened this issue Mar 2, 2021 · 4 comments · Fixed by #2855 or jenkinsci/kubernetes-client-api-plugin#83
Assignees
Labels
Milestone

Comments

@jorsol
Copy link
Contributor

jorsol commented Mar 2, 2021

The PR #2472 fixed the replace method, but the patch method should also handle the update of the service to ExternalName.

It assumes a patch with ClusterIP:

public Service patch(Service item) {
try {
Service old = getMandatory();
return super.patch(new ServiceBuilder(item)
.editSpec()
.withClusterIP(old.getSpec().getClusterIP())
.endSpec()
.build());
} catch (Exception e) {
throw KubernetesClientException.launderThrowable(forOperationType("patch"), e);
}
}

@rohanKanojia
Copy link
Member

@jorsol : Thanks a lot for reporting this, Would it be possible for you to submit a fix for this issue?

@manusa manusa added the bug label Mar 2, 2021
@jorsol
Copy link
Contributor Author

jorsol commented Mar 2, 2021

Yes, I could submit a fix for this issue.

@jorsol
Copy link
Contributor Author

jorsol commented Mar 3, 2021

Is there an ETA for 5.2.0?

@manusa
Copy link
Member

manusa commented Mar 3, 2021

We're planning on releasing by the end of next week or beginning of the other.

This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment