Skip to content

Commit

Permalink
added pc endpoint details in patches and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakm-ntnx committed Dec 20, 2023
1 parent a2b54dc commit 28bdcc6
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 6 deletions.
37 changes: 35 additions & 2 deletions templates/cluster-template-clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,34 @@ spec:
valueFrom:
template: |
host: '{{ .controlPlaneEndpoint.IP }}'
port: {{ .controlPlaneEndpoint.Port }}
port: {{ .controlPlaneEndpoint.port }}
selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: NutanixClusterTemplate
matchResources:
infrastructureCluster: true
name: add-control-plane-endpoint
- definitions:
- jsonPatches:
- op: add
path: /spec/template/spec/prismCentral
valueFrom:
template: |
address: '{{ .prismCentralEndpoint.address }}'
port: {{ .prismCentralEndpoint.port }}
insecure: {{ .prismCentralEndpoint.insecure }}
credentialRef:
name: "${CLUSTER_NAME}"
kind: Secret
additionalTrustBundle:
name: ${CLUSTER_NAME}-pc-trusted-ca-bundle
kind: ConfigMap
selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: NutanixClusterTemplate
matchResources:
infrastructureCluster: true
name: add-pc-endpoint-and-creds
variables:
- name: sshKey
required: true
Expand All @@ -387,7 +408,19 @@ spec:
properties:
IP:
type: string
Port:
port:
type: integer
type: object
- name: prismCentralEndpoint
required: true
schema:
openAPIV3Schema:
properties:
address:
type: string
insecure:
type: boolean
port:
type: integer
type: object
workers:
Expand Down
7 changes: 6 additions & 1 deletion templates/cluster-template-topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ spec:
- name: controlPlaneEndpoint
value:
IP: ${CONTROL_PLANE_ENDPOINT_IP}
Port: ${CONTROL_PLANE_ENDPOINT_PORT=6443}
port: ${CONTROL_PLANE_ENDPOINT_PORT=6443}
- name: prismCentralEndpoint
value:
address: ${NUTANIX_ENDPOINT}
insecure: ${NUTANIX_INSECURE=false}
port: ${NUTANIX_PORT=9440}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
Expand Down
37 changes: 35 additions & 2 deletions templates/clusterclass/clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,34 @@ spec:
valueFrom:
template: |
host: '{{ .controlPlaneEndpoint.IP }}'
port: {{ .controlPlaneEndpoint.Port }}
port: {{ .controlPlaneEndpoint.port }}
selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: NutanixClusterTemplate
matchResources:
infrastructureCluster: true
name: add-control-plane-endpoint
- definitions:
- jsonPatches:
- op: add
path: /spec/template/spec/prismCentral
valueFrom:
template: |
address: '{{ .prismCentralEndpoint.address }}'
port: {{ .prismCentralEndpoint.port }}
insecure: {{ .prismCentralEndpoint.insecure }}
credentialRef:
name: "${CLUSTER_NAME}"
kind: Secret
additionalTrustBundle:
name: ${CLUSTER_NAME}-pc-trusted-ca-bundle
kind: ConfigMap
selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: NutanixClusterTemplate
matchResources:
infrastructureCluster: true
name: add-pc-endpoint-and-creds
variables:
- name: sshKey
required: true
Expand All @@ -144,6 +165,18 @@ spec:
properties:
IP:
type: string
Port:
port:
type: integer
type: object
- name: prismCentralEndpoint
required: true
schema:
openAPIV3Schema:
properties:
address:
type: string
port:
type: integer
insecure:
type: boolean
type: object
7 changes: 6 additions & 1 deletion templates/topology/cluster-with-topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ spec:
- name: controlPlaneEndpoint
value:
IP: "${CONTROL_PLANE_ENDPOINT_IP}"
Port: ${CONTROL_PLANE_ENDPOINT_PORT=6443}
port: ${CONTROL_PLANE_ENDPOINT_PORT=6443}
- name: prismCentralEndpoint
value:
address: "${NUTANIX_ENDPOINT}"
port: ${NUTANIX_PORT=9440}
insecure: ${NUTANIX_INSECURE=false}

0 comments on commit 28bdcc6

Please sign in to comment.