Skip to content

Commit

Permalink
csi-storage 2.5.2 (#51)
Browse files Browse the repository at this point in the history
* add description support

* Update Chart.yaml

* Added reclaimPolicy setting via helm value for every StorageClasses (#50)

* cleanup value

* sync with olm operator

* update helm action version

Co-authored-by: François Van Ingelgom <[email protected]>
Co-authored-by: francois <[email protected]>
  • Loading branch information
3 people authored Mar 16, 2022
1 parent 5bf5305 commit 70e95ea
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 0

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.2.1

- name: Run chart-testing (lint-changed)
id: list-changed
Expand All @@ -28,7 +28,7 @@ jobs:

- name: ArtifactHUB Lint
env:
AH_CLI_VERSION: 1.4.0
AH_CLI_VERSION: 1.6.0
run: |
curl -LO https://github.com/artifacthub/hub/releases/download/v${AH_CLI_VERSION}/ah_${AH_CLI_VERSION}_linux_amd64.tar.gz
tar xvzf ah_${AH_CLI_VERSION}_linux_amd64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
uses: helm/chart-releaser-action@v1.3.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.2.1

- name: Run chart-testing (lint-changed)
id: list-changed
Expand Down
6 changes: 3 additions & 3 deletions charts/nutanix-csi-storage/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: nutanix-csi-storage
version: 2.5.1
version: 2.5.2
kubeVersion: ">= 1.17.0-0"
description: Nutanix Container Storage Interface (CSI) Driver
home: https://github.com/nutanix/helm
Expand All @@ -23,10 +23,10 @@ annotations:
artifacthub.io/displayName: "Nutanix CSI Storage"
artifacthub.io/containsSecurityUpdates: "true"
artifacthub.io/changes: |
- Update Nutanix CSI Driver to 2.5.0
- Update Nutanix CSI Driver to 2.5.1
artifacthub.io/links: |
- name: Nutanix CSI Driver documentation
url: https://portal.nutanix.com/page/documents/details?targetId=CSI-Volume-Driver-v2_5_0:CSI-Volume-Driver-v2_5_0
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: [email protected]
Expand Down
72 changes: 39 additions & 33 deletions charts/nutanix-csi-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,39 +106,45 @@ helm delete nutanix-csi -n <namespace of your choice>

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` |
| `fileClass` | Activate Nutanix Files Storage Class | `false` |
| `fileClassName` | Name of the Nutanix Files Storage Class | `nutanix-file` |
| `dynamicFileClass` | Activate Nutanix Dynamic Files Storage Class | `false` |
| `dynamicFileClassName` | Name of the Nutanix Dynamic Files Storage Class | `nutanix-dynamicfile` |
| `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`|
| `provisioner.nodeSelector` | Add nodeSelector to provisioner pod | `{}` |
| `provisioner.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`|
| 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` |
| `provisioner.nodeSelector` | Add nodeSelector to provisioner pod | `{}` |
| `provisioner.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`.

Expand Down
33 changes: 33 additions & 0 deletions charts/nutanix-csi-storage/templates/machine-config.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion charts/nutanix-csi-storage/templates/ntnx-csi-scc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.os "openshift4"}}
{{- if eq .Values.openshift.scc true }}
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
Expand Down
12 changes: 8 additions & 4 deletions charts/nutanix-csi-storage/templates/ntnx-sc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ parameters:
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: Delete
reclaimPolicy: {{ .Values.volumeClassRetention }}
---
{{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }}
apiVersion: snapshot.storage.k8s.io/v1
Expand All @@ -36,9 +37,9 @@ 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 }}
storageType: NutanixVolumes
csi.storage.k8s.io/snapshotter-secret-name: {{ .Values.secretName }}
csi.storage.k8s.io/snapshotter-secret-namespace: {{ .Release.Namespace }}
deletionPolicy: Delete
{{- end }}
---
Expand All @@ -56,6 +57,7 @@ parameters:
storageType: NutanixFiles
nfsServer: {{ .Values.fileHost }}
nfsPath: {{ .Values.filePath }}
reclaimPolicy: {{ .Values.fileClassRetention }}
{{- end }}
---
{{- if eq .Values.dynamicFileClass true }}
Expand All @@ -78,5 +80,7 @@ parameters:
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 }}
15 changes: 11 additions & 4 deletions charts/nutanix-csi-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
# need to be set to true only if upgrade and initialy installed with helm package before 2.2.x
legacy: false

# OS settings
# Openshift settings
#
# Starting v2.3.1 CSI driver is OS independent, this value is reserved
os: none

openshift:
scc: false
masterIscsiConfig: false
workerIscsiConfig: false

# kubeletDir allows overriding the host location of kubelet's internal state.
kubeletDir: "/var/lib/kubelet"
Expand All @@ -29,13 +32,17 @@ imagePullPolicy: IfNotPresent
# 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
#
Expand Down

0 comments on commit 70e95ea

Please sign in to comment.