serving icon indicating copy to clipboard operation
serving copied to clipboard

Route's k8s Service External Name is self-referential

Open dprotaso opened this issue 1 year ago • 2 comments

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

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.

dprotaso avatar May 06 '23 01:05 dprotaso

/triage accepted

dprotaso avatar May 08 '23 16:05 dprotaso

@dprotaso hi, did you find any solutions to get it fixed? having the same issue

tokarev-artem avatar Nov 30 '23 21:11 tokarev-artem