Skip to content

Commit

Permalink
Adding more disables. (#386)
Browse files Browse the repository at this point in the history
* Adding more disables.

Signed-off-by: Michael Mattsson <[email protected]>
  • Loading branch information
datamattsson authored Jul 1, 2024
1 parent 717865e commit 658cff6
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm/charts/hpe-csi-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following table lists the configurable parameters of the chart and their def
| disableNodeConformance | Disable automatic installation of iSCSI, multipath and NFS packages. | false |
| disableNodeConfiguration | Disables node conformance and configuration.`*` | false |
| disableNodeGetVolumeStats | Disable NodeGetVolumeStats call to CSI driver. | false |
| disableNodeMonitor | Disables the Node Monitor that manages stale storage resources. | false |
| imagePullPolicy | Image pull policy (`Always`, `IfNotPresent`, `Never`). | IfNotPresent |
| iscsi.chapSecretName | Secret containing chapUser and chapPassword for iSCSI | "" |
| logLevel | Log level. Can be one of `info`, `debug`, `trace`, `warn` and `error`. | info |
Expand Down
16 changes: 16 additions & 0 deletions helm/charts/hpe-csi-driver/templates/hpe-csi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
{{ if .Values.disableNodeConformance -}}
- name: DISABLE_NODE_CONFORMANCE
value: "true"
{{- end }}
{{ if .Values.disableNodeConfiguration -}}
- name: DISABLE_NODE_CONFIGURATION
value: "true"
{{- end }}
{{ if .Values.disableNodeMonitor -}}
- name: DISABLE_NODE_MONITOR
value: "true"
{{- end }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
securityContext:
privileged: true
Expand Down Expand Up @@ -130,6 +142,10 @@ spec:
- name: DISABLE_NODE_CONFIGURATION
value: "true"
{{- end }}
{{ if .Values.disableNodeMonitor -}}
- name: DISABLE_NODE_MONITOR
value: "true"
{{- end }}
{{- if .Values.kubeletRootDir }}
- name: KUBELET_ROOT_DIR
value: {{ .Values.kubeletRootDir }}
Expand Down
3 changes: 3 additions & 0 deletions helm/charts/hpe-csi-driver/templates/hpe-csi-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch"]

---
apiVersion: v1
Expand Down
9 changes: 9 additions & 0 deletions helm/charts/hpe-csi-driver/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"logLevel": "info",
"kubeletRootDir": "/var/lib/kubelet/",
"disableNodeGetVolumeStats": false,
"disableNodeMonitor": false,
"csp": {
"nodeSelector": {},
"tolerations": [],
Expand Down Expand Up @@ -53,6 +54,7 @@
"logLevel",
"kubeletRootDir",
"disableNodeGetVolumeStats",
"disableNodeMonitor",
"csp",
"controller",
"node",
Expand Down Expand Up @@ -177,6 +179,13 @@
"type": "boolean",
"default": false
},
"disableNodeMonitor": {
"$id": "#/properties/disableNodeMonitor",
"title": "Disable the Node Monitor",
"description": "The Node Monitor watches for and acts on stale storage resources.",
"type": "boolean",
"default": false
},
"csp": {
"nodeSelector": {
"$id": "#/properties/csp/properties/nodeSelector",
Expand Down
3 changes: 3 additions & 0 deletions helm/charts/hpe-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ kubeletRootDir: "/var/lib/kubelet"
# NodeGetVolumestats will be called by default, set true to disable the call
disableNodeGetVolumeStats: false

# The Node Monitor ensure the node has no stale storage resources attached
disableNodeMonitor: false

controller:

# These values map directly to yaml in the deployment spec, see the kubernetes docs for info
Expand Down
5 changes: 4 additions & 1 deletion operators/hpe-csi-operator/sources/hpe-csi-operator.csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ spec:
path: disableNodeGetVolumeStats
x-descriptors:
- "urn:alm:descriptor:com.tectonic.ui:booleanSwitch"
- displayName: Disable Node Monitor
description: "Disable the Node Monitor. (default: false)"
path: disableNodeMonitor
x-descriptors:
- "urn:alm:descriptor:com.tectonic.ui:text"
- "urn:alm:descriptor:com.tectonic.ui:booleanSwitch"
- displayName: iSCSI Configuration
description: "Configuration for iSCSI CHAP authenticaton"
path: iscsi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ spec:
description: DisableNodeGetVolumeStats will be called by default,
set true to disable the call
type: boolean
disableNodeMonitor:
description: Disable the Node Monitor
type: boolean
imagePullPolicy:
description: Image Pull Policy for HPE CSI driver images
type: string
Expand Down Expand Up @@ -1304,8 +1307,10 @@ spec:
- disableNodeConformance
- disableNodeConfiguration
- disableNodeGetVolumeStats
- disableNodeMonitor
- imagePullPolicy
- images
- iscsi
- kubeletRootDir
- logLevel
- csp
Expand Down
19 changes: 19 additions & 0 deletions yaml/csi-driver/edge/hpe-csi-k8s-1.27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch"]

---
apiVersion: v1
Expand Down Expand Up @@ -752,6 +755,10 @@ spec:
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: LOG_LEVEL
value: trace
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
Expand Down Expand Up @@ -932,6 +939,12 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: DISABLE_NODE_CONFORMANCE
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down Expand Up @@ -990,6 +1003,12 @@ spec:
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down
19 changes: 19 additions & 0 deletions yaml/csi-driver/edge/hpe-csi-k8s-1.28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch"]

---
apiVersion: v1
Expand Down Expand Up @@ -752,6 +755,10 @@ spec:
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: LOG_LEVEL
value: trace
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
Expand Down Expand Up @@ -932,6 +939,12 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: DISABLE_NODE_CONFORMANCE
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down Expand Up @@ -990,6 +1003,12 @@ spec:
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down
19 changes: 19 additions & 0 deletions yaml/csi-driver/edge/hpe-csi-k8s-1.29.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch"]

---
apiVersion: v1
Expand Down Expand Up @@ -752,6 +755,10 @@ spec:
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: LOG_LEVEL
value: trace
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
Expand Down Expand Up @@ -932,6 +939,12 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: DISABLE_NODE_CONFORMANCE
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down Expand Up @@ -990,6 +1003,12 @@ spec:
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
value: hpe-storage
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down
11 changes: 11 additions & 0 deletions yaml/csi-driver/edge/hpe-csi-k8s-1.30.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch"]

---
apiVersion: v1
Expand Down Expand Up @@ -936,6 +939,12 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: DISABLE_NODE_CONFORMANCE
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
imagePullPolicy: "IfNotPresent"
securityContext:
privileged: true
Expand Down Expand Up @@ -994,6 +1003,8 @@ spec:
value: "false"
- name: DISABLE_NODE_CONFIGURATION
value: "false"
- name: DISABLE_NODE_MONITOR
value: "false"
- name: CHAP_SECRET_NAME
value: ""
- name: CHAP_SECRET_NAMESPACE
Expand Down

0 comments on commit 658cff6

Please sign in to comment.