Skip to content

Commit

Permalink
Nutanix CSI Driver 2.4.1 (#38)
Browse files Browse the repository at this point in the history
- Update Nutanix CSI Driver to v2.4.1
- Enable Volume metrics and CSI operations metrics
  • Loading branch information
tuxtof committed Aug 27, 2021
1 parent d488a3e commit 02fa582
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 26 deletions.
16 changes: 14 additions & 2 deletions charts/nutanix-csi-storage/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v1
name: nutanix-csi-storage
version: 2.3.14
version: 2.4.1
kubeVersion: ">= 1.17.0-0"
description: A Helm chart for installing Nutanix CSI Volume Driver
home: https://github.com/nutanix/helm
maintainers:
- name: tuxtof
icon: https://avatars2.githubusercontent.com/u/6165865?s=200&v=4
appVersion: "2.3.1"
appVersion: "2.4.1"
keywords:
- Nutanix
- Storage
Expand All @@ -16,3 +16,15 @@ keywords:
- StorageClass
- CentOS
- Ubuntu
annotations:
artifacthub.io/containsSecurityUpdates: "true"
artifacthub.io/changes: |
- Update Nutanix CSI Driver to 2.4.1
artifacthub.io/links: |
- name: Nutanix CSI Driver documentation
url: https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_4_1:CSI-Volume-Driver-v2_4_1
artifacthub.io/maintainers: |
- name: Christophe Jauffret
email: christophe@nutanix.com
- name: Subodh Mathur
email: subodh@nutanix.com
19 changes: 17 additions & 2 deletions charts/nutanix-csi-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ If you plan to update an existing Nutanix CSI deployement from 1.x to 2.x with t
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 are upgrading the CSI driver then you should 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_3:CSI-Volume-Driver-v2_3
https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_4_1:CSI-Volume-Driver-v2_4_1

## Features list

- Nutanix CSI Driver v2.3.1
- Nutanix CSI Driver v2.4.1
- Nutanix Volumes support
- Nutanix Files support
- Volume resize support ( beta in Kubernetes >= 1.16.0 )
Expand All @@ -28,6 +28,7 @@ https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_
- NFS dynamic share provisioning
- iSCSI Auto CHAP Authentication
- OS independence
- Volume metrics and CSI operations metrics support

## Prerequisites

Expand Down Expand Up @@ -90,6 +91,8 @@ The following table lists the configurable parameters of the Nutanix-CSI chart a
| `node.tolerations` | Add tolerations to node pods | `[]` |
| `snapshotController.nodeSelector`| Add nodeSelector to snapshotController pod | `{}` |
| `snapshotController.tolerations` | Add tolerations to snapshotController pod | `[]` |
| `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`.

Expand All @@ -104,3 +107,15 @@ or
```console
helm install nutanix-csi nutanix/nutanix-csi-storage -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.
7 changes: 7 additions & 0 deletions charts/nutanix-csi-storage/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ questions:
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: lvmVolume
label: "LVM Volume"
type: boolean
Expand Down
18 changes: 10 additions & 8 deletions charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright 2019 Nutanix Inc
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>

---
kind: DaemonSet
apiVersion: apps/v1
metadata:
Expand All @@ -24,9 +23,9 @@ spec:
image: {{ .Values.sidecars.registrar.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
- --v=5
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: ADDRESS
value: /csi/csi.sock
Expand Down Expand Up @@ -67,22 +66,25 @@ spec:
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: healthz
name: http-endpoint
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: healthz
port: http-endpoint
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
Expand All @@ -95,6 +97,7 @@ spec:
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=/csi/csi.sock
- --http-endpoint=:9808
{{- with (.Values.node.nodeSelector | default .Values.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -127,4 +130,3 @@ spec:
hostPath:
path: /
type: Directory

32 changes: 24 additions & 8 deletions charts/nutanix-csi-storage/templates/ntnx-csi-provisioner-sts.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright 2019 Nutanix Inc
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>

---
kind: StatefulSet
apiVersion: apps/v1
metadata:
Expand All @@ -25,9 +24,14 @@ spec:
image: {{ .Values.sidecars.provisioner.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --provisioner={{ include "nutanix-csi-storage.drivername" . }}
- --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=5
env:
- name: ADDRESS
Expand All @@ -41,7 +45,11 @@ spec:
args:
- --v=5
- --csi-address=$(ADDRESS)
- --timeout=60s
- --leader-election=false
# 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
Expand All @@ -68,9 +76,9 @@ spec:
allowPrivilegeEscalation: true
privileged: true
args:
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(NODE_ID)"
- "--drivername={{ include "nutanix-csi-storage.drivername" . }}"
- --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
Expand All @@ -81,14 +89,17 @@ spec:
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: 9808
name: healthz
name: http-endpoint
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: healthz
port: http-endpoint
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
Expand All @@ -101,6 +112,7 @@ spec:
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --csi-address=/csi/csi.sock
- --http-endpoint=:9808
{{- with (.Values.provisioner.nodeSelector | default .Values.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -112,3 +124,7 @@ spec:
volumes:
- emptyDir: {}
name: socket-dir
- hostPath:
path: /
type: Directory
name: root-dir
46 changes: 46 additions & 0 deletions charts/nutanix-csi-storage/templates/service-prometheus-csi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2021 Nutanix Inc
#
# example usage: kubectl create -f <this_file>
#

apiVersion: v1
kind: Service
metadata:
name: csi-metrics-service
namespace: {{ .Release.Namespace }}
labels:
app: csi-provisioner-ntnx-plugin
spec:
type: ClusterIP
selector:
app: csi-provisioner-ntnx-plugin
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: csi-driver
namespace: {{ .Release.Namespace }}
spec:
endpoints:
- interval: 30s
port: provisioner
- interval: 30s
port: resizer
selector:
matchLabels:
app: csi-provisioner-ntnx-plugin
{{- end }}
24 changes: 18 additions & 6 deletions charts/nutanix-csi-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,42 @@ filePath: share
#
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
#

provisioner:
image: quay.io/karbon/ntnx-csi:v2.3.1
image: quay.io/karbon/ntnx-csi:v2.4.1
nodeSelector: {}
tolerations: []

node:
image: quay.io/karbon/ntnx-csi:v2.3.1
image: quay.io/karbon/ntnx-csi:v2.4.1
nodeSelector: {}
tolerations: []

sidecars:
registrar:
image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0
provisioner:
image: quay.io/k8scsi/csi-provisioner:v1.6.0
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0
snapshotter:
image: quay.io/k8scsi/csi-snapshotter:v2.1.0
resizer:
image: quay.io/k8scsi/csi-resizer:v0.5.0
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
livenessprobe:
image: quay.io/k8scsi/livenessprobe:v2.1.0
image: k8s.gcr.io/sig-storage/livenessprobe:v2.3.0
snapshotController:
image: quay.io/k8scsi/snapshot-controller:v2.1.0
nodeSelector: {}
Expand Down

0 comments on commit 02fa582

Please sign in to comment.