Skip to content

add new flag to allow configuring per pod FQDNs for service source. #5937

@SerjKol80

Description

@SerjKol80

What would you like to be added:
Currently if you create FQDNs for K8S headless services, a service source will generate DNS record for the source. Also, in addition to that, if pods related to that service has a hostname configured, then FQDNs for each pod will also be created.
I.e. if you have service service-1 resulting into FQDN service-1.some.domain there will also be FQDNs like pod-1.service-1.some.domain be generated.

Currently, you will see such behavior only if you have headless service with pods where .Spec.Hostname is non-empty.

What we need is to be able to configure this behavior. We want a flag where you can explicitly enable or disable per pod FQDNs for headless services. And if you omit this flag, the default behavior is the same like today (based on .Spec.Hostname).

Why is this needed:
Some time we do not control .Spec.Hostname if we don't create static pods. I.e. if pods are created by Deployment it always keeps that field empty. Thus, you can't generate FQDNs for such pods. Also you can't avoid generating such FQDNs for pods created by StatefulSets because StatefulSet always sets some value to .Spec.Hostname.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions