Had trouble finding this info in the docs
I want to wrap this in a helm chart. It would be easier for me to parameterize my charts if I could inject env vars for config instead of passing the app args like this:
image: k8s.gcr.io/external-dns/external-dns:v0.7.3
args:
- --source=service
- --source=ingress
- --domain-filter=external-dns-test.gcp.zalan.do # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
- --provider=google
# - --google-project=zalando-external-dns-test # Use this to specify a project different from the one external-dns is running inside
- --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
- --registry=txt
- --txt-owner-id=my-identifier
Just wondering if it supports env vars for its config- sorry if that is already explained in the docs somewhere!
Hi,
Yes this should be possible because it uses kingpin as argument parser lib
https://github.com/kubernetes-sigs/external-dns/blob/79ea64884bbfc89f9c1f444c9dddd5ce361f31ad/pkg/apis/externaldns/types.go#L290
So you should be fine by using env vars prefixed with EXTERNAL_DNS_ and all hyphens converted to underscore.
Regards,
Johannes
I'm not seeing this in the documentation anywhere, but maybe I missed it. It would be nice have this detail in the official documentation somewhere.
/kind documentation
/remove-kind support
@seanmalloy
There's a little abstract in the FAQ.
https://github.com/kubernetes-sigs/external-dns/blob/master/docs/faq.md#how-do-i-configure-multiple-sources-via-environment-variables-also-applies-to-domain-filters
But it's not quite clear that this syntax should work for every option.
@jgrumboe nice find. I agree we should add some additional details to the documentation.
Guess I'll close this? or leave open till the docs are created?
Here is why I want this. If the app can be 100% configured with env vars then it means writing a helm chart to support it would be trivial. the chart could be totally ignorant of the apps actual config and just allow you to set arbitrary env vars
I actually asked about this in the github page for the community chart: https://github.com/bitnami/charts/issues/3905. right now that chart has all this specific config for passing in args, but if the same thing can be done with env vars I feel like that would be a more maintainable approach?
or leave open till the docs are created?
I think we should leave it open until the documentation is updated.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
Most helpful comment
Hi,
Yes this should be possible because it uses kingpin as argument parser lib
https://github.com/kubernetes-sigs/external-dns/blob/79ea64884bbfc89f9c1f444c9dddd5ce361f31ad/pkg/apis/externaldns/types.go#L290
So you should be fine by using env vars prefixed with EXTERNAL_DNS_ and all hyphens converted to underscore.
Regards,
Johannes