knative / serving

Kubernetes-based, scale-to-zero, request-driven compute
https://knative.dev/docs/serving/
Apache License 2.0
5.47k stars 1.14k forks source link

Fali to create/update placeholder service when k8s open IPv4/IPv6 dual-stack feature #9045

Open MIBc opened 3 years ago

MIBc commented 3 years ago

/area API

What version of Knative?

0.15.0

Expected Behavior

serving controller can create/update placeholder service without errors

Actual Behavior

If k8s open IPv4/IPv6 dual-stack feature. Knative will return error: "Service is invalid: spec.ipFamily: Required value" We should a default ipFamily to prevent the error.

mattmoor commented 3 years ago

/area API /area networking

cc @tcnghia @nak3 @ZhiminXiang

ZhiminXiang commented 3 years ago

We don't set ipFamily for all Knative-generated services. So we probably need to add it to all of those services.

I am thinking about reading ipFamily from a ConfigMap. the ipFamily is empty string by default, which means it will use cluster's primary IP family automatically (see doc). If users explicitly configure their cluster to use the dual-stack, they need to manually set the ipFamily of the ConfigMap, so it can be explicitly added into service spec.

WDYT?

mattmoor commented 3 years ago

Is this something that could be defaulted and we could be taught to preserve?

Is there a way for us to start testing this?

MIBc commented 3 years ago

The ipFamily config may be a better way. In our environment, I must set the IPFamily in service spec. Otherwise, the error would happen.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

howardjohn commented 2 years ago

Should this be re-opened?

You can test ipv6 and dual stack with the latest versions of kind

nak3 commented 2 years ago

Yes, I think this should be opened.

dprotaso commented 2 years ago

/lifecycle frozen

nak3 commented 2 years ago

kind supports IPv6 but it seems github actions still does not support IPv6 as per https://github.com/actions/virtual-environments/issues/668

Btw, https://github.com/knative/serving/pull/11843 will change the placeholder service to clusterIP: None. And it will set ipFamilyPolicy: RequireDualStack.

dprotaso commented 2 years ago

/triage accepted