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

Commit

Permalink
Fix patch path
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlin07 committed Dec 7, 2022
1 parent 233e687 commit f0bb001
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ spec:
items:
type: string
default: []
- name: extraDNS
- name: additionalFQDN
required: false
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1806,8 +1806,8 @@ spec:
{{- range .ntpServers }}
- {{ . }}
{{- end }}
- name: extraDNS
enabledIf: '{{ not (empty .extraDNS) }}'
- name: additionalFQDN
enabledIf: '{{ not (empty .additionalFQDN) }}'
definitions:
- selector:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
Expand All @@ -1816,10 +1816,9 @@ spec:
controlPlane: true
jsonPatches:
- op: add
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/certSANs
valueFrom:
template: |
certSANs:
{{- range .extraDNS }}
{{- range .additionalFQDN }}
- {{ . }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion providers/config_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ VSPHERE_INSECURE: false
#! Virtual IP address or FQDN for the cluster's control plane nodes
VSPHERE_CONTROL_PLANE_ENDPOINT:
VSPHERE_CONTROL_PLANE_ENDPOINT_PORT: 6443
VSPHERE_EXTRA_DNS:
VSPHERE_ADDITIONAL_FQDN:
#! NSX-T specific configurations for enabling NSX-T routable pods
#! set this to true to enable NSX-T routable pods
NSXT_POD_ROUTING_ENABLED: false
Expand Down
13 changes: 6 additions & 7 deletions providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ spec:
items:
type: string
default: []
- name: extraDNS
- name: additionalFQDN
required: false
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1806,8 +1806,8 @@ spec:
{{- range .ntpServers }}
- {{ . }}
{{- end }}
- name: extraDNS
enabledIf: '{{ not (empty .extraDNS) }}'
- name: additionalFQDN
enabledIf: '{{ not (empty .additionalFQDN) }}'
definitions:
- selector:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
Expand All @@ -1816,10 +1816,9 @@ spec:
controlPlane: true
jsonPatches:
- op: add
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/certSANs
valueFrom:
template: |
certSANs:
{{- range .extraDNS }}
{{- range .additionalFQDN }}
- {{ . }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion providers/infrastructure-vsphere/v1.5.1/yttcc/overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
variables:
#@ vars = get_vsphere_vars()
#@ for configVariable in vars:
#@ if vars[configVariable] != None and configVariable in ["etcdExtraArgs", "apiServerPort", "controlPlane", "worker", "vcenter", "VSPHERE_WINDOWS_TEMPLATE", "apiServerEndpoint", "network", "imageRepository", "trust", "user", "auditLogging", "aviAPIServerHAProvider", "ntpServers", "TKR_DATA", "proxy", "kubeVipLoadBalancerProvider", "extraDNS"]:
#@ if vars[configVariable] != None and configVariable in ["etcdExtraArgs", "apiServerPort", "controlPlane", "worker", "vcenter", "VSPHERE_WINDOWS_TEMPLATE", "apiServerEndpoint", "network", "imageRepository", "trust", "user", "auditLogging", "aviAPIServerHAProvider", "ntpServers", "TKR_DATA", "proxy", "kubeVipLoadBalancerProvider", "additionalFQDN"]:
- name: #@ configVariable
value: #@ vars[configVariable]
#@ end
Expand Down
4 changes: 2 additions & 2 deletions providers/yttcc/lib/config_variable_association.star
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,8 @@ def get_vsphere_vars():
vars["kubeVipLoadBalancerProvider"] = True
end

if data.values["VSPHERE_EXTRA_DNS"] != None:
vars["extraDNS"] = data.values["VSPHERE_EXTRA_DNS"].replace(" ", "").split(",")
if data.values["VSPHERE_ADDITIONAL_FQDN"] != None:
vars["additionalFQDN"] = data.values["VSPHERE_ADDITIONAL_FQDN"].replace(" ", "").split(",")
end

return vars
Expand Down

0 comments on commit f0bb001

Please # to comment.