Skip to content

Commit b1717cd

Browse files
committed
added variable for certSAN
1 parent 3db0b9f commit b1717cd

File tree

5 files changed

+27
-12
lines changed

5 files changed

+27
-12
lines changed

templates/cluster-template-clusterclass.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,7 @@ spec:
349349
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer
350350
valueFrom:
351351
template: |
352-
certSANs:
353-
- localhost
354-
- 127.0.0.1
355-
- 0.0.0.0
352+
certSANs: [ {{ .apiServerSigningCertExtraCertSANs }} ]
356353
selector:
357354
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
358355
kind: KubeadmControlPlaneTemplate
@@ -506,6 +503,13 @@ spec:
506503
port:
507504
type: integer
508505
type: object
506+
- name: apiServerSigningCertExtraCertSANs
507+
required: true
508+
schema:
509+
openAPIV3Schema:
510+
description: Set extra Subject Alternative Names (SANs) for the API Server
511+
signing certificate.
512+
type: string
509513
- name: prismCentralEndpoint
510514
required: true
511515
schema:

templates/cluster-template-topology.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ spec:
5252
systemDiskSize: ${NUTANIX_SYSTEMDISK_SIZE=40Gi}
5353
vcpuSockets: ${NUTANIX_MACHINE_VCPU_SOCKET=2}
5454
vcpusPerSocket: ${NUTANIX_MACHINE_VCPU_PER_SOCKET=1}
55+
- name: apiServerSigningCertExtraCertSANs
56+
value: localhost, 127.0.0.1, 0.0.0.0
5557
version: ${KUBERNETES_VERSION}
5658
workers:
5759
machineDeployments:

templates/clusterclass/clusterclass.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ spec:
103103
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer
104104
valueFrom:
105105
template: |
106-
certSANs:
107-
- localhost
108-
- 127.0.0.1
109-
- 0.0.0.0
106+
certSANs: [ {{ .apiServerSigningCertExtraCertSANs }} ]
110107
- selector:
111108
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
112109
kind: KubeadmConfigTemplate
@@ -254,6 +251,12 @@ spec:
254251
port:
255252
type: integer
256253
type: object
254+
- name: apiServerSigningCertExtraCertSANs
255+
required: true
256+
schema:
257+
openAPIV3Schema:
258+
description: Set extra Subject Alternative Names (SANs) for the API Server signing certificate.
259+
type: string
257260
- name: prismCentralEndpoint
258261
required: true
259262
schema:

templates/topology/cluster-with-topology.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ spec:
5555
imageName: "${NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME}"
5656
clusterName: "${NUTANIX_PRISM_ELEMENT_CLUSTER_NAME}"
5757
subnetName: "${NUTANIX_SUBNET_NAME}"
58+
- name: apiServerSigningCertExtraCertSANs
59+
value: "localhost, 127.0.0.1, 0.0.0.0"

test/e2e/data/infrastructure-nutanix/v1beta1/clusterclass-e2e.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,7 @@ spec:
349349
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer
350350
valueFrom:
351351
template: |
352-
certSANs:
353-
- localhost
354-
- 127.0.0.1
355-
- 0.0.0.0
352+
certSANs: [ {{ .apiServerSigningCertExtraCertSANs }} ]
356353
selector:
357354
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
358355
kind: KubeadmControlPlaneTemplate
@@ -506,6 +503,13 @@ spec:
506503
port:
507504
type: integer
508505
type: object
506+
- name: apiServerSigningCertExtraCertSANs
507+
required: true
508+
schema:
509+
openAPIV3Schema:
510+
description: Set extra Subject Alternative Names (SANs) for the API Server
511+
signing certificate.
512+
type: string
509513
- name: prismCentralEndpoint
510514
required: true
511515
schema:

0 commit comments

Comments
 (0)