Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit a007a2f

Browse files
committed
build: add CSI configuration to Nutanix examples
1 parent c4bed7a commit a007a2f

File tree

7 files changed

+120
-0
lines changed

7 files changed

+120
-0
lines changed

examples/capi-quick-start/nutanix-cluster-calico-crs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
labels:
5+
cluster.x-k8s.io/provider: nutanix
6+
name: ${CLUSTER_NAME}-pe-creds-for-csi
7+
stringData:
8+
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
9+
---
10+
apiVersion: v1
211
data:
312
nutanix-ccm.yaml: |
413
---
@@ -317,6 +326,19 @@ spec:
317326
cni:
318327
provider: Calico
319328
strategy: ClusterResourceSet
329+
csi:
330+
defaultStorage:
331+
providerName: nutanix
332+
storageClassConfigName: nutanix-volume
333+
providers:
334+
- credentials:
335+
name: ${CLUSTER_NAME}-pe-creds-for-csi
336+
name: nutanix
337+
storageClassConfig:
338+
- name: nutanix-volume
339+
parameters:
340+
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
341+
strategy: HelmAddon
320342
nfd:
321343
strategy: ClusterResourceSet
322344
controlPlane:

examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
labels:
5+
cluster.x-k8s.io/provider: nutanix
6+
name: ${CLUSTER_NAME}-pe-creds-for-csi
7+
stringData:
8+
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
9+
---
10+
apiVersion: v1
211
data:
312
nutanix-ccm.yaml: |
413
---
@@ -317,6 +326,19 @@ spec:
317326
cni:
318327
provider: Calico
319328
strategy: HelmAddon
329+
csi:
330+
defaultStorage:
331+
providerName: nutanix
332+
storageClassConfigName: nutanix-volume
333+
providers:
334+
- credentials:
335+
name: ${CLUSTER_NAME}-pe-creds-for-csi
336+
name: nutanix
337+
storageClassConfig:
338+
- name: nutanix-volume
339+
parameters:
340+
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
341+
strategy: HelmAddon
320342
nfd:
321343
strategy: HelmAddon
322344
controlPlane:

examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
labels:
5+
cluster.x-k8s.io/provider: nutanix
6+
name: ${CLUSTER_NAME}-pe-creds-for-csi
7+
stringData:
8+
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
9+
---
10+
apiVersion: v1
211
data:
312
nutanix-ccm.yaml: |
413
---
@@ -317,6 +326,19 @@ spec:
317326
cni:
318327
provider: Cilium
319328
strategy: ClusterResourceSet
329+
csi:
330+
defaultStorage:
331+
providerName: nutanix
332+
storageClassConfigName: nutanix-volume
333+
providers:
334+
- credentials:
335+
name: ${CLUSTER_NAME}-pe-creds-for-csi
336+
name: nutanix
337+
storageClassConfig:
338+
- name: nutanix-volume
339+
parameters:
340+
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
341+
strategy: HelmAddon
320342
nfd:
321343
strategy: ClusterResourceSet
322344
controlPlane:

examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
labels:
5+
cluster.x-k8s.io/provider: nutanix
6+
name: ${CLUSTER_NAME}-pe-creds-for-csi
7+
stringData:
8+
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
9+
---
10+
apiVersion: v1
211
data:
312
nutanix-ccm.yaml: |
413
---
@@ -317,6 +326,19 @@ spec:
317326
cni:
318327
provider: Cilium
319328
strategy: HelmAddon
329+
csi:
330+
defaultStorage:
331+
providerName: nutanix
332+
storageClassConfigName: nutanix-volume
333+
providers:
334+
- credentials:
335+
name: ${CLUSTER_NAME}-pe-creds-for-csi
336+
name: nutanix
337+
storageClassConfig:
338+
- name: nutanix-volume
339+
parameters:
340+
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
341+
strategy: HelmAddon
320342
nfd:
321343
strategy: HelmAddon
322344
controlPlane:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2023 D2iQ, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
---
5+
apiVersion: v1
6+
kind: Secret
7+
metadata:
8+
name: ${CLUSTER_NAME}-pe-creds-for-csi
9+
stringData:
10+
key: "${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}"

hack/examples/bases/nutanix/cluster/kustomization.yaml.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
resources:
8+
- ../../../additional-resources/nutanix/csi-secret.yaml
89
- https://raw.githubusercontent.com/nutanix-cloud-native/cluster-api-provider-nutanix/1a7cd69ba35de01e56dcf2dda7f31973111d2317/templates/cluster-template-topology.yaml
910

1011
sortOptions:
@@ -25,6 +26,9 @@ patches:
2526
- target:
2627
kind: Cluster
2728
path: ../../../patches/cluster-autoscaler.yaml
29+
- target:
30+
kind: Cluster
31+
path: ../../../patches/nutanix/csi.yaml
2832
- target:
2933
kind: Cluster
3034
path: ../../../patches/nutanix/initialize-variables.yaml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2024 D2iQ, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
- op: "add"
5+
path: "/spec/topology/variables/0/value/addons/csi"
6+
value:
7+
defaultStorage:
8+
providerName: nutanix
9+
storageClassConfigName: nutanix-volume
10+
providers:
11+
- name: nutanix
12+
storageClassConfig:
13+
- name: nutanix-volume
14+
parameters:
15+
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
16+
strategy: HelmAddon
17+
credentials:
18+
name: ${CLUSTER_NAME}-pe-creds-for-csi

0 commit comments

Comments
 (0)