Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
ignore dns servers from dhcp when providing nameservers
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
Co-authored-by: Edwin Xie <exie@vmware.com>
Co-authored-by: Christian Ang <angc@vmware.com>
  • Loading branch information
4 people committed Dec 13, 2022
1 parent 30e868d commit 98dd506
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
32 changes: 28 additions & 4 deletions packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,20 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp4: true
{{ if .controlPlane.network.nameservers -}}
dhcp4Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp6: true
{{ if .controlPlane.network.nameservers -}}
dhcp6Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
Expand Down Expand Up @@ -1124,8 +1136,20 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp4: true
{{ if .worker.network.nameservers -}}
dhcp4Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp6: true
{{ if .worker.network.nameservers -}}
dhcp6Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
Expand Down
32 changes: 28 additions & 4 deletions providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,20 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp4: true
{{ if .controlPlane.network.nameservers -}}
dhcp4Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp6: true
{{ if .controlPlane.network.nameservers -}}
dhcp6Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
Expand Down Expand Up @@ -1124,8 +1136,20 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp4: true
{{ if .worker.network.nameservers -}}
dhcp4Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}}
dhcp6: true
{{ if .worker.network.nameservers -}}
dhcp6Overrides:
useDNS: false
{{- end }}
{{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
Expand Down

0 comments on commit 98dd506

Please sign in to comment.