redpanda-data / helm-charts

Redpanda Helm Chart
http://redpanda.com
Apache License 2.0
61 stars 90 forks source link

Incorporate/Test External-DNS #103

Open larsenpanda opened 2 years ago

larsenpanda commented 2 years ago

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

vuldin commented 1 year ago

This is related to https://github.com/redpanda-data/helm-charts/issues/106 (they may actually be duplicates and one can be closed).

alejandroEsc commented 1 year ago

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.

joejulian commented 1 year ago

I'd love to have a sibling or wrapper chart that helps with certmanager, externaldns, and anything else we think would be helpful.

fboismenu commented 1 year ago

👍 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.

joejulian commented 1 year ago

I think what you're looking for is the fqdn template.

tower-nyc commented 1 year ago

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

sblack4 commented 1 year ago

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