Route's k8s Service External Name is self-referential
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 2
Description
Since we switched to `svc.cluster.local` as the default domain in https://github.com/knative/serving/pull/13259
There's a short window, between creating the Route's K8s Servcie and the KIngress being reconciled, where we create K8s services with an ExternalName that points to itself.
This causes a bunch of warnings in the kube-system.
ie. we create
```yaml
apiVersion: v1
kind: Service
metadata:
annotations:
labels:
serving.knative.dev/route: some-service
serving.knative.dev/service: some-service
name: some-service
namespace: some-namespace
spec:
externalName: some-service.some-namespace.svc.cluster.local
ports:
- name: http2
port: 80
protocol: TCP
targetPort: 80
sessionAffinity: None
type: ExternalName
status:
loadBalancer: {}
```
Not sure what the right thing to do here - but it was a red herring when the `net-*` plugin couldn't reconcile resources. In theory maybe a headless service would work here but then we're consuming a cluster ip for no reason.
Contributor guide
Research direction
Start by tracing the Route Kubernetes Service creation and KIngress reconciliation described in the issue, using the switch to svc.cluster.local and the net-* plugin reconciliation window as entry points. Reproduce the self-referential ExternalName warning and determine the intended Service behavior; done means the temporary Service configuration no longer points to itself and the kube-system warnings are avoided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100