-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bitnami/redis] Enables Redis to utilize external-dns #8570
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @jtslear. I've left some comments, but since I'm not very familiar with the technology, I'd like another colleague to review this as well. I'll ping him on Monday.
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.externalDNS.enabled }} | ||
external-dns.alpha.kubernetes.io/hostname: {{ printf "%s.%s" (include "common.names.fullname" .) .Values.externalDNS.suffix }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ printf "%s.%s" (include "common.names.fullname" .) .Values.externalDNS.suffix }}
is used quite a bit on this PR, I think it's worth to add a helper to include it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
bitnami/redis/values.yaml
Outdated
## @param externalDNS Boolean to indicate the desire to utilize `external-dns` | ||
## | ||
externalDNS: | ||
enabled: false | ||
# suffix: "" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good way to name the parameters, as users could assume that this also deploys a installation of the bitnami/external-dns
chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree. I've renamed it to useExternalDNS
. Though I'm not thrilled about that name either. Open to further suggestions.
8a1cca2
to
af6e9e1
Compare
@alemorcuq I could use some guidance on the test, |
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.useExternalDNS.enabled }} | ||
{{ .Values.useExternalDNS.annotationKey }}hostname: {{ include "redis.externalDNS.suffix" . }} | ||
{{- range $key, $val := .Values.useExternalDNS.additionalAnnotations }} | ||
{{ $.Values.useExternalDNS.annotationKey }}{{ $key }}: {{ $val | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | |
{{- end }} | |
{{- if .Values.useExternalDNS.enabled }} | |
{{ .Values.useExternalDNS.annotationKey }}hostname: {{ include "redis.externalDNS.suffix" . }} | |
{{- range $key, $val := .Values.useExternalDNS.additionalAnnotations }} | |
{{ $.Values.useExternalDNS.annotationKey }}{{ $key }}: {{ $val | quote }} | |
{{- end }} | |
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | |
{{- end }} | |
{{- if .Values.useExternalDNS.enabled }} | |
{{ .Values.useExternalDNS.annotationKey }}hostname: {{ include "redis.externalDNS.suffix" . }} | |
{{- range $key, $val := .Values.useExternalDNS.additionalAnnotations }} | |
{{ $.Values.useExternalDNS.annotationKey }}{{ $key }}: {{ $val | quote }} | |
{{- end }} |
We can notch the indentation of the commonAnnoations
render. Ideally, we could do the same for the additionalAnnotations
, however, the spaces currently matter within the range
loop because of how this is composed within.
What do you think of making this into a single template for all of these annotations, say redis.externalDNS.annotations
, and instead simply gating this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WarheadsSE thanks for the suggestion, I proceeded to do exactly this in ba304f9
ba304f9
to
9dfac3a
Compare
It is missing the @juan131, could you take a look at this PR? |
9dfac3a
to
936e5d9
Compare
@alemorcuq Readme is fixed, thank you much! This is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR @jtslear ! Please check my comments when you have a chance.
0336928
to
3f88ed0
Compare
* By way of using `external-dns` we can assign a DNS entry for each Pod * Doing so allows anyone who's got the ability to talk to the IP's for which Redis utilize, external to the cluster, to become members of the Redis cluster * This is helpful during Redis migrations where backing up and restoring are destructive, but instead we can enable both Redis in kubernetes and Redis on VM's to talk to each other, perform application configuration changes, and turn down the VM's. * Theoretically vice versa as well Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Co-authored-by: Jason Plum <[email protected]> Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Co-authored-by: Juan Ariza Toledano <[email protected]> Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
Signed-off-by: John T Skarbek <[email protected]>
3f88ed0
to
73dee9d
Compare
Sorry for the late reply. Let's try to get this merged, I'm rerunning the jobs. |
@alemorcuq I suspect that #8662 is preventing the tests from being successful. The behavior is slightly different, so I'm not 100% confident: Reference log output: https://github.com/bitnami/charts/runs/4842365585?check_suite_focus=true#step:6:1081 |
A PR has been merged as a result of the task you mentioned, so let's check again. |
Description of the change
external-dns
we can assign a DNS entry for each Podexternal-dns
in a working fashion prior to this being usable.Checklist
Chart.yaml
according to semver.