Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone helm support for PowerFlex #249

Closed
wants to merge 7 commits into from
Closed
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
1 change: 0 additions & 1 deletion charts/csi-vxflexos/Chart.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KshitijaKakde you can keep this file as it is. Looking at the changes i see the placement of the filelds is different here. There were no changes to the values.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ maintainers:
- name: DellEMC
sources:
- https://github.com/dell/csi-vxflexos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the removed new line back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


11 changes: 11 additions & 0 deletions charts/csi-vxflexos/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,14 @@ Return the appropriate sidecar images based on k8s version
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Return true if storage capacity tracking is enabled and is supported based on k8s version
*/}}
{{- define "csi-vxflexos.isStorageCapacitySupported" -}}
{{- if eq .Values.storageCapacity.enabled true -}}
{{- if and (eq .Capabilities.KubeVersion.Major "1") (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- true -}}
{{- end -}}
{{- end -}}
{{- end -}}
39 changes: 38 additions & 1 deletion charts/csi-vxflexos/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ rules:
verbs: ["create", "get", "list", "watch"]
{{- end}}
{{- end}}
# Permissions for CSIStorageCapacity
{{- if eq (include "csi-vxflexos.isStorageCapacitySupported" .) "true" }}
- apiGroups: ["storage.k8s.io"]
resources: ["csistoragecapacities"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get"]
{{- end }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -258,9 +270,20 @@ spec:
- "--v=5"
- "--default-fstype={{ .Values.defaultFsType | default "ext4" }}"
- "--extra-create-metadata"
- "--enable-capacity={{ (include "csi-vxflexos.isStorageCapacitySupported" .) | default false }}"
- "--capacity-ownerref-level=2"
- "--capacity-poll-interval={{ .Values.storageCapacity.pollInterval | default "5m" }}"
env:
- name: ADDRESS
value: /var/run/csi/csi.sock
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: socket-dir
mountPath: /var/run/csi
Expand Down Expand Up @@ -397,6 +420,20 @@ spec:
value: "{{ .Values.controller.healthMonitor.enabled }}"
{{- end }}
{{- end }}
{{- if hasKey .Values "nfsAcls" }}
- name: X_CSI_NFS_ACLS
value: "{{ .Values.nfsAcls }}"
{{- end }}
{{- if hasKey .Values "externalAccess" }}
- name: X_CSI_POWERFLEX_EXTERNAL_ACCESS
value: "{{ .Values.externalAccess }}"
{{- end }}
{{- if hasKey .Values "enableQuota" }}
{{- if eq .Values.enableQuota true}}
- name: X_CSI_QUOTA_ENABLED
value: "{{ .Values.enableQuota }}"
{{- end }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /var/run/csi
Expand Down Expand Up @@ -439,4 +476,4 @@ spec:
- key: cert-{{ $e }}
path: cert-{{ $e }}
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/csi-vxflexos/templates/csidriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: CSIDriver
metadata:
name: csi-vxflexos.dellemc.com
spec:
storageCapacity: {{ (include "csi-vxflexos.isStorageCapacitySupported" .) | default false }}
fsGroupPolicy: {{ .Values.fsGroupPolicy }}
attachRequired: true
podInfoOnMount: true
Expand Down
2 changes: 2 additions & 0 deletions charts/csi-vxflexos/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ spec:
value: "{{ .Values.kubeletConfigDir }}/plugins/vxflexos.emc.dell.com/disks"
- name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS
value: "{{ required "Must provide a true/false string to allow RWO multi pod access." .Values.allowRWOMultiPodAccess }}"
- name: X_CSI_MAX_VOLUMES_PER_NODE
value: "{{ .Values.maxVxflexosVolumesPerNode }}"
- name: SSL_CERT_DIR
value: /certs
{{- if hasKey .Values.node "healthMonitor" }}
Expand Down
87 changes: 68 additions & 19 deletions charts/csi-vxflexos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ kubeletConfigDir: /var/lib/kubelet
# Default value: none
defaultFsType: ext4

# externalAccess: allows to specify additional entries for host to access NFS volumes. Both single IP address and subnet are valid entries.
# Allowed Values: x.x.x.x/xx or x.x.x.x
# Default Value: None
externalAccess:

# imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container.
# Allowed values:
# Always: Always pull the image.
Expand All @@ -46,6 +51,29 @@ defaultFsType: ext4
# Default value: None
imagePullPolicy: IfNotPresent

# nfsAcls: enables setting permissions on NFS mount directory
# This value acts as default value for NFS ACL (nfsAcls), if not specified for an array config in secret
# Permissions can be specified in two formats:
# 1) Unix mode (NFSv3)
# 2) NFSv4 ACLs (NFSv4)
# NFSv4 ACLs are supported on NFSv4 share only.
# Allowed values:
# 1) Unix mode: valid octal mode number
# Examples: "0777", "777", "0755"
# 2) NFSv4 acls: valid NFSv4 acls, seperated by comma
# Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy"
# Optional: true
# Default value: "0777"
nfsAcls: "0777"

# enableQuota: a boolean that, when enabled, will set quota limit for a newly provisioned NFS volume.
# Allowed values:
# true: set quota for volume
# false: do not set quota for volume
# Optional: true
# Default value: none
enableQuota: false

# "enablesnapshotcgdelete"- a boolean that, when enabled, will delete all snapshots in a consistency group
# everytime a snap in the group is deleted
# Allowed values: true, false
Expand All @@ -54,15 +82,15 @@ enablesnapshotcgdelete: "false"

# "enablelistvolumesnapshot" - a boolean that, when enabled, will allow list volume operation to include snapshots (since creating a volume
# from a snap actually results in a new snap)
# It is recommend this be false unless instructed otherwise.
# It is recommended this be false unless instructed otherwise.
# Allowed values: true, false
# Default value: none
enablelistvolumesnapshot: "false"

# Setting allowRWOMultiPodAccess to "true" will allow multiple pods on the same node
# to access the same RWO volume. This behavior conflicts with the CSI specification version 1.3
# NodePublishVolume descrition that requires an error to be returned in this case.
# However some other CSI drivers support this behavior and some customers desire this behavior.
# However, some other CSI drivers support this behavior and some customers desire this behavior.
# Kubernetes could make a change at their discretion that would preclude our ability to support this option.
# Customers use this option at their own risk.
# You should leave this set as "false" unless instructed to change it by Dell support.
Expand All @@ -79,6 +107,12 @@ allowRWOMultiPodAccess: "false"
# None: volumes will be mounted with no modifications.
fsGroupPolicy: File

# maxVxflexosVolumesPerNode - Maximum number of volumes that controller can publish to the node.
# Allowed values: integer
# Default value: 0
# Examples : 0 , 1
maxVxflexosVolumesPerNode: 0

# "controller" allows to configure controller specific parameters
controller:

Expand Down Expand Up @@ -245,6 +279,21 @@ node:
# Default value: false
enabled: false

# Storage Capacity Tracking
# Note: Capacity tracking is supported in kubernetes v1.24 and above, this feature will be automatically disabled in older versions.
storageCapacity:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this in container-storage-modules chart as well

# enabled : Enable/Disable storage capacity tracking
# Allowed values:
# true: enable storage capacity tracking
# false: disable storage capacity tracking
# Default value: true
enabled: true
# pollInterval : Configure how often external-provisioner polls the driver to detect changed capacity
# Allowed values: 1m,2m,3m,...,10m,...,60m etc
# Default value: 5m
pollInterval: 5m


# monitoring pod details
# These options control the running of the monitoring container
# This container gather diagnostic information in case of failure
Expand Down Expand Up @@ -279,23 +328,23 @@ podmon:
enabled: false
image: dellemc/podmon:v1.6.0
#controller:
# args:
# - "--csisock=unix:/var/run/csi/csi.sock"
# - "--labelvalue=csi-vxflexos"
# - "--mode=controller"
# - "--skipArrayConnectionValidation=false"
# - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml"
# - "--driverPodLabelValue=dell-storage"
# - "--ignoreVolumelessPods=false"
# args:
# - "--csisock=unix:/var/run/csi/csi.sock"
# - "--labelvalue=csi-vxflexos"
# - "--mode=controller"
# - "--skipArrayConnectionValidation=false"
# - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml"
# - "--driverPodLabelValue=dell-storage"
# - "--ignoreVolumelessPods=false"
#node:
# args:
# - "--csisock=unix:/var/lib/kubelet/plugins/vxflexos.emc.dell.com/csi_sock"
# - "--labelvalue=csi-vxflexos"
# - "--mode=node"
# - "--leaderelection=false"
# - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml"
# - "--driverPodLabelValue=dell-storage"
# - "--ignoreVolumelessPods=false"
# args:
# - "--csisock=unix:/var/lib/kubelet/plugins/vxflexos.emc.dell.com/csi_sock"
# - "--labelvalue=csi-vxflexos"
# - "--mode=node"
# - "--leaderelection=false"
# - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml"
# - "--driverPodLabelValue=dell-storage"
# - "--ignoreVolumelessPods=false"

# CSM module attributes
# authorization: enable csm-authorization for RBAC
Expand All @@ -320,4 +369,4 @@ authorization:
# "true" - TLS certificate verification will be skipped
# "false" - TLS certificate will be verified
# Default value: "true"
skipCertificateValidation: true
skipCertificateValidation: true
Loading