Skip to content
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

Update dnsNameservers context to pick up values #477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dalees
Copy link
Contributor

@dalees dalees commented Jan 20, 2025

The dnsNameservers value has moved into managedSubnets section, but was trying to reference .internalNetwork.dnsNameservers which does not exist in chart values.

This change removes the context switch into internalNetwork to allow all references to correctly find their related values.

Closes: #476

@dalees dalees requested a review from a team as a code owner January 20, 2025 03:49
@dalees
Copy link
Contributor Author

dalees commented Jan 20, 2025

@mkjpryor If there is a better approach here than removing the context change with, please let me know. I'll be happy to update this PR.

It would be nice to move the .Values field, but I'm not sure how to do that in Helm, in a backwards compatible way.

@mkjpryor
Copy link
Collaborator

mkjpryor commented Jan 20, 2025

@dalees

I was also thinking that the fix here should probably be to move the values field into internalNetwork, since it is only respected by the managed subnet.

In order to maintain backwards compatibility, I think we just have to replace

{{- with .dnsNameservers }}

with

{{- with (default $.Values.clusterNetworking.dnsNameservers .dnsNameservers) }}

and modify values.yaml to move the field into internalNetwork?

@dalees
Copy link
Contributor Author

dalees commented Jan 20, 2025

Ah thanks, @mkjpryor - that was a lot easier than what I was thinking of.

I wasn't sure of the best practice around referencing values outside the current scope.

Updated the PR to use your suggestion and moved the values field.

charts/openstack-cluster/values.yaml Outdated Show resolved Hide resolved
charts/openstack-cluster/values.yaml Outdated Show resolved Hide resolved
Move dnsNameservers from .Values.clusterNetworking to
.Values.clusterNetworking.internalNetwork to better reflect where
it is used within OpenStackCluster now.

Backwards compatibility with the former values location is kept and
a bug fixed to correctly reference this. This use is now deprecated
and may be removed in a future chart release.

Closes: azimuth-cloud#476
@dalees dalees force-pushed the fix_dnsnameservers branch from c8d21ba to 0d45740 Compare February 10, 2025 21:04
@dalees dalees requested a review from a team as a code owner February 10, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Values.dnsNameservers no longer respected
2 participants