Open larsenpanda opened 2 years ago
This is related to https://github.com/redpanda-data/helm-charts/issues/106 (they may actually be duplicates and one can be closed).
My 2 cents on this is that these types of tools can be recommended in our docs with some suggestions on usage, but may not be needed for our chart.
I'd love to have a sibling or wrapper chart that helps with certmanager, externaldns, and anything else we think would be helpful.
👍 we actually need external-dns support from the chart, or I am missing a way to do it without explicit support :)
The current chart version is allowing to setup a LoadBalancer typed service, one for each broker/pod which is great, but we'd need to set a different annotation such as "external-dns.alpha.kubernetes.io/hostname=redpanda-0.example.org." The actual annotation depends on the broker index.
So a way to implement it could be take in .Values a templated string applied with tpl function.
I think what you're looking for is the fqdn template.
That approach is IMHO too intrusive versus infra setup, feels like a leaky abstraction and not flexibile enough. I propose this MR: https://github.com/redpanda-data/helm-charts/pull/511/files
The external-dns docs cover how to do exactly this and the example is kafka. See https://kubernetes-sigs.github.io/external-dns/v0.12.2/tutorials/hostport/#headless-service
It uses the --fqdn-template
flag although v6.0.23 of the external-dns chart has an issue with their documentation. See this issue
Basically just add this to your external-dns values file:
extraArgs:
--fqdn-template={{.Name}}.example.com
and then this annotation to the redpanda-external
svc
external-dns.alpha.kubernetes.io/hostname: example.com
and you'll get the desired DNS entries
When pods get rescheduled with helm upgrade for example, they get new IP's, which is a pain when you have multiple nodes in your nodepool and the pods are not sticky. External-DNS allows for updating a DNS server with the new ip's for hostnames dynamically as they change. https://github.com/kubernetes-sigs/external-dns
JIRA Link: K8S-10