Skip to content

Commit

Permalink
hpe-storage#54 add annotations, affinity, nodeselector, tolerations s…
Browse files Browse the repository at this point in the history
…upport
  • Loading branch information
wombat committed Mar 29, 2022
1 parent ca80581 commit 0ed9235
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 1 deletion.
15 changes: 15 additions & 0 deletions helm/charts/hpe-csi-driver/templates/hpe-csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ spec:
matchLabels:
app: hpe-csi-controller
template:
{{- with (.Values.hpeCSIController).annotations }}
annotations:
{{ toYaml . | indent 6}}
{{- end }}
metadata:
labels:
app: hpe-csi-controller
role: hpe-csi
spec:
{{- with (.Values.hpeCSIController).affinity }}
affinity:
{{ toYaml . | indent 8}}
{{- end }}
serviceAccountName: hpe-csi-controller-sa
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "17") }}
priorityClassName: system-cluster-critical
Expand Down Expand Up @@ -214,6 +222,10 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- with (.Values.hpeCSIController).nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8}}
{{- end }}
volumes:
- name: socket-dir
emptyDir: {}
Expand All @@ -238,3 +250,6 @@ spec:
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 30
{{- with (.Values.hpeCSIController).tolerations }}
{{ toYaml . | indent 8}}
{{ end }}
15 changes: 15 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 @@ -14,11 +14,19 @@ spec:
matchLabels:
app: hpe-csi-node
template:
{{- with (.Values.hpeCSINode).annotations }}
annotations:
{{ toYaml . | indent 6}}
{{- end }}
metadata:
labels:
app: hpe-csi-node
role: hpe-csi
spec:
{{- with (.Values.hpeCSINode).affinity }}
affinity:
{{ toYaml . | indent 8}}
{{- end }}
serviceAccountName: hpe-csi-node-sa
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "17") }}
priorityClassName: system-node-critical
Expand Down Expand Up @@ -139,6 +147,10 @@ spec:
- name: linux-config-file
mountPath: /opt/hpe-storage/nimbletune/config.json
subPath: config.json
{{- with (.Values.hpeCSINode).nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8}}
{{- end }}
volumes:
- name: registration-dir
hostPath:
Expand Down Expand Up @@ -199,3 +211,6 @@ spec:
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 30
{{- with (.Values.hpeCSINode).tolerations }}
{{ toYaml . | indent 8}}
{{ end }}
15 changes: 15 additions & 0 deletions helm/charts/hpe-csi-driver/templates/nimble-csp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ spec:
app: nimble-csp
replicas: 1
template:
{{- with (.Values.nimleCSP).annotations }}
annotations:
{{ toYaml . | indent 6}}
{{- end }}
metadata:
labels:
app: nimble-csp
spec:
{{- with (.Values.nimleCSP).affinity }}
affinity:
{{ toYaml . | indent 8}}
{{- end }}
serviceAccountName: hpe-csp-sa
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "17") }}
priorityClassName: system-cluster-critical
Expand All @@ -71,6 +79,10 @@ spec:
volumeMounts:
- name: log-dir
mountPath: /var/log
{{- with (.Values.nimleCSP).nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8}}
{{- end }}
volumes:
- name: log-dir
hostPath:
Expand All @@ -84,4 +96,7 @@ spec:
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 30
{{- with (.Values.nimleCSP).tolerations }}
{{ toYaml . | indent 8}}
{{ end }}
{{- end }}
17 changes: 16 additions & 1 deletion helm/charts/hpe-csi-driver/templates/primera-3par-csp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,18 @@ spec:
app: primera3par-csp
replicas: 1
template:
{{- with (.Values.primera3parCSP).annotations }}
annotations:
{{ toYaml . | indent 6}}
{{- end }}
metadata:
labels:
app: primera3par-csp
spec:
{{- with (.Values.primera3parCSP).affinity }}
affinity:
{{ toYaml . | indent 8}}
{{- end }}
serviceAccountName: hpe-csp-sa
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "17") }}
priorityClassName: system-cluster-critical
Expand All @@ -78,6 +86,10 @@ spec:
volumeMounts:
- name: log-dir
mountPath: /var/log
{{- with (.Values.primera3parCSP).nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8}}
{{- end }}
volumes:
- name: log-dir
hostPath:
Expand All @@ -91,4 +103,7 @@ spec:
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 30
{{- end }}
{{- with (.Values.primera3parCSP).tolerations }}
{{ toYaml . | indent 8}}
{{ end }}
{{- end }}
136 changes: 136 additions & 0 deletions helm/charts/hpe-csi-driver/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,74 @@
"type": "boolean",
"default": false
},
"hpeCSIController": {
"$id": "#/properties/hpeCSIController",
"title": "Disable node conformance",
"description": "Disabling node conformance forces the cluster administrator to install required packages and ensure the correct node services are started to use external block storage.",
"type": "object",
"default": {},
"properties": {
"affinity": {
"$id": "#/properties/hpeCSIController/properties/affinity",
"title": "Affinity for the hpe-csi-controller deployment",
"type": "object",
"default": {}
},
"annotations": {
"$id": "#/properties/hpeCSIController/properties/annotations",
"title": "Annotations for the hpe-csi-controller deployment",
"type": "object",
"default": {}
},
"nodeSelector": {
"$id": "#/properties/hpeCSIController/properties/nodeSelector",
"title": "NodeSelector for the hpe-csi-controller deployment",
"type": "object",
"default": {}
},
"tolerations": {
"$id": "#/properties/hpeCSIController/properties/tolerations",
"title": "Tolerations for the hpe-csi-controller deployment",
"type": "array",
"default": []
}
},
"additionalProperties": false
},
"hpeCSINode": {
"$id": "#/properties/hpeCSINode",
"title": "Disable node conformance",
"description": "Disabling node conformance forces the cluster administrator to install required packages and ensure the correct node services are started to use external block storage.",
"type": "object",
"default": {},
"properties": {
"affinity": {
"$id": "#/properties/hpeCSINode/properties/affinity",
"title": "Affinity for the hpe-csi-node daemonset",
"type": "object",
"default": {}
},
"annotations": {
"$id": "#/properties/hpeCSINode/properties/annotations",
"title": "Annotations for the hpe-csi-node daemonset",
"type": "object",
"default": {}
},
"nodeSelector": {
"$id": "#/properties/hpeCSINode/properties/nodeSelector",
"title": "NodeSelector for the hpe-csi-node daemonset",
"type": "object",
"default": {}
},
"tolerations": {
"$id": "#/properties/hpeCSINode/properties/tolerations",
"title": "Tolerations for the hpe-csi-node daemonset",
"type": "array",
"default": []
}
},
"additionalProperties": false
},
"imagePullPolicy": {
"$id": "#/properties/imagePullPolicy",
"title": "CSI driver image pull policy",
Expand Down Expand Up @@ -131,6 +199,74 @@
"default": "info",
"enum": [ "info", "debug", "trace", "warn", "error" ]
},
"nimleCSP": {
"$id": "#/properties/nimleCSP",
"title": "Disable node conformance",
"description": "Disabling node conformance forces the cluster administrator to install required packages and ensure the correct node services are started to use external block storage.",
"type": "object",
"default": {},
"properties": {
"affinity": {
"$id": "#/properties/nimleCSP/properties/affinity",
"title": "Affinity for the nimble-csp deployment",
"type": "object",
"default": {}
},
"annotations": {
"$id": "#/properties/nimleCSP/properties/annotations",
"title": "Annotations for the nimble-csp deployment",
"type": "object",
"default": {}
},
"nodeSelector": {
"$id": "#/properties/nimleCSP/properties/nodeSelector",
"title": "NodeSelector for the nimble-csp deployment",
"type": "object",
"default": {}
},
"tolerations": {
"$id": "#/properties/nimleCSP/properties/tolerations",
"title": "Tolerations for the nimble-csp deployment",
"type": "array",
"default": []
}
},
"additionalProperties": false
},
"primera3parCSP": {
"$id": "#/properties/primera3parCSP",
"title": "Disable node conformance",
"description": "Disabling node conformance forces the cluster administrator to install required packages and ensure the correct node services are started to use external block storage.",
"type": "object",
"default": {},
"properties": {
"affinity": {
"$id": "#/properties/primera3parCSP/properties/affinity",
"title": "Affinity for the primera3par-csp deployment",
"type": "object",
"default": {}
},
"annotations": {
"$id": "#/properties/primera3parCSP/properties/annotations",
"title": "Annotations for the primera3par-csp deployment",
"type": "object",
"default": {}
},
"nodeSelector": {
"$id": "#/properties/primera3parCSP/properties/nodeSelector",
"title": "NodeSelector for the primera3par-csp deployment",
"type": "object",
"default": {}
},
"tolerations": {
"$id": "#/properties/primera3parCSP/properties/tolerations",
"title": "Tolerations for the primera3par-csp deployment",
"type": "array",
"default": []
}
},
"additionalProperties": false
},
"registry": {
"$id": "#/properties/registry",
"title": "Pull images from a different registry than default",
Expand Down

0 comments on commit 0ed9235

Please sign in to comment.