make charts

pull/476/head
Christophe Jauffret 2022-07-29 11:52:32 +02:00
parent c98474f4b5
commit ff1eaec562
No known key found for this signature in database
GPG Key ID: A7DAC6789D937702
19 changed files with 1250 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@ -0,0 +1,37 @@
annotations:
artifacthub.io/changes: |
- Update CSI Sidecar version
artifacthub.io/containsSecurityUpdates: "true"
artifacthub.io/displayName: Nutanix CSI Storage
artifacthub.io/links: |
- name: Nutanix CSI Driver documentation
url: https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_5:CSI-Volume-Driver-v2_5
artifacthub.io/maintainers: |
- name: Nutanix Cloud Native Team
email: cloudnative@nutanix.com
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/nutanix/nutanix-csi-snapshot
catalog.cattle.io/certified: partner
catalog.cattle.io/display-name: Nutanix CSI Storage
catalog.cattle.io/release-name: nutanix-csi-storage
apiVersion: v1
appVersion: 2.5.1
description: Nutanix Container Storage Interface (CSI) Driver
home: https://github.com/nutanix/helm
icon: https://avatars2.githubusercontent.com/u/6165865?s=200&v=4
keywords:
- Nutanix
- Storage
- Volumes
- Files
- StorageClass
- RedHat
- CentOS
- Ubuntu
- CSI
kubeVersion: '>= 1.17.0-0'
maintainers:
- email: cloudnative@nutanix.com
name: nutanix-cloud-native-bot
name: nutanix-csi-storage
version: 2.5.401

View File

@ -0,0 +1,192 @@
# Nutanix CSI Storage Driver Helm chart
## Introduction
The Container Storage Interface (CSI) Volume Driver for Kubernetes leverages Nutanix Volumes and Nutanix Files to provide scalable and persistent storage for stateful applications.
When Files is used for persistent storage, applications on multiple pods can access the same storage, and also have the benefit of multi-pod read and write access.
## Important notice
Starting with version 2.5 of this chart we separate the Snapshot components to a second independent Chart.
If you plan to update an existing Nutanix CSI Chart version < v2.5.x with this Chart, you need to check below recommendation.
- Once you upgrade to version 2.5+, the snapshot-controler will be removed, but previously installed Snapshot CRD stay in place. You will then need to install the [nutanix-csi-snapshot](https://github.com/nutanix/helm/tree/master/charts/nutanix-csi-snapshot) Helm Chart following the [Important notice](https://github.com/nutanix/helm/tree/master/charts/nutanix-csi-snapshot#upgrading-from-nutanix-csi-storage-helm-chart-deployment) procedure.
- If you create Storageclass automatically with a previous Nutanix CSI Chart version < v2.5.x, take care to remove Storageclass before `Helm upgrade`.
If you previously installed Nutanix CSI Storage Driver with yaml file please follow the [Upgrading from yaml based deployment](#upgrading-from-yaml-based-deployment) section below.
If this is your first deployment and your Kubernetes Distribution does not bundle the snapshot components, you need to install first the [Nutanix CSI Snapshot Controller Helm chart](https://github.com/nutanix/helm/tree/master/charts/nutanix-csi-snapshot).
Please note that starting with v2.2.0, Nutanix CSI driver has changed format of driver name from com.nutanix.csi to csi.nutanix.com. All deployment yamls uses this new driver name format. However, if you initially installed CSI driver in version < v2.2.0 then you should need to continue to use old driver name com.nutanix.csi by setting `legacy` parameter to `true`. If not existing PVC/PV will not work with the new driver name.
## Nutanix CSI driver documentation
https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_5:CSI-Volume-Driver-v2_5
## Features list
- Nutanix CSI Driver v2.5.0
- Nutanix Volumes support
- Nutanix Files support
- Volume clone
- Volume snapshot and Restore
- IP Address Whitelisting
- LVM Volume supporting multi vdisks volume group
- NFS Dynamic share provisioning
- PV resize support for Volumes and Dynamic Files mode
- iSCSI Auto CHAP Authentication
- OS independence
- Volume metrics and CSI operations metrics support
## Prerequisites
- Kubernetes 1.17 or later
- Kubernetes worker nodes must have the iSCSI package installed (Nutanix Volumes mode) and/or NFS tools (Nutanix Files mode)
- This chart have been validated on RHEL/CentOS 7/8 and Ubuntu 18.04/20.04/21.04/21.10, but the new architecture enables easy portability to other distributions.
- This Chart is not made to be installed on the local k3s cluster (by default iscsi prerequisite is missing)
## Installing the Chart
To install the chart with the name `nutanix-csi`:
```console
helm repo add nutanix https://nutanix.github.io/helm/
helm install nutanix-csi nutanix/nutanix-csi-storage -n <namespace of your choice>
```
## Upgrade
Upgrades can be done using the normal Helm upgrade mechanism
```
helm repo update
helm upgrade nutanix-csi nutanix/nutanix-csi-storage
```
### Upgrading from yaml based deployment
Starting with CSI driver v2.5.0, yaml based deployment is discontinued. So to upgrade from yaml based deployment, you need to patch your existing CSI deployment with helm annotations. Please follow the following procedure.
```bash
HELM_CHART_NAME="nutanix-csi"
HELM_CHART_NAMESPACE="ntnx-system"
DRIVER_NAME="csi.nutanix.com"
kubectl delete sts csi-provisioner-ntnx-plugin -n ${HELM_CHART_NAMESPACE}
kubectl patch ds csi-node-ntnx-plugin -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch csidriver ${DRIVER_NAME} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch sa csi-provisioner -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch sa csi-node-ntnx-plugin -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch clusterrole external-provisioner-runner -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch clusterrole csi-node-runner -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch clusterrolebinding csi-provisioner-role -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch clusterrolebinding csi-node-role -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch service csi-provisioner-ntnx-plugin -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch service csi-metrics-service -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}'
kubectl patch servicemonitor csi-driver -n ${HELM_CHART_NAMESPACE} -p '{"metadata": {"annotations":{"meta.helm.sh/release-name":"'"${HELM_CHART_NAME}"'","meta.helm.sh/release-namespace":"'"${HELM_CHART_NAMESPACE}"'"}, "labels":{"app.kubernetes.io/managed-by":"Helm"}}}' --type=merge
```
Now follow [Installing the Chart](#installing-the-chart) section to finish upgrading the CSI driver.
## Uninstalling the Chart
To uninstall/delete the `nutanix-csi` deployment:
```console
helm delete nutanix-csi -n <namespace of your choice>
```
## Configuration
The following table lists the configurable parameters of the Nutanix-CSI chart and their default values.
| Parameter | Description | Default |
|-------------------------------|---------------------------------------------------------------------------------------------|------------------------|
| `legacy` | Use old reverse notation for CSI driver name | `false` |
| `volumeClass` | Activate Nutanix Volumes Storage Class | `false` |
| `volumeClassName` | Name of the Nutanix Volumes Storage Class | `nutanix-volume` |
| `volumeClassDescription` | Description prefix for each created VG | `volumeClassName` |
| `volumeClassRetention` | Retention policy for the Volumes Storage Class (Delete, Retain) | `Delete` |
| `fileClass` | Activate Nutanix Files Storage Class | `false` |
| `fileClassName` | Name of the Nutanix Files Storage Class | `nutanix-file` |
| `fileClassRetention` | Retention policy for the Files Storage Class (Delete, Retain) | `Delete` |
| `dynamicFileClass` | Activate Nutanix Dynamic Files Storage Class | `false` |
| `dynamicFileClassName` | Name of the Nutanix Dynamic Files Storage Class | `nutanix-dynamicfile` |
| `dynamicFileClassDescription` | Description prefix for each created Fileshare | `dynamicFileClassName` |
| `dynamicFileClassRetention` | Retention policy for the Dynamic Files Storage Class (Delete, Retain) | `Delete` |
| `defaultStorageClass` | Choose your default Storage Class (none, volume, file, dynfile) | `none` |
| `prismEndPoint` | Cluster Virtual IP Address | `10.0.0.1` |
| `username` | Name used for the admin role (if created) | `admin` |
| `password` | Password for the admin role (if created) | `nutanix/4u` |
| `secretName` | Name of the secret to use for admin role | `ntnx-secret` |
| `createSecret` | Create secret for admin role (if false use existing) | `true` |
| `storageContainer` | Nutanix storage container name | `default` |
| `fsType` | Type of file system you are using (ext4, xfs) | `xfs` |
| `networkSegmentation` | Activate Volumes Network Segmentation support | `false` |
| `lvmVolume` | Activate LVM to use multiple vdisks by Volume | `false` |
| `lvmDisks` | Number of vdisks by volume if lvm enabled | `4` |
| `fileHost` | NFS server IP address | `10.0.0.3` |
| `filePath` | Path of the NFS share | `share` |
| `fileServerName` | Name of the Nutanix FIle Server | `file` |
| `kubeletDir` | allows overriding the host location of kubelet's internal state | `/var/lib/kubelet` |
| `nodeSelector` | Add nodeSelector to all pods | `{}` |
| `tolerations` | Add tolerations to all pods | `[]` |
| `imagePullPolicy` | Specify imagePullPolicy for all pods | `IfNotPresent` |
| `controller.replicas` | Number of Controllers replicas to deploy. | `2` |
| `controller.nodeSelector` | Add nodeSelector to provisioner pod | `{}` |
| `controller.tolerations` | Add tolerations to provisioner pod | `[]` |
| `node.nodeSelector` | Add nodeSelector to node pods | `{}` |
| `node.tolerations` | Add tolerations to node pods | `[]` |
| `servicemonitor.enabled` | Create ServiceMonitor to scrape CSI metrics | `false` |
| `servicemonitor.labels` | Labels to add to the ServiceMonitor (for match the Prometheus serviceMonitorSelector logic) | `k8s-app: csi-driver` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or provide a a file whit `-f value.yaml`.
### Configuration examples:
Install the driver in the `ntnx-system` namespace:
```console
helm install nutanix-storage nutanix/nutanix-csi-storage -n ntnx-system --create-namespace
```
Install the driver in the `ntnx-system` namespace and create a volume storageclass:
```console
helm install nutanix-storage nutanix/nutanix-csi-storage -n ntnx-system --create-namespace --set volumeClass=true --set prismEndPoint=X.X.X.X --set username=admin --set password=xxxxxxxxx --set storageContainer=container_name --set fsType=xfs
```
In the above command `prismEndpoint` refers to the Prism Element cluster virtual ip address where storage will be consumed.
Install the driver in the `ntnx-system` namespace, create a volume and a dynamic file storageclass and set the volume storage class as default:
```console
helm install nutanix-storage nutanix/nutanix-csi-storage -n ntnx-system --create-namespace --set volumeClass=true --set prismEndPoint=X.X.X.X --set username=admin --set password=xxxxxxxxx --set storageContainer=container_name --set fsType=xfs --set defaultStorageClass=volume --set dynamicFileClass=true --set fileServerName=name_of_the_file_server
```
In the above command `prismEndpoint` refers to the Prism Element cluster virtual ip address where storage will be consumed.
All the options can also be specified in a value.yaml file:
```console
helm install nutanix-storage nutanix/nutanix-csi-storage -n ntnx-system --create-namespace -f value.yaml
```
## Support
The Nutanix CSI Volume Driver is fully supported by Nutanix. Please use the standard support procedure to file a ticket [here](https://www.nutanix.com/support-services/product-support).
## Community
Please file any issues, questions or feature requests you may have [here](https://github.com/nutanix/csi-plugin/issues) for the Nutanix CSI Driver or [here](https://github.com/nutanix/helm/issues) for the Helm chart.
## Contributing
We value all feedback and contributions. If you find any issues or want to contribute, please feel free to open an issue or file a PR.

View File

@ -0,0 +1 @@
A Helm chart for installing Nutanix CSI Volume/File Storage Driver

View File

@ -0,0 +1,123 @@
questions:
- variable: volumeClass
label: "Volumes Storage Class"
type: boolean
default: true
description: "Activate Nutanix Volumes Storage Class"
group: "global Settings"
- variable: fileClass
label: "Files Storage Class"
type: boolean
default: false
description: "Activate Nutanix Files Storage Class"
group: "global Settings"
- variable: dynamicFileClass
label: "Dynamic Files Storage Class"
type: boolean
default: false
description: "Activate Nutanix Files Storage Class with dynamic share provisioning"
group: "global Settings"
- variable: legacy
label: "Driver Name Legacy mode"
type: boolean
default: false
description: "Set to True to continue to use old driver name in case of initial install with chart < 2.2.0"
group: "global Settings"
- variable: defaultStorageClass
label: "Default Storage Class"
type: enum
default: "none"
options: ["none", "volume", "file", "dynfile"]
description: "Select the default Storage Class you want"
group: "global Settings"
show_if: "volumeClass=true||dynamicFileClass=true||fileClass=true"
- variable: prismEndPoint
label: "Prism Endpoint"
type: string
required: true
description: "Please specify the cluster virtual address"
group: "global Settings"
show_if: "volumeClass=true||dynamicFileClass=true"
- variable: username
label: "Username"
type: string
required: true
description: "Specify username with cluster admin permission"
group: "global Settings"
show_if: "volumeClass=true||dynamicFileClass=true"
- variable: password
label: "Password"
type: password
required: true
description: "Specify password of the user"
group: "global Settings"
show_if: "volumeClass=true||dynamicFileClass=true"
- variable: servicemonitor.enabled
label: "Prometheus ServiceMonitor"
type: boolean
default: false
description: "Activate Prometheus ServiceMonitor to scrape CSI metrics"
group: "global Settings"
- variable: storageContainer
label: "Storage Container"
type: string
required: true
description: "Specify Nutanix container name where the Persistent Volume will be stored"
group: "Nutanix Volumes Settings"
show_if: "volumeClass=true"
- variable: fsType
label: "Filesystem"
type: enum
options: ["xfs", "ext4"]
description: "Select the filesystem for the Persistent Volume"
group: "Nutanix Volumes Settings"
show_if: "volumeClass=true"
- variable: networkSegmentation
label: "Volumes Network Segmentation"
type: boolean
default: false
description: "Activate Volumes Network Segmentation support"
group: "Nutanix Volumes Settings"
show_if: "volumeClass=true"
- variable: lvmVolume
label: "LVM Volume"
type: boolean
default: false
description: "Activate LVM to support multi vdisks volume group for PV"
group: "Nutanix Volumes Settings"
show_if: "volumeClass=true"
- variable: lvmDisks
label: "LVM Disks"
type: int
required: true
default: "4"
min: 1
max: 8
description: "Number of vdisk for each PV"
group: "Nutanix Volumes Settings"
show_if: "lvmVolume=true&&volumeClass=true"
- variable: fileHost
label: "File Server Address"
type: string
required: true
description: "Specify Nutanix Files address"
group: "Nutanix Files Settings"
show_if: "fileClass=true"
- variable: filePath
label: "Export share"
type: string
required: true
description: "Specify Nutanix Files share path"
group: "Nutanix Files Settings"
show_if: "fileClass=true"
- variable: fileServerName
label: "NFS File Server Name"
type: string
required: true
description: "Specify Nutanix Files server name"
group: "Nutanix Files Settings"
show_if: "dynamicFileClass=true"

View File

@ -0,0 +1,3 @@
Driver name: {{ include "nutanix-csi-storage.drivername" . }}
Nutanix CSI provider was deployed in namespace {{ .Release.Namespace }}

View File

@ -0,0 +1,43 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "nutanix-csi-storage.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nutanix-csi-storage.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "nutanix-csi-storage.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create CSI driver name.
*/}}
{{- define "nutanix-csi-storage.drivername" -}}
{{- if .Values.legacy -}}
com.nutanix.csi
{{- else -}}
csi.nutanix.com
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ include "nutanix-csi-storage.drivername" . }}
spec:
attachRequired: false
podInfoOnMount: true

View File

@ -0,0 +1,33 @@
{{- if eq .Values.openshift.masterIscsiConfig true }}
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: master
name: 99-master-ntnx-csi-enable-iscsid
spec:
config:
ignition:
version: 3.1.0
systemd:
units:
- enabled: true
name: iscsid.service
{{- end }}
---
{{- if eq .Values.openshift.workerIscsiConfig true }}
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-worker-ntnx-csi-enable-iscsid
spec:
config:
ignition:
version: 3.1.0
systemd:
units:
- enabled: true
name: iscsid.service
{{- end }}

View File

@ -0,0 +1,169 @@
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>
kind: Deployment
apiVersion: apps/v1
metadata:
name: nutanix-csi-controller
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ .Values.controller.replicas }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 0
selector:
matchLabels:
app: nutanix-csi-controller
template:
metadata:
labels:
app: nutanix-csi-controller
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: nutanix-csi-controller
topologyKey: kubernetes.io/hostname
weight: 100
serviceAccount: nutanix-csi-controller
hostNetwork: true
containers:
- name: csi-provisioner
{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version }}
image: {{ .Values.sidecars.provisioner.image }}
{{- else }}
image: {{ .Values.sidecars.provisioner.imageLegacy }}
{{- end }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=$(ADDRESS)
- --timeout=60s
- --worker-threads=16
# This adds PV/PVC metadata to create volume requests
- --extra-create-metadata=true
- --default-fstype=ext4
# This is used to collect CSI operation metrics
- --http-endpoint=:9809
- --v=2
- --leader-election=true
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-resizer
image: {{ .Values.sidecars.resizer.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --v=2
- --csi-address=$(ADDRESS)
- --timeout=60s
- --leader-election=true
# NTNX CSI dirver supports online volume expansion.
- --handle-volume-inuse-error=false
- --http-endpoint=:9810
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-snapshotter
{{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }}
image: {{ .Values.sidecars.snapshotter.image }}
{{- else }}
image: {{ .Values.sidecars.snapshotter.imageBeta }}
{{- end }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=$(ADDRESS)
- --leader-election=true
- --logtostderr=true
- --timeout=300s
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: nutanix-csi-plugin
image: {{ .Values.controller.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
securityContext:
allowPrivilegeEscalation: true
privileged: true
args:
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(NODE_ID)
- --drivername={{ include "nutanix-csi-storage.drivername" . }}
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
name: socket-dir
# This is needed for static NFS volume feature.
- mountPath: /host
name: root-dir
ports:
- containerPort: 9807
name: http-endpoint
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http-endpoint
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
failureThreshold: 3
- name: liveness-probe
volumeMounts:
- mountPath: /csi
name: socket-dir
image: {{ .Values.sidecars.livenessprobe.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=/csi/csi.sock
- --http-endpoint=:9807
priorityClassName: system-cluster-critical
{{- with (.Values.controller.nodeSelector | default .Values.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (.Values.controller.tolerations | default .Values.tolerations) }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- emptyDir: {}
name: socket-dir
- hostPath:
path: /
type: Directory
name: root-dir

View File

@ -0,0 +1,155 @@
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: nutanix-csi-node
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: nutanix-csi-node
updateStrategy:
type: "RollingUpdate"
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
app: nutanix-csi-node
spec:
serviceAccount: nutanix-csi-node
hostNetwork: true
containers:
- name: driver-registrar
image: {{ .Values.sidecars.registrar.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --v=2
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.kubeletDir }}/plugins/{{ include "nutanix-csi-storage.drivername" . }}/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: plugin-dir
mountPath: /csi/
- name: registration-dir
mountPath: /registration
- name: nutanix-csi-node
securityContext:
privileged: true
allowPrivilegeEscalation: true
image: {{ .Values.node.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(NODE_ID)"
- "--drivername={{ include "nutanix-csi-storage.drivername" . }}"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}
# needed so that any mounts setup inside this container are
# propagated back to the host machine.
mountPropagation: "Bidirectional"
- mountPath: /dev
name: device-dir
- mountPath: /etc/iscsi
name: iscsi-dir
- mountPath: /host
name: root-dir
# This is needed because mount is run from host using chroot.
mountPropagation: "Bidirectional"
ports:
- containerPort: 9808
name: http-endpoint
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http-endpoint
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
failureThreshold: 3
- name: liveness-probe
volumeMounts:
- mountPath: /csi
name: plugin-dir
image: {{ .Values.sidecars.livenessprobe.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=/csi/csi.sock
- --http-endpoint=:9808
priorityClassName: system-cluster-critical
{{- with (.Values.node.nodeSelector | default .Values.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (.Values.node.tolerations | default .Values.tolerations) }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: registration-dir
hostPath:
path: {{ .Values.kubeletDir }}/plugins_registry/
type: Directory
- name: plugin-dir
hostPath:
path: {{ .Values.kubeletDir }}/plugins/{{ include "nutanix-csi-storage.drivername" . }}/
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: {{ .Values.kubeletDir }}
type: Directory
- name: device-dir
hostPath:
path: /dev
- name: iscsi-dir
hostPath:
path: /etc/iscsi
{{- if eq .Values.kindtest true }}
type: DirectoryOrCreate
{{- else }}
type: Directory
{{- end }}
- name: root-dir
hostPath:
path: /
type: Directory

View File

@ -0,0 +1,118 @@
# Copyright 2018 Nutanix Inc
#
# Configuration to deploy the Nutanix CSI driver
#
# example usage: kubectl create -f <this_file>
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nutanix-csi-controller
namespace: {{ .Release.Namespace }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nutanix-csi-controller-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"]
verbs: ["update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "create", "delete", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nutanix-csi-controller-binding
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: nutanix-csi-controller
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: nutanix-csi-controller-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nutanix-csi-node
namespace: {{ .Release.Namespace }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nutanix-csi-node-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "update"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nutanix-csi-node-binding
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: nutanix-csi-node
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: nutanix-csi-node-role
apiGroup: rbac.authorization.k8s.io

View File

@ -0,0 +1,30 @@
{{- if eq .Values.openshift.scc true }}
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
name: ntnx-csi-scc
allowHostDirVolumePlugin: true
allowHostIPC: false
allowHostNetwork: true
allowHostPID: false
allowHostPorts: true
allowPrivilegeEscalation: true
allowPrivilegedContainer: true
allowedCapabilities: []
defaultAddCapabilities: []
fsGroup:
type: RunAsAny
groups: []
priority:
readOnlyRootFilesystem: false
requiredDropCapabilities: []
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:{{ .Release.Namespace }}:nutanix-csi-controller
- system:serviceaccount:{{ .Release.Namespace }}:nutanix-csi-node
{{- end}}

View File

@ -0,0 +1,86 @@
{{- if eq .Values.volumeClass true }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Values.volumeClassName }}
{{- if eq .Values.defaultStorageClass "volume" }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
provisioner: {{ include "nutanix-csi-storage.drivername" . }}
parameters:
storageType: NutanixVolumes
csi.storage.k8s.io/provisioner-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/provisioner-secret-namespace: {{ .Release.Namespace }}
csi.storage.k8s.io/node-publish-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/node-publish-secret-namespace: {{ .Release.Namespace }}
csi.storage.k8s.io/controller-expand-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/controller-expand-secret-namespace: {{ .Release.Namespace }}
storageContainer: {{ .Values.storageContainer }}
csi.storage.k8s.io/fstype: {{ .Values.fsType }}
isSegmentedIscsiNetwork: {{ quote .Values.networkSegmentation }}
description: {{ quote (.Values.volumeClassDescription | default .Values.volumeClassName) }}
{{- if eq .Values.lvmVolume true }}
isLVMVolume: "true"
numLVMDisks: {{ quote .Values.lvmDisks }}
{{- end }}
allowVolumeExpansion: true
reclaimPolicy: {{ .Values.volumeClassRetention }}
---
{{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }}
apiVersion: snapshot.storage.k8s.io/v1
{{- else }}
apiVersion: snapshot.storage.k8s.io/v1beta1
{{- end }}
kind: VolumeSnapshotClass
metadata:
name: nutanix-snapshot-class
driver: {{ include "nutanix-csi-storage.drivername" . }}
parameters:
storageType: NutanixVolumes
csi.storage.k8s.io/snapshotter-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/snapshotter-secret-namespace: {{ .Release.Namespace }}
deletionPolicy: Delete
{{- end }}
---
{{- if eq .Values.fileClass true }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Values.fileClassName }}
{{- if eq .Values.defaultStorageClass "file" }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
provisioner: {{ include "nutanix-csi-storage.drivername" . }}
parameters:
storageType: NutanixFiles
nfsServer: {{ .Values.fileHost }}
nfsPath: {{ .Values.filePath }}
reclaimPolicy: {{ .Values.fileClassRetention }}
{{- end }}
---
{{- if eq .Values.dynamicFileClass true }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Values.dynamicFileClassName }}
{{- if eq .Values.defaultStorageClass "dynfile" }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
provisioner: {{ include "nutanix-csi-storage.drivername" . }}
parameters:
storageType: NutanixFiles
dynamicProv: ENABLED
nfsServerName: {{ .Values.fileServerName }}
csi.storage.k8s.io/provisioner-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/provisioner-secret-namespace: {{ .Release.Namespace }}
csi.storage.k8s.io/node-publish-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/node-publish-secret-namespace: {{ .Release.Namespace }}
csi.storage.k8s.io/controller-expand-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/controller-expand-secret-namespace: {{ .Release.Namespace }}
description: {{ quote (.Values.dynamicFileClassDescription | default .Values.dynamicFileClassName) }}
allowVolumeExpansion: true
reclaimPolicy: {{ .Values.dynamicFileClassRetention }}
{{- end }}

View File

@ -0,0 +1,11 @@
{{- if eq .Values.createSecret true }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secretName }}
namespace: {{ .Release.Namespace }}
data:
# base64 encoded prism-ip:prism-port:admin:password.
# E.g.: echo -n "10.83.0.91:9440:admin:mypassword" | base64
key: {{ printf "%s:9440:%s:%s" .Values.prismEndPoint .Values.username .Values.password | b64enc}}
{{- end }}

View File

@ -0,0 +1,46 @@
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>
#
apiVersion: v1
kind: Service
metadata:
name: nutanix-csi-metrics
namespace: {{ .Release.Namespace }}
labels:
app: nutanix-csi-metrics
spec:
type: ClusterIP
selector:
app: nutanix-csi-controller
ports:
- name: provisioner
port: 9809
targetPort: 9809
protocol: TCP
- name: resizer
port: 9810
targetPort: 9810
protocol: TCP
{{- if eq .Values.servicemonitor.enabled true }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
{{- with .Values.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: nutanix-csi-driver
namespace: {{ .Release.Namespace }}
spec:
endpoints:
- interval: 30s
port: provisioner
- interval: 30s
port: resizer
selector:
matchLabels:
app: nutanix-csi-metrics
{{- end }}

View File

@ -0,0 +1,134 @@
# Default values for nutanix-csi-storage.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# parameters
# Legacy mode
#
# if legacy set to true we keep the old reverse domain notation for CSI driver name (com.nutanix.csi).
# need to be set to true only if upgrade and initialy installed with helm package before 2.2.x
legacy: false
# Openshift settings
#
openshift:
scc: false
masterIscsiConfig: false
workerIscsiConfig: false
# kubeletDir allows overriding the host location of kubelet's internal state.
kubeletDir: "/var/lib/kubelet"
# Global Settings for all pods
nodeSelector: {}
tolerations: []
imagePullPolicy: IfNotPresent
# Storage Class settings
#
# choose for which mode (Volume, File, Dynamic File) storageclass need to be created
volumeClass: false
volumeClassName: "nutanix-volume"
volumeClassRetention: "Delete"
# volumeClassDescription: ""
fileClass: false
fileClassName: "nutanix-file"
fileClassRetention: "Delete"
dynamicFileClass: false
dynamicFileClassName: "nutanix-dynamicfile"
dynamicFileClassRetention: "Delete"
# dynamicFileClassDescription: ""
# Default Storage Class settings
#
# Decide wich storageclass will be the default
# value are: node, volume, file, dynfile
defaultStorageClass: none
# Nutanix Prism Elements settings
#
# Allow dynamic creation of Volumes and Fileshare
# needed if volumeClass or dynamicFileClass is set to true
prismEndPoint: 10.0.0.1
username: admin
password: nutanix/4u
secretName: ntnx-secret
# Nutanix Prism Elements Existing Secret
#
# if set to false a new secret will not be created
createSecret: true
# Volumes Settings
#
storageContainer: default
fsType: xfs
lvmVolume: false
lvmDisks: 4
networkSegmentation: false
# Files Settings
#
fileHost: 10.0.0.3
filePath: share
# Dynamic Files Settings
#
fileServerName: file
# Volume metrics and CSI operations metrics configuration
#
servicemonitor:
enabled: false
labels:
# This should match the serviceMonitorSelector logic configured
# on the prometheus.
k8s-app: csi-driver
# Pod pecific Settings
#
controller:
replicas: 2
image: quay.io/karbon/ntnx-csi:v2.5.1
nodeSelector: {}
tolerations: []
node:
image: quay.io/karbon/ntnx-csi:v2.5.1
nodeSelector: {}
tolerations: []
sidecars:
registrar:
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1
provisioner:
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.0
imageLegacy: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.2
snapshotter:
image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.0.1
imageBeta: k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3
resizer:
image: k8s.gcr.io/sig-storage/csi-resizer:v1.5.0
livenessprobe:
image: k8s.gcr.io/sig-storage/livenessprobe:v2.7.0
# Used for deployment test in kind cluster
#
kindtest: false

View File

@ -3770,6 +3770,47 @@ entries:
- assets/nutanix-csi-snapshot/nutanix-csi-snapshot-1.0.0.tgz - assets/nutanix-csi-snapshot/nutanix-csi-snapshot-1.0.0.tgz
version: 1.0.0 version: 1.0.0
nutanix-csi-storage: nutanix-csi-storage:
- annotations:
artifacthub.io/changes: |
- Update CSI Sidecar version
artifacthub.io/containsSecurityUpdates: "true"
artifacthub.io/displayName: Nutanix CSI Storage
artifacthub.io/links: |
- name: Nutanix CSI Driver documentation
url: https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_5:CSI-Volume-Driver-v2_5
artifacthub.io/maintainers: |
- name: Nutanix Cloud Native Team
email: cloudnative@nutanix.com
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/nutanix/nutanix-csi-snapshot
catalog.cattle.io/certified: partner
catalog.cattle.io/display-name: Nutanix CSI Storage
catalog.cattle.io/release-name: nutanix-csi-storage
apiVersion: v1
appVersion: 2.5.1
created: "2022-07-29T11:52:23.058403+02:00"
description: Nutanix Container Storage Interface (CSI) Driver
digest: 3f43cbbda85bff64e21cfb2fff1de4a2d4a4ac66390c53adf19fa697b21ef7ca
home: https://github.com/nutanix/helm
icon: https://avatars2.githubusercontent.com/u/6165865?s=200&v=4
keywords:
- Nutanix
- Storage
- Volumes
- Files
- StorageClass
- RedHat
- CentOS
- Ubuntu
- CSI
kubeVersion: '>= 1.17.0-0'
maintainers:
- email: cloudnative@nutanix.com
name: nutanix-cloud-native-bot
name: nutanix-csi-storage
urls:
- assets/nutanix-csi-storage/nutanix-csi-storage-2.5.401.tgz
version: 2.5.401
- annotations: - annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- Update Nutanix CSI Driver to 2.5.1 - Update Nutanix CSI Driver to 2.5.1