You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following is the code snippet used to create Service resource. It is failing when I upgraded Fabric8 from 4.1.1 to 4.6.4.
ParameterNamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<HasMetadata, Boolean> load =
kubernetesClient.resourceList(resourceDescriptor)
final List<HasMetadata> res = load.createOrReplace()
resourceDescriptor is a String holding the Service manifest file.
Failed to apply :
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
app: httpbin
spec:
ports:
- name: http
port: 5511
targetPort: 8080
selector:
deploymentconfig: httpbin
: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: https://xxx:8443/api/v1/namespaces/xxx/services/httpbin. Message: Service "httpbin" is invalid: spec.clusterIP: Invalid value: "": field is immutable. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.clusterIP, message=Invalid value: "": field is immutable, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=Service, name=httpbin, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Service "httpbin" is invalid: spec.clusterIP: Invalid value: "": field is immutable, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
The text was updated successfully, but these errors were encountered:
@cedar715 : Thanks for your bug report. I can confirm that I can reproduce this issue. It's strage I'm not able to reproduce if I create service like this:
…erver while patching it.
While replace method, client was showing variable behaviors when done through different
ways in dsl. For example,
client.services().inNamespace("test").createOrReplace(item);
Used to load Service from server since reloadingFromServer was set to true in this case but
if we use a generic handler reloadingFromServer was set to false. I think in case of replace
operations we should always load object from server since Kubernetes API doesn't accept
patching Service object wihout ClusterIP.
Following is the code snippet used to create Service resource. It is failing when I upgraded Fabric8 from 4.1.1 to 4.6.4.
resourceDescriptor is a String holding the Service manifest file.
The text was updated successfully, but these errors were encountered: