Skip to content

Commit

Permalink
signing all commits (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyvjoy authored Aug 22, 2023
1 parent d043934 commit bf1f9c4
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 4 deletions.
7 changes: 4 additions & 3 deletions bundle/manifests/dell-csm-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,10 @@ metadata:
"value": "0"
}
],
"image": "dellemc/csi-vxflexos:v2.7.0",
"image": "dellemc/csi-vxflexos:v2.8.0",
"imagePullPolicy": "IfNotPresent"
},
"configVersion": "v2.7.0",
"configVersion": "v2.8.0",
"controller": {
"envs": [
{
Expand All @@ -813,7 +813,8 @@ metadata:
"tolerations": null
},
"csiDriverSpec": {
"fSGroupPolicy": "File"
"fSGroupPolicy": "File",
"storageCapacity": true
},
"csiDriverType": "powerflex",
"dnsPolicy": "ClusterFirstWithHostNet",
Expand Down
10 changes: 10 additions & 0 deletions config/samples/storage_v1_csm_powerflex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ spec:
# Allowed values: ReadWriteOnceWithFSType, File , None
# Default value: ReadWriteOnceWithFSType
fSGroupPolicy: "File"
# storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array
# Allowed values:
# true: enable storage capacity tracking
# false: disable storage capacity tracking
storageCapacity: true
configVersion: v2.8.0
replicas: 1
dnsPolicy: ClusterFirstWithHostNet
Expand Down Expand Up @@ -56,6 +61,11 @@ spec:
- name: csi-external-health-monitor-controller
enabled: false
args: ["--monitor-interval=60s"]
# Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity
# Configure when the storageCapacity is set as "true"
# Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m
#- name: provisioner
# args: ["--capacity-poll-interval=5m"]

controller:
envs:
Expand Down
18 changes: 18 additions & 0 deletions operatorconfig/driverconfig/powerflex/v2.8.0/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete", "update"]
# Permissions for CSIStorageCapacity
- apiGroups: ["storage.k8s.io"]
resources: ["csistoragecapacities"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -141,9 +148,20 @@ spec:
- "--v=5"
- "--default-fstype=ext4"
- "--extra-create-metadata"
- "--enable-capacity=true"
- "--capacity-ownerref-level=2"
- "--capacity-poll-interval=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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ spec:
fsGroupPolicy: ReadWriteOnceWithFSType
attachRequired: true
podInfoOnMount: true
storageCapacity: false
volumeLifecycleModes:
- Persistent
- Ephemeral
2 changes: 2 additions & 0 deletions pkg/drivers/commonconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ func GetCSIDriver(ctx context.Context, cr csmv1.ContainerStorageModule, operator
YamlString = ModifyPowerScaleCR(YamlString, cr, "CSIDriverSpec")
case "powermax":
YamlString = ModifyPowermaxCR(YamlString, cr, "CSIDriverSpec")
case "powerflex":
YamlString = ModifyPowerflexCR(YamlString, cr, "CSIDriverSpec")
case "unity":
YamlString = ModifyUnityCR(YamlString, cr, "CSIDriverSpec")
}
Expand Down
7 changes: 6 additions & 1 deletion pkg/drivers/powerflex.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func ModifyPowerflexCR(yamlString string, cr csmv1.ContainerStorageModule, fileT
renameSdcEnabled := ""
renameSdcPrefix := ""
maxVolumesPerNode := ""
storageCapacity := "false"
nfsAcls := ""
externalAscess := ""
enableQuota := ""
Expand Down Expand Up @@ -265,10 +266,14 @@ func ModifyPowerflexCR(yamlString string, cr csmv1.ContainerStorageModule, fileT
yamlString = strings.ReplaceAll(yamlString, CsiRenameSdcEnabled, renameSdcEnabled)
yamlString = strings.ReplaceAll(yamlString, CsiPrefixRenameSdc, renameSdcPrefix)
yamlString = strings.ReplaceAll(yamlString, CsiVxflexosMaxVolumesPerNode, maxVolumesPerNode)
case "CSIDriverSpec":
if cr.Spec.Driver.CSIDriverSpec.StorageCapacity {
storageCapacity = "true"
}
yamlString = strings.ReplaceAll(yamlString, CsiStorageCapacityEnabled, storageCapacity)
yamlString = strings.ReplaceAll(yamlString, CsiVxflexosNfsAcls, nfsAcls)
yamlString = strings.ReplaceAll(yamlString, CsiVxflexosExternaAccess, externalAscess)
yamlString = strings.ReplaceAll(yamlString, CsiVxflexosQuotaEnabled, enableQuota)

}
return yamlString
}
10 changes: 10 additions & 0 deletions samples/storage_csm_powerflex_v280.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ spec:
# Allowed values: ReadWriteOnceWithFSType, File , None
# Default value: ReadWriteOnceWithFSType
fSGroupPolicy: "File"
# storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array
# Allowed values:
# true: enable storage capacity tracking
# false: disable storage capacity tracking
storageCapacity: true
configVersion: v2.8.0
replicas: 1
dnsPolicy: ClusterFirstWithHostNet
Expand Down Expand Up @@ -56,6 +61,11 @@ spec:
- name: csi-external-health-monitor-controller
enabled: false
args: ["--monitor-interval=60s"]
# Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity
# Configure when the storageCapacity is set as "true"
# Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m
#- name: provisioner
# args: ["--capacity-poll-interval=5m"]

controller:
envs:
Expand Down
18 changes: 18 additions & 0 deletions tests/config/driverconfig/powerflex/v2.8.0/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete", "update"]
# Permissions for CSIStorageCapacity
- apiGroups: ["storage.k8s.io"]
resources: ["csistoragecapacities"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -141,9 +148,20 @@ spec:
- "--v=5"
- "--default-fstype=ext4"
- "--extra-create-metadata"
- "--enable-capacity=true"
- "--capacity-ownerref-level=2"
- "--capacity-poll-interval=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
1 change: 1 addition & 0 deletions tests/config/driverconfig/powerflex/v2.8.0/csidriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ spec:
fsGroupPolicy: ReadWriteOnceWithFSType
attachRequired: true
podInfoOnMount: true
storageCapacity: true
volumeLifecycleModes:
- Persistent
- Ephemeral
10 changes: 10 additions & 0 deletions tests/e2e/testfiles/storage_csm_powerflex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ spec:
# Allowed values: ReadWriteOnceWithFSType, File , None
# Default value: ReadWriteOnceWithFSType
fSGroupPolicy: "File"
# storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array
# Allowed values:
# true: enable storage capacity tracking
# false: disable storage capacity tracking
storageCapacity: true
configVersion: v2.8.0
replicas: 1
dnsPolicy: ClusterFirstWithHostNet
Expand Down Expand Up @@ -59,6 +64,11 @@ spec:
- name: csi-external-health-monitor-controller
enabled: false
args: ["--monitor-interval=60s"]
# Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity
# Configure when the storageCapacity is set as "true"
# Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m
#- name: provisioner
# args: ["--capacity-poll-interval=5m"]

controller:
envs:
Expand Down

0 comments on commit bf1f9c4

Please sign in to comment.