diff --git a/packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml b/packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml index df148816ca..f0b32bda0b 100644 --- a/packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml +++ b/packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml @@ -496,7 +496,7 @@ spec: items: type: string default: [] - - name: extraDNS + - name: additionalFQDN required: false schema: openAPIV3Schema: @@ -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 @@ -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 }} diff --git a/providers/config_default.yaml b/providers/config_default.yaml index 8729b7f4e7..9182798fab 100644 --- a/providers/config_default.yaml +++ b/providers/config_default.yaml @@ -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 diff --git a/providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml b/providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml index df148816ca..f0b32bda0b 100644 --- a/providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml +++ b/providers/infrastructure-vsphere/v1.5.1/cconly/base.yaml @@ -496,7 +496,7 @@ spec: items: type: string default: [] - - name: extraDNS + - name: additionalFQDN required: false schema: openAPIV3Schema: @@ -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 @@ -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 }} diff --git a/providers/infrastructure-vsphere/v1.5.1/yttcc/overlay.yaml b/providers/infrastructure-vsphere/v1.5.1/yttcc/overlay.yaml index a13e06d710..2a703d4bc3 100644 --- a/providers/infrastructure-vsphere/v1.5.1/yttcc/overlay.yaml +++ b/providers/infrastructure-vsphere/v1.5.1/yttcc/overlay.yaml @@ -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 diff --git a/providers/yttcc/lib/config_variable_association.star b/providers/yttcc/lib/config_variable_association.star index d1454d7da2..ab6e6473a7 100644 --- a/providers/yttcc/lib/config_variable_association.star +++ b/providers/yttcc/lib/config_variable_association.star @@ -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