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

build: add Nutanix CSI to examples #33

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions examples/capi-quick-start/nutanix-cluster-calico-crs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
labels:
cluster.x-k8s.io/provider: nutanix
name: ${CLUSTER_NAME}-pe-creds-for-csi
stringData:
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
---
apiVersion: v1
data:
nutanix-ccm.yaml: |
---
Expand Down Expand Up @@ -317,6 +326,19 @@ spec:
cni:
provider: Calico
strategy: ClusterResourceSet
csi:
defaultStorage:
providerName: nutanix
storageClassConfigName: nutanix-volume
providers:
- credentials:
name: ${CLUSTER_NAME}-pe-creds-for-csi
name: nutanix
storageClassConfig:
- name: nutanix-volume
parameters:
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
strategy: HelmAddon
supershal marked this conversation as resolved.
Show resolved Hide resolved
nfd:
strategy: ClusterResourceSet
controlPlane:
Expand Down
22 changes: 22 additions & 0 deletions examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
labels:
cluster.x-k8s.io/provider: nutanix
name: ${CLUSTER_NAME}-pe-creds-for-csi
stringData:
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
---
apiVersion: v1
data:
nutanix-ccm.yaml: |
---
Expand Down Expand Up @@ -317,6 +326,19 @@ spec:
cni:
provider: Calico
strategy: HelmAddon
csi:
defaultStorage:
providerName: nutanix
storageClassConfigName: nutanix-volume
providers:
- credentials:
name: ${CLUSTER_NAME}-pe-creds-for-csi
name: nutanix
storageClassConfig:
- name: nutanix-volume
parameters:
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
strategy: HelmAddon
nfd:
strategy: HelmAddon
controlPlane:
Expand Down
22 changes: 22 additions & 0 deletions examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
labels:
cluster.x-k8s.io/provider: nutanix
name: ${CLUSTER_NAME}-pe-creds-for-csi
stringData:
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
---
apiVersion: v1
data:
nutanix-ccm.yaml: |
---
Expand Down Expand Up @@ -317,6 +326,19 @@ spec:
cni:
provider: Cilium
strategy: ClusterResourceSet
csi:
defaultStorage:
providerName: nutanix
storageClassConfigName: nutanix-volume
providers:
- credentials:
name: ${CLUSTER_NAME}-pe-creds-for-csi
name: nutanix
storageClassConfig:
- name: nutanix-volume
parameters:
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
strategy: HelmAddon
supershal marked this conversation as resolved.
Show resolved Hide resolved
nfd:
strategy: ClusterResourceSet
controlPlane:
Expand Down
22 changes: 22 additions & 0 deletions examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
labels:
cluster.x-k8s.io/provider: nutanix
name: ${CLUSTER_NAME}-pe-creds-for-csi
stringData:
key: ${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}
---
apiVersion: v1
data:
nutanix-ccm.yaml: |
---
Expand Down Expand Up @@ -317,6 +326,19 @@ spec:
cni:
provider: Cilium
strategy: HelmAddon
csi:
defaultStorage:
providerName: nutanix
storageClassConfigName: nutanix-volume
providers:
- credentials:
name: ${CLUSTER_NAME}-pe-creds-for-csi
name: nutanix
storageClassConfig:
- name: nutanix-volume
parameters:
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
strategy: HelmAddon
nfd:
strategy: HelmAddon
controlPlane:
Expand Down
10 changes: 10 additions & 0 deletions hack/examples/additional-resources/nutanix/csi-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: v1
kind: Secret
metadata:
name: ${CLUSTER_NAME}-pe-creds-for-csi
stringData:
key: "${NUTANIX_PRISM_ELEMENT_ENDPOINT}:${NUTANIX_PORT}:${NUTANIX_USER}:${NUTANIX_PASSWORD}"
4 changes: 4 additions & 0 deletions hack/examples/bases/nutanix/cluster/kustomization.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

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

sortOptions:
Expand All @@ -25,6 +26,9 @@ patches:
- target:
kind: Cluster
path: ../../../patches/cluster-autoscaler.yaml
- target:
kind: Cluster
path: ../../../patches/nutanix/csi.yaml
- target:
kind: Cluster
path: ../../../patches/nutanix/initialize-variables.yaml
Expand Down
18 changes: 18 additions & 0 deletions hack/examples/patches/nutanix/csi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

- op: "add"
path: "/spec/topology/variables/0/value/addons/csi"
value:
defaultStorage:
providerName: nutanix
storageClassConfigName: nutanix-volume
dkoshkin marked this conversation as resolved.
Show resolved Hide resolved
providers:
- name: nutanix
storageClassConfig:
- name: nutanix-volume
parameters:
storageContainer: ${NUTANIX_STORAGE_CONTAINER_NAME}
dkoshkin marked this conversation as resolved.
Show resolved Hide resolved
strategy: HelmAddon
credentials:
name: ${CLUSTER_NAME}-pe-creds-for-csi
Loading