diff --git a/charts/nutanix-csi-storage/Chart.yaml b/charts/nutanix-csi-storage/Chart.yaml index 7b69ce5..d99e286 100644 --- a/charts/nutanix-csi-storage/Chart.yaml +++ b/charts/nutanix-csi-storage/Chart.yaml @@ -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 @@ -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 diff --git a/charts/nutanix-csi-storage/README.md b/charts/nutanix-csi-storage/README.md index b687380..6dcc296 100644 --- a/charts/nutanix-csi-storage/README.md +++ b/charts/nutanix-csi-storage/README.md @@ -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 ) @@ -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 @@ -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`. @@ -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. diff --git a/charts/nutanix-csi-storage/questions.yml b/charts/nutanix-csi-storage/questions.yml index a8f3d2b..401f95a 100644 --- a/charts/nutanix-csi-storage/questions.yml +++ b/charts/nutanix-csi-storage/questions.yml @@ -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 diff --git a/charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml b/charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml index 463dba0..0d05e57 100644 --- a/charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml +++ b/charts/nutanix-csi-storage/templates/ntnx-csi-node-ds.yaml @@ -1,8 +1,7 @@ -# Copyright 2019 Nutanix Inc +# Copyright 2021 Nutanix Inc # # example usage: kubectl create -f ---- kind: DaemonSet apiVersion: apps/v1 metadata: @@ -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 @@ -67,6 +66,8 @@ 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 @@ -74,15 +75,16 @@ spec: 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 @@ -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 }} @@ -127,4 +130,3 @@ spec: hostPath: path: / type: Directory - diff --git a/charts/nutanix-csi-storage/templates/ntnx-csi-provisioner-sts.yaml b/charts/nutanix-csi-storage/templates/ntnx-csi-provisioner-sts.yaml index 907541b..891b979 100644 --- a/charts/nutanix-csi-storage/templates/ntnx-csi-provisioner-sts.yaml +++ b/charts/nutanix-csi-storage/templates/ntnx-csi-provisioner-sts.yaml @@ -1,8 +1,7 @@ -# Copyright 2019 Nutanix Inc +# Copyright 2021 Nutanix Inc # # example usage: kubectl create -f ---- kind: StatefulSet apiVersion: apps/v1 metadata: @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 }} @@ -112,3 +124,7 @@ spec: volumes: - emptyDir: {} name: socket-dir + - hostPath: + path: / + type: Directory + name: root-dir diff --git a/charts/nutanix-csi-storage/templates/service-prometheus-csi.yaml b/charts/nutanix-csi-storage/templates/service-prometheus-csi.yaml new file mode 100644 index 0000000..e55eabf --- /dev/null +++ b/charts/nutanix-csi-storage/templates/service-prometheus-csi.yaml @@ -0,0 +1,46 @@ +# Copyright 2021 Nutanix Inc +# +# example usage: kubectl create -f +# + +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 }} \ No newline at end of file diff --git a/charts/nutanix-csi-storage/values.yaml b/charts/nutanix-csi-storage/values.yaml index 997b638..4d95279 100644 --- a/charts/nutanix-csi-storage/values.yaml +++ b/charts/nutanix-csi-storage/values.yaml @@ -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: {}