Commit ee965afb by Raunak Kumar Committed by Denise

v3.1.1 chart for hpe-flexvolume-driver

parent 053f7e4d
apiVersion: v1
appVersion: "3.1"
description: A Helm chart for installing the HPE Volume Driver for Kubernetes FlexVolume plugin
icon: file://../hpedev.png
maintainers:
- name: shivamerla
email: hpe-containers-dev@hpe.com
sources:
- https://github.com/hpe-storage/flexvolume-driver
name: hpe-flexvolume-driver
version: 3.1.1
home: https://hpe.com/storage/containers
keywords:
- HPE
- Storage
- StorageClass
- CentOS
- Ubuntu
- CloudVolumes
# HPE Volume Driver for Kubernetes FlexVolume Plugin Helm chart
The [HPE Volume Driver for Kubernetes FlexVolume Plugin](https://github.com/hpe-storage/flexvolume-driver) leverages HPE storage platforms to provide scalable and persistent storage for stateful applications. This chart also deploys the [HPE Dynamic Provisioner for Kubernetes](https://github.com/hpe-storage/k8s-dynamic-provisioner).
## Prerequisites
- Upstream Kubernetes version 1.11 or later
- Other Kubernetes distributions supported
- Rancher 2.x
- OpenShift 3.10, 3.11 (4.x will not be supported, see [CSI Driver Helm chart](https://github.com/hpe-storage/co-deployments/tree/master/helm/charts/hpe-csi-driver))
- More distributions will be listed as tests are ongoing
- Recent Ubuntu, CentOS or RHEL compute nodes connected to their respective official package repositories
Depending on which `pluginType` is being used, other prerequisites and requirements may apply.
### HPE Nimble Storage (nimble)
- NimbleOS 5.0.8 or later
- NimbleOS 5.1.3 or later
### HPE Cloud Volumes
- Amazon EKS 1.12.x/1.13.x
- Microsoft AKS 1.12.x/1.13.x
- US Regions Only
## Configuration & Installation
The following table lists the configurable parameters of the FlexVolume driver chart and their default values.
| Parameter | Description | Default |
|---------------------------|----------------------------------------------------------------------------------------------------|------------ |
| backend | HPE storage platform API endpoint. | 192.168.1.1 |
| pluginType | Backend plugin type to use. Currently `nimble` and `cv` are supported. | nimble |
| username | Username for the backend. Access key for HPE Cloud Volumes. | admin |
| password | Password for the backend. Access secret for HPE Cloud Volumes. | admin |
| protocol | Data plane protocol (`fc`, `iscsi`). | iscsi |
| fsType | Type of file to format volumes with (ext4, ext3, xfs, btrfs). | xfs |
| logLevel | Log level. Can be one of `info`, `debug`, `trace`, `warn` and `error` | info |
| mountConflictDelay | Wait this long (in seconds) before forcefully taking over a volume from an isolated or crashed node. | 120 |
| flavor | Kubernetes distribution specific tweaks. Supported flavors include `k8s`, `ocp`, `eks`, `aks` and `rke`. | k8s |
| podsMountDir | This is the directory where the kubelet bind mounts the volume for pods. May differ between Kubernetes distributions. | /var/lib/kubelet/pods |
| storageClass.name | The name to assign the created StorageClass. | hpe-standard |
| storageClass.create | Enables creation of StorageClass to consume this hpe-flexvolume-driver instance. | true |
| storageClass.defaultClass | Whether to set the created StorageClass as the clusters default StorageClass. | false |
| nimble.config | HPE Nimble Storage volume config parameters. | - |
| cv.config | HPE Cloud Volumes volume config parameters. | - |
It's recommended to create a `values.yaml` file and edit it to fit the environment the chart is being deployed to.
Example `values.yaml` using a Nimble backend:
```
---
backend: 192.168.1.1
username: admin
password: admin
pluginType: nimble
fsType: xfs
storageClass:
defaultClass: true
```
This will connect the driver to a Nimble based backend with management IP address of `192.168.1.1` and format new volumes with a XFS filesystem.
The `nimble.config` or `cv.config` stanza will be hosted in a `ConfigMap` and can be used to tweak default parmaters and also override `StorageClass` parameters. More information on these stanzas can be found in the [ADVANCED.md](https://github.com/hpe-storage/flexvolume-driver/blob/master/ADVANCED.md) documentation.
Example `nimble.config` stanza:
```
nimble:
config:
limitIOPS: "-1"
limitMBPS: "-1"
perfPolicy: DockerDefault
```
Example `cv.config` stanza:
```
cv:
config:
snapPrefix: BaseFor
automatedConnection: true
existingCloudSubnet: 10.1.0.0/24
region: us-east-1
privateCloud: vpc-data
cloudComputeProvider: "Amazon AWS"
perfPolicy: Other
volumeType: PF
encryption: true
protectionTemplate: twicedaily:4
destroyOnRm: true
limitIOPS: "1000"
initiators:
- '"eth0"'
privateCloudResourceGroup: ""
```
**Note:** Storage class parameters will override the settings in `defaults` and `global` section.
### Platform notes
Certain distributions demand certain tweaks to the variables for the driver and dynamic provisioner to operate correctly. See each platform for details.
#### Upstream Kubernetes
This is the default operating mode, no tweaks are needed.
#### Red Hat OpenShift and OKD
Applicable to Red Hat OpenShift 3.10 and 3.11. 4.x is not supported<sup>*</sup>.
| Key | Value | Description |
|------------|---------------------------|------------------------------------------------------------------------------------|
| podsMountDir | /var/lib/origin/openshift.local.volumes | This is the directory where the kubelet bind mounts the volume for pods. |
<sup>*</sup> = If experimentation is desirable with OpenShift 4.x, set `flexVolumeExec` default path for ocp to `/etc/kubernetes/kubelet-plugins/volume/exec`. The driver will only work on RHEL 7.x nodes.
#### Rancher
Applicable to installing the Helm Chart via the Rancher catalog system.
| Key | Value | Description |
|------------|---------------------------|------------------------------------------------------------------------------------|
| flavor | rke | Required and prepopulated by default. |
| podsMountDir | /var/lib/kubelet/volumeplugins | This is the directory where the kubelet bind mounts the volume for pods. Required and prepopulated by default.|
## Installing the Chart
To install the chart with the name `hpe-flexvolume`:
```
helm repo add hpe-storage https://hpe-storage.github.io/co-deployments/
helm install hpe-storage/hpe-flexvolume-driver --namespace kube-system --name hpe-flexvolume -f values.yaml
```
**Note:** Omitting the `--name` flag will generate a human readable name.
## Check status of the Chart
To check status of the `hpe-flexvolume` deployment:
```
helm status hpe-flexvolume
```
## Uninstalling the Chart
To uninstall/delete the `hpe-flexvolume` deployment:
```
helm delete hpe-flexvolume --purge
```
## Alternative install method
In some cases it's more practical provide the local configuration via the `helm` command directly. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
```
helm install --name hpe-flexvolume hpe/hpe-flexvolume-driver \
--set backend=X.X.X.X --set username=admin --set password=xxxxxxxxx \
--set protocol=iscsi --set fsType=xfs
```
## Using the HPE Volume Driver for Kubernetes FlexVolume Plugin
To enable dynamic provisioning of `PersistentVolume` through the use of `PersistentVolumeClaim` API objects, a `StorageClass` needs to be declared on the cluster. Please see the [HPE Volume Driver for Kubernetes FlexVolume Plugin](https://github.com/hpe-storage/flexvolume-driver) repository for the official documentation for this Helm chart. Also, it's helpful to be familar with [persistent storage concepts](https://kubernetes.io/docs/concepts/storage/volumes/) in Kubernetes prior to deploying stateful workloads.
## Support
The HPE Volume Driver for Kubernetes FlexVolume Plugin Helm chart is supported by the respective platform team. Currently supported platforms:
- HPE Nimble Storage
- HPE Cloud Volumes
Please file issues through the regular support channels for the particular platform. Feature requests or general questions to developers may be filed through the [GitHub issue tracker](https://github.com/hpe-storage/co-deployments) for this project.
You may also join our Slack community to chat with HPE folks close to this project for inquiries not requring our immediate response. We hang out in `#NimbleStorage` and `#Kubernetes` at [slack.hpedev.io](https://slack.hpedev.io/).
## Contributing
We value all feedback and contributions. If you find any issues or want to contribute, please feel free to open an issue or file a PR. More details in [CONTRIBUTING.md](https://github.com/hpe-storage/co-deployments/blob/master/CONTRIBUTING.md)
## License
This is open source software licensed using the Apache License 2.0. Please see [LICENSE](https://github.com/hpe-storage/co-deployments/blob/master/LICENSE) for details.
# HPE Volume Driver for Kubernetes FlexVolume Plugin
The [HPE Volume Driver for Kubernetes FlexVolume plugin](https://github.com/hpe-storage/flexvolume-driver) leverages HPE storage platforms to provide scalable and persistent storage for stateful applications. This chart also deploys the [HPE Dynamic Provisioner for Kubernetes](https://github.com/hpe-storage/k8s-dynamic-provisioner).
categories:
- storage
namespace: kube-system
rancher_min_version: 2.2.0
labels:
io.cattle.role: cluster
io.rancher.certified: partner
questions:
- variable: flavor
label: "Kubernetes flavor"
type: enum
default: "rke"
required: true
options:
- "rke"
- "eks"
- "ocp"
- "aks"
- "gke"
- "gkeop"
- "k8s"
description: "Tweak Helm chart behavior."
group: "Rancher specific settings"
- variable: pluginType
label: "HPE platform"
type: enum
options:
- "nimble"
- "cv"
- "simplivity"
default: "nimble"
description: "HPE platform type for the deployment."
group: "HPE backend settings"
- variable: backend
label: "IP address"
type: string
required: true
description: "Please specify HPE backend IP address."
group: "HPE backend settings"
- variable: username
label: "Username"
type: string
required: true
description: "Specify username with backend storage admin permissions."
group: "HPE backend settings"
- variable: password
label: "Password"
type: password
required: true
description: "Specify password for the backend user."
group: "HPE backend settings"
- variable: fsType
label: "Filesystem"
default: "xfs"
type: enum
options:
- "xfs"
- "ext4"
- "ext3"
- "btrfs"
description: "Select the filesystem for Persistent Volumes, defaults to xfs."
group: "HPE StorageClass and volume settings"
- variable: protocol
label: "HPE storage protocol"
type: enum
default: "iscsi"
options:
- "iscsi"
- "fc"
description: "Specify storage protocol for HPE backend connectivity."
group: "HPE StorageClass and volume settings"
- variable: storageClass.create
label: "Create a StorageClass"
type: boolean
default: true
required: true
description: "If specified as 'true', a StorageClass named 'hpe-standard' will be created with the HPE Volume Driver for Kubernetes FlexVolume Plugin as provisioner."
group: "HPE StorageClass and volume settings"
- variable: storageClass.defaultClass
label: "Mark StorageClass 'hpe-standard' as 'default'."
type: boolean
default: false
description: "If specified as 'true', the 'hpe-standard' StorageClass will be annotated as 'default'. This option is ignored if 'Create a StorageClass' is set to 'false'."
group: "HPE StorageClass and volume settings"
- variable: cv.config.existingCloudSubnet
show_if: "pluginType=cv"
label: "Cloud subnet"
type: string
default: ""
required: true
description: "Cloud subnet of the cluster for connection provisioning"
group: "Cloud instance settings"
- variable: cv.config.privateCloud
show_if: "pluginType=cv"
label: "Virtual private cloud"
type: string
required: true
description: "Virtual private cloud of the cluster"
group: "Cloud instance settings"
- variable: cv.config.region
show_if: "pluginType=cv"
label: "Public cloud region"
type: string
required: true
description: "Public cloud provider region in which cluster resides"
group: "Cloud instance settings"
- variable: cv.config.cloudComputeProvider
show_if: "pluginType=cv"
label: "Public cloud provider"
type: enum
default: "Amazon AWS"
options:
- "Amazon AWS"
- "Microsoft Azure"
description: "Public cloud provider name"
group: "Cloud instance settings"
- variable: cv.config.privateCloudResourceGroup
show_if: "cv.config.cloudComputeProvider=Microsoft Azure"
label: "Azure Resource Group"
type: string
required: true
description: "Azure resource group for the cluster"
group: "Cloud instance settings"
- variable: cv.config.volumeType
show_if: "pluginType=cv"
label: "Volume type"
type: enum
default: "PF"
options:
- "PF"
- "GPF"
description: "HPE Cloud Volume type"
group: "HPE Cloud Volumes settings"
- variable: cv.config.encryption
show_if: "pluginType=cv"
label: "Volume Encryption"
type: boolean
default: true
required: true
description: "Encryption for HPE Cloud Volume"
group: "HPE Cloud Volumes settings"
- variable: cv.config.protectionTemplate
show_if: "pluginType=cv"
label: "Protection template"
type: enum
default: "twicedaily:4"
options:
- "daily:3"
- "daily:7"
- "daily:14"
- "hourly:6"
- "hourly:12"
- "hourly:24"
- "twicedaily:4"
- "twicedaily:8"
- "twicedaily:14"
- "weekly:2"
- "weekly:4"
- "weekly:8"
- "monthly:3"
- "monthly:6"
- "monthly:12"
- "none"
description: "Protection Template"
group: "HPE Cloud Volumes settings"
- variable: cv.config.perfPolicy
show_if: "pluginType=cv"
label: "Performance policy"
type: enum
default: "Other"
options:
- "Other"
- "Exchange"
- "Oracle"
- "SharePoint"
- "SQL"
- "Windows File Server"
description: "Performance policy"
group: "HPE Cloud Volumes settings"
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "hpe-flexvolume-driver.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "hpe-flexvolume-driver.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "hpe-flexvolume-driver.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: hpe-config
namespace: kube-system
data:
volume-driver.json: |-
{{- if eq .Values.pluginType "nimble"}}
{
"global": {},
"defaults": {
"limitIOPS": {{ .Values.nimble.config.limitIOPS | quote }},
"limitMBPS": {{ .Values.nimble.config.limitMBPS | quote }},
"perfPolicy": {{ .Values.nimble.config.perfPolicy | quote }}
},
"overrides": {}
}
{{- else if eq .Values.pluginType "cv"}}
{
"global": {
"snapPrefix": {{ .Values.cv.config.snapPrefix | quote }},
"automatedConnection": {{ .Values.cv.config.automatedConnection }},
"initiators": [{{- join "," .Values.cv.config.initiators }}],
"automatedConnection": {{ .Values.cv.config.automatedConnection }},
"existingCloudSubnet": {{ .Values.cv.config.existingCloudSubnet | quote }},
"region": {{ .Values.cv.config.region | quote }},
"privateCloud": {{ .Values.cv.config.privateCloud | quote }},
{{- if and .Values.cv.config.privateCloudResourceGroup (ne .Values.cv.config.privateCloudResourceGroup "") }}
"privateCloudResourceGroup": {{ .Values.cv.config.privateCloudResourceGroup | quote }},
{{- end }}
"cloudComputeProvider": {{ .Values.cv.config.cloudComputeProvider | quote }}
},
"defaults": {
"perfPolicy": {{ .Values.cv.config.perfPolicy | quote }},
"limitIOPS": {{ .Values.cv.config.limitIOPS | quote }},
"volumeType": {{ .Values.cv.config.volumeType | quote }},
"encryption": {{ .Values.cv.config.encryption }},
"protectionTemplate": {{ .Values.cv.config.protectionTemplate | quote }},
"destroyOnRm": {{ .Values.cv.config.destroyOnRm }}
},
"overrides": {}
}
{{- else }}
{
"global": {},
"defaults": {},
"overrides": {}
}
{{- end }}
{{- if eq .Values.flavor "rke"}}
{{ .Values.pluginType }}.json: |-
{
"dockerVolumePluginSocketPath": "/host/etc/hpe-storage/{{ .Values.pluginType }}.sock"
}
{{- end }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: hpe-dynamic-provisioner-role
namespace: kube-system
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: hpe-dynamic-provisioner-binding
subjects:
- kind: ServiceAccount
name: hpe-flexvolume-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: hpe-dynamic-provisioner-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: hpe-flexvolume-sa
namespace: kube-system
\ No newline at end of file
#### HPE Dynamic Provisioner ###
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hpe-dynamic-provisioner
namespace: kube-system
labels:
app: hpe-dynamic-provisioner
spec:
selector:
matchLabels:
daemon: hpe-dynamic-provisioner-daemon
strategy:
type: RollingUpdate
template:
metadata:
labels:
daemon: hpe-dynamic-provisioner-daemon
name: hpe-dynamic-provisioner
spec:
priorityClassName: system-cluster-critical
restartPolicy: Always
serviceAccountName: hpe-flexvolume-sa
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
-
image: {{ .Values.dynamicProvisionerImage}}: {{- .Values.dynamicProvisionerTag}}
imagePullPolicy: Always
name: hpe-dynamic-provisioner
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
volumeMounts:
- name: k8s
mountPath: /etc/kubernetes
- name: flexvolumedriver
mountPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
- name: varlog
mountPath: /var/log
- name: hpeconfig
mountPath: /etc/hpe-storage
{{- if eq .Values.flavor "rancher"}}
- name: hpeconfig
mountPath: /host/etc/hpe-storage
{{- end }}
securityContext:
privileged: true
volumes:
- name: k8s
hostPath:
path: /etc/kubernetes
- name: flexvolumedriver
hostPath:
{{- $flavor := .Values.flavor -}}
{{- range .Values.flexVolumeExec }}
{{- if eq .name $flavor }}
path: {{ .value }}
{{- end }}
{{- end }}
- name: hpeconfig
hostPath:
path: /etc/hpe-storage
- name: varlog
hostPath:
path: /var/log
#### Flexvolume Driver ###
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: hpe-flexvolume-driver
namespace: kube-system
labels:
k8s-app: hpe-flexvolume-driver
spec:
selector:
matchLabels:
name: hpe-flexvolume-driver
template:
metadata:
labels:
name: hpe-flexvolume-driver
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: hpe-flexvolume-sa
containers:
- name: flexvolume
image: {{ .Values.flexVolumeDriverImage}}: {{- .Values.flexVolumeDriverTag}}
imagePullPolicy: "Always"
lifecycle:
preStop:
# create empty file to let plugin signal handler to perform cleanup of config/cert/dory files
exec:
command: [ "/bin/sh", "-c", "touch /etc/hpe-storage/remove" ]
{{- if eq .Values.flavor "rke"}}
postStart:
exec:
command: [ "/bin/bash", "-c",
"while [[ ! -d /var/lib/kubelet/volumeplugins/hpe.com~{{ .Values.pluginType }} ]] || [[ ! -f /etc/hpe-storage/{{ .Values.pluginType }}.json ]]; do sleep 1; done; cp -a /etc/hpe-storage/{{ .Values.pluginType }}.json /var/lib/kubelet/volumeplugins/hpe.com~{{ .Values.pluginType }}/{{ .Values.pluginType }}.json" ]
{{- end }}
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
- name: FLAVOR
value: {{ .Values.flavor }}
- name: PROVIDER_IP
valueFrom:
secretKeyRef:
name: hpe-secret
key: backend
- name: PROVIDER_USERNAME
valueFrom:
secretKeyRef:
name: hpe-secret
key: username
- name: PROVIDER_PASSWORD
valueFrom:
secretKeyRef:
name: hpe-secret
key: password
- name: PROTOCOL
valueFrom:
secretKeyRef:
name: hpe-secret
key: protocol
{{- if eq .Values.pluginType "cv"}}
- name: PROVIDER_PORT
valueFrom:
secretKeyRef:
name: hpe-secret
key: servicePort
- name: PROVIDER_SERVICE
valueFrom:
secretKeyRef:
name: hpe-secret
key: serviceName
{{- end }}
- name: SCOPE
value: global
- name: PLUGIN_TYPE
value: {{ .Values.pluginType }}
volumeMounts:
- name: pluginmountdir
mountPath: /var/lib/kubelet
mountPropagation: Bidirectional
- name: bindmountdir
mountPath: {{ .Values.podsMountDir }}
mountPropagation: Bidirectional
- name: legacymounts
mountPath: /opt/nimble
mountPropagation: Bidirectional
- name: dev
mountPath: /dev
- name: libmodules
mountPath: /lib/modules
- name: var-log
mountPath: /var/log
- name: var-lib-iscsi
mountPath: /var/lib/iscsi
- name: exec
mountPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
- name: runlock
mountPath: /run/lock
- name: etc-iscsi
mountPath: /etc/iscsi
- name: etc-multipath
mountPath: /etc/multipath
{{- if ne .Values.flavor "rke"}}
- name: etc-multipath-conf
mountPath: /etc/multipath.conf
{{- end }}
- name: etc-redhat-release
mountPath: /etc/redhat-release
- name: etc-os-release
mountPath: /etc/os-release
- name: etc-hpe-storage-dir
mountPath: /etc/hpe-storage
{{- if eq .Values.flavor "rke"}}
- name: etc-hpe-storage-dir
mountPath: /host/etc/hpe-storage
{{- end }}
- name: sys
mountPath: /sys
- name: iscsiadm
mountPath: /sbin/iscsiadm
- name: config-file
mountPath: /etc/hpe-storage/volume-driver.json
subPath: volume-driver.json
{{- if eq .Values.flavor "rke"}}
- name: config-file
mountPath: /etc/hpe-storage/{{ .Values.pluginType }}.json
subPath: {{ .Values.pluginType }}.json
{{- end }}
- name: runsystemd
mountPath: /run/systemd
- name: libsystemd
mountPath: /lib/systemd/system
- name: usrlocal
mountPath: /usr_local
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
volumes:
- name: pluginmountdir
hostPath:
path: /var/lib/kubelet
- name: bindmountdir
hostPath:
path: {{ .Values.podsMountDir }}
# required to handle legacy mounts from NLT based plugin. Remove this for CoreOS
- name: legacymounts
hostPath:
path: /opt/nimble/
- name: dev
hostPath:
path: /dev
- name: libmodules
hostPath:
path: /lib/modules
- name: var-log
hostPath:
path: /var/log
- name: var-lib-iscsi
hostPath:
path: /var/lib/iscsi/
- name: exec
hostPath:
{{- $flavor := .Values.flavor -}}
{{- range .Values.flexVolumeExec }}
{{- if eq .name $flavor }}
path: {{ .value }}
{{- end }}
{{- end }}
- name: runlock
hostPath:
path: /run/lock
- name: etc-iscsi
hostPath:
path: /etc/iscsi/
- name: etc-multipath
hostPath:
path: /etc/multipath/
{{- if ne .Values.flavor "rke"}}
- name: etc-multipath-conf
hostPath:
path: /etc/multipath.conf
type: FileOrCreate
{{- end }}
- name: etc-redhat-release
hostPath:
path: /etc/redhat-release
type: FileOrCreate
- name: etc-os-release
hostPath:
path: /etc/os-release
type: FileOrCreate
- name: etc-hpe-storage-dir
hostPath:
path: /etc/hpe-storage/
- name: sys
hostPath:
path: /sys
- name: iscsiadm
hostPath:
path: /sbin/iscsiadm
type: FileOrCreate
- name: config-file
configMap:
name: hpe-config
- name: runsystemd
hostPath:
path: /run/systemd
- name: libsystemd
hostPath:
path: /lib/systemd/system
- name: usrlocal
hostPath:
path: /usr
---
apiVersion: v1
kind: Secret
metadata:
name: hpe-secret
namespace: kube-system
stringData:
username: {{ .Values.username }}
password: {{ .Values.password }}
{{- if eq .Values.pluginType "cv"}}
backend: {{ .Values.backend }}
servicePort: {{ .Values.servicePort | quote }}
serviceName: {{ .Values.serviceName }}
protocol: "iscsi"
{{- else }}
backend: {{ .Values.backend }}
protocol: {{ .Values.protocol }}
{{- end }}
{{- if eq .Values.pluginType "cv"}}
# Configuration to deploy the HPE Nimble Storage Container Provider service
#
# example usage: kubectl create -f <this_file>
---
#######################################
############ CP Service ############
#######################################
kind: Service
apiVersion: v1
metadata:
name: {{ .Values.serviceName }}
namespace: kube-system
labels:
app: {{ .Values.serviceName }}
spec:
ports:
- port: {{ .Values.servicePort }}
protocol: TCP
selector:
app: cv-cp
---
##########################################
############ CP Deployment ############
##########################################
kind: Deployment
apiVersion: apps/v1
metadata:
name: cv-cp
namespace: kube-system
spec:
selector:
matchLabels:
app: cv-cp
replicas: 1
template:
metadata:
labels:
app: cv-cp
spec:
priorityClassName: system-cluster-critical
containers:
- name: cv-cp
image: {{ .Values.containerProviderImage}}: {{- .Values.containerProviderTag}}
imagePullPolicy: Always
env:
- name: CLOUDVOLUMES_PORTAL_SERVER
value: {{ .Values.backend }}
- name: CLOUDVOLUMES_PORT
value: {{ .Values.servicePort | quote }}
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
ports:
- containerPort: {{ .Values.servicePort }}
volumeMounts:
- name: log-dir
mountPath: /var/log
volumes:
- name: log-dir
hostPath:
path: /var/log
{{- end }}
apiVersion: batch/v1
kind: Job
metadata:
name: "{{.Release.Name}}"
labels:
app.kubernetes.io/managed-by: {{.Release.Service | quote}}
app.kubernetes.io/instance: {{.Release.Name | quote}}
app.kubernetes.io/version: {{.Chart.AppVersion | quote}}
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: "{{.Release.Name}}"
labels:
app.kubernetes.io/managed-by: {{.Release.Service | quote }}
app.kubernetes.io/instance: {{.Release.Name | quote }}
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
spec:
restartPolicy: Never
containers:
- name: post-install-job
image: "alpine:3.3"
command: ["/bin/sleep","{{default "10" .Values.serviceWaitTime}}"]
{{ if .Values.storageClass.create -}}
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ .Values.storageClass.name }}
labels:
plugin: {{ .Release.Name }}
{{- if .Values.storageClass.defaultClass }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
provisioner: hpe.com/{{ .Values.pluginType }}
parameters:
description: {{ .Values.volumeDescription }}
{{- end }}
# Default values for hpe-flexvolume-driver
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# doryd image
dynamicProvisionerTag: v3.1.0
dynamicProvisionerImage: store/hpestorage/k8s-dynamic-provisioner
# flexvolume plugin image
flexVolumeDriverTag: v3.1.0
flexVolumeDriverImage: store/hpestorage/flexvolume-driver
# container-provider image
containerProviderTag: v3.1.0
containerProviderImage: store/hpestorage/cv-cp
# parameters
backend: 192.168.1.1
username: admin
password: admin
protocol: iscsi
servicePort: "8080"
serviceName: cv-cp-svc
# storage class parameters
fsType: xfs
volumeDescription: "Volume created by HPE Volume Driver for Kubernetes FlexVolume Plugin"
# service parameters
# wait seconds for doryd/flexvolume node plugins to start
serviceWaitTime: "10"
# flavor
flavor: k8s
# platform for which plugin is being deployed.i.e nimble or cv
pluginType: nimble
# bindMountPath where kubelet bindmounts volume to pod namespace
podsMountDir: /var/lib/kubelet/pods
# volumePluginDir volume plugin directory where kubelet watches for flexvolume plugin
flexVolumeExec:
- name: eks
value: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
- name: k8s
value: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
- name: ocp
value: /etc/kubernetes/kubelet-plugins/volume/exec
- name: gkeop
value: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
- name: gke
value: /home/kubernetes/flexvolume
- name: aks
value: /etc/kubernetes/volumeplugins
- name: rke
value: /var/lib/kubelet/volumeplugins
# log level for flexvolume driver and dynamic provisioner
logLevel: info
## For creating the StorageClass automatically:
storageClass:
create: true
## Set StorageClass as the default StorageClass
## Ignored if storageClass.create is false
defaultClass: false
## Set a StorageClass name
## Ignored if storageClass.create is false
name: hpe-standard
nimble:
config:
limitIOPS: "-1"
limitMBPS: "-1"
perfPolicy: DockerDefault
cv:
config:
snapPrefix: BaseFor
automatedConnection: true
existingCloudSubnet: 10.1.0.0/24
region: us-east-1
privateCloud: vpc-data
cloudComputeProvider: "Amazon AWS"
perfPolicy: Other
volumeType: PF
encryption: true
protectionTemplate: twicedaily:4
destroyOnRm: true
limitIOPS: "1000"
# In case of multiple initiators, add one per line and escape double quotes as below
initiators:
- '"eth0"'
privateCloudResourceGroup: ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment