GoogleCloudPlatform / k8s-config-connector

GCP Config Connector, a Kubernetes add-on for managing GCP resources
https://cloud.google.com/config-connector/docs/overview
Apache License 2.0
888 stars 219 forks source link

using DNSRecordSet with Kubernetes ingress #251

Open errordeveloper opened 4 years ago

errordeveloper commented 4 years ago

It would be very nice if DNSRecordSet could be used in a way similar to external-dns, but perhaps without a stateful operator as such. Right now one can specify DNS record values as strings, but it would be nice to be able to reference a service or ingress somehow.

I'm not thinking of a full-blown alternative to external-dns, it's just a less dynamic use-case with just a few records managed more explicitly. If I didn't have Config Connector installed already, I'd probably use external-dns, but I do and I'd rather avoid adding another stateful operator that manages my GCP resources.

caieo commented 4 years ago

Thanks for the request @errordeveloper and bringing this use case to our attention. Just to clarify, are you hoping to have DNSRecordSet reference services or ingress within the same cluster or expose them externally outside of the cluster?

errordeveloper commented 4 years ago

Thanks for quick response! For the use case I have in mind, I would be looking to reference external IP of a service or ingress within the same cluster. Referencing something in another cluster seems kind of harder, and fortunately not something I currently care about, but maybe referencing a pre-allocated IP and making use of that IP somehow could be a way one could achieve it.

caieo commented 4 years ago

Hmmm okay, so to make sure I'm understanding this feature request properly, you'd like to be able to reference in-cluster Kubernetes service/ingress IP addresses with the DNSRecordSet(and specifically it'd be the spec.rrdatas field), right? If I'm misunderstanding it, please feel free to paste an example YAML snippet of how you expect this feature to look like.

errordeveloper commented 4 years ago

@caieo yes, exactly. I am just wondering about other use-cases, feel free to ignore that part :)

caieo commented 4 years ago

Great, thanks for verifying! I'll add this to our list of future feature requests and any updates will be posted in this thread.

funkymcb commented 2 months ago

Are there any updates on this topic?

We currently are facing the same problem and the suggested solution would clean up our messy workarounds