-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f54c10
commit 5c151bf
Showing
18 changed files
with
1,774 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
appVersion: 1.2.1 | ||
description: A Helm chart for NeonIO | ||
home: https://github.com/yunify/qingstor-neonio | ||
icon: https://s3.qingcloud.com/files/2021/02/qing-stor-neon-san.png | ||
keywords: | ||
- neonio | ||
kubeVersion: '>=1.14.0-0' | ||
maintainers: | ||
- email: [email protected] | ||
name: Xingxiang Yang | ||
name: neonio | ||
sources: | ||
- https://github.com/yunify/qingstor-neonio | ||
version: 1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# csi-neonsan | ||
|
||
## TL;DR; | ||
|
||
```console | ||
helm install test/csi-neonsan | ||
``` | ||
|
||
## Prerequisite | ||
- **qbd** installed on each node | ||
- **qbd** modules (**qbd**&**qbd_tcp**&**qbd_rdma**) loaded | ||
|
||
|
||
## Installing | ||
|
||
To install the chart with the release name `csi-neonsan`: | ||
|
||
```console | ||
helm repo add test https://charts.kubesphere.io/test | ||
helm install test/csi-neonsan --name-template csi-neonsan --namespace kube-system | ||
``` | ||
|
||
The command deploys the csi-neonsan chart on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation. | ||
|
||
If node os is **centos**, `driver.node.repository`(default `csiplugin/csi-neonsan-ubuntu`) should be set `csiplugin/csi-neonsan-centos` | ||
```bash | ||
helm install test/csi-neonsan --name-template csi-neonsan --namespace kube-system --set driver.node.repository=csiplugin/csi-neonsan-centos | ||
``` | ||
|
||
## Uninstalling | ||
|
||
To uninstall/delete the `csi-neonsan` deployment: | ||
|
||
```console | ||
helm delete csi-neonsan --namespace kube-system | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the csi-neonsan chart and their default values. | ||
|
||
Parameter | Description | Default | ||
--- | --- | --- | ||
`driver.name` | Name of the CSI driver | `neonsan.csi.qingstor.com` | ||
`driver.repository` | Image of CSI plugin| `csiplugin/csi-neonsan` | ||
`driver.tag` | Tag of CSI plugin | `v1.2.0` | ||
`driver.pullPolicy` | Image pull policy of CSI plugin | `IfNotPresent` | ||
`driver.config` | Config of NeonSAN | `/etc/neonsan/qbd.conf` | ||
`driver.node.repository` | Image of node DaemonSet| `csiplugin/csi-neonsan-ubuntu` | ||
`driver.node.tag` | Tag of node DaemonSet | `v1.2.0` | ||
`driver.node.pullPolicy` | Config file name of NeonSAN | `qbd.conf` | ||
`provisioner.repository` | Image of csi-provisioner | `csiplugin/k8scsi/csi-provisioner` | ||
`provisioner.tag` | Tag of csi-provisioner | `v1.5.0` | ||
`provisioner.volumeNamePrefix` | Prefix of volume name created by the driver | `pvc` | ||
`attacher.repository` | Image of csi-attacher | `csiplugin/k8scsi/csi-attacher` | ||
`attacher.tag` | Tag of csi-attacher | `v2.1.1` | ||
`resizer.repository` | Image of csi-resizer | `csiplugin/k8scsi/csi-resizer` | ||
`resizere.tag` | Tag of csi-resizer | `v0.5.1` | ||
`snapshotter.repository` | Image of csi-snapshotter | `csiplugin/csi-snapshotter` | ||
`snapshotter.tag` | Tag of csi-snapshotter | `v2.0.1` | ||
`registar.repository` | Image of csi-node-driver-registrar| `csiplugin/csi-node-driver-registrar` | ||
`registar.tag` | Tag of csi-node-driver-registrar | `v1.2.0` | ||
`sc.enable` | Whether to enable this StorageClass | `true` | ||
`sc.isDefaultClass` | Whether to set this StorageClass as the default StorageClass | `false` | ||
`sc.name` | Name of storage class | `csi-neonsan` | ||
`sc.reclaimPolicy` | ReclaimPolicy parameter of storage class | `Delete` | ||
`sc.allowVolumeExpansion` | AllowVolumeExpansion parameter of storage class | `true` | ||
`sc.volumeBindingMode` | [VolumeBindingMode](https://github.com/yunify/qingcloud-csi/blob/master/docs/user-guide.md#topology-awareness) parameter of storage class | `WaitForFirstConsumer` | ||
`sc.fsType` | [FsType](https://github.com/yunify/qingcloud-csi/blob/master/docs/user-guide.md#fstype) parameter of storage class | `ext4` | ||
|
||
The following table lists the parameters of NeonSAN api in StorageClass's parameter. See NeonSAN api document for detail. | ||
|
||
Parameter | Type | Default | ||
--- | --- | --- | ||
`sc.pool_name`| string | `kube` | ||
`sc.rep_count`| int| `1` | ||
`sc.mrip` | string | | ||
`sc.mrport` | int | | ||
`sc.rpo` | int | | ||
`sc.encrypte` | string | | ||
`sc.key_name` | string | | ||
`sc.rg` | string | | ||
`sc.label` | string | | ||
`sc.policy` | string| | ||
`sc.dc` | string | ||
`sc.sample_volume` | string| | ||
`sc.mutex_group` | string | | ||
`sc.role` | string | | ||
`sc.min_rep_count` | int| | ||
`sc.max_bs` | int | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Copyright (C) 2018 Yunify, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this work except in compliance with the License. | ||
# You may obtain a copy of the License in the LICENSE file, or at: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-neonsan-controller | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-neonsan | ||
role: controller | ||
owner: yunify | ||
ver: {{ .Values.driver.tag }} | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-neonsan | ||
role: controller | ||
owner: yunify | ||
ver: {{ .Values.driver.tag }} | ||
spec: | ||
serviceAccount: csi-neonsan-controller | ||
initContainers: | ||
- name: csi-neonsan-init | ||
image: neonio/qbd-config-init:v1.0.1 | ||
imagePullPolicy: {{ .Values.driver.pullPlociy }} | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
volumeMounts: | ||
- name: neonsan-config | ||
mountPath: /etc/neonsan | ||
command: ['sh', '-c', "sh /init.sh"] | ||
containers: | ||
- name: csi-neonsan | ||
image: "{{ .Values.driver.repository }}:{{ .Values.driver.tag }}" | ||
resources: | ||
requests: | ||
memory: "50Mi" | ||
cpu: "50m" | ||
args: | ||
- "--config=/etc/neonsan/qbd.conf" | ||
- "--drivername={{ .Values.driver.name}}" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
- "--nodeid=$(NODE_ID)" | ||
- "--v=5" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix://csi/csi.sock | ||
imagePullPolicy: {{ .Values.driver.pullPlociy }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: neonsan-config | ||
mountPath: /etc/neonsan | ||
- name: csi-provisioner | ||
image: "{{ .Values.provisioner.repository }}:{{ .Values.provisioner.tag }}" | ||
resources: | ||
requests: | ||
memory: "20Mi" | ||
cpu: "20m" | ||
args: | ||
- "--csi-address=$(ADDRESS)" | ||
- "--enable-leader-election" | ||
- "--feature-gates=Topology=true" | ||
- "--leader-election-type=leases" | ||
- "--retry-interval-max=5m" | ||
- "--retry-interval-start=5s" | ||
- "--timeout=90s" | ||
- "--worker-threads=5" | ||
- "--volume-name-prefix={{ .Values.provisioner.volumeNamePrefix }}" | ||
- "--v=5" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: csi-attacher | ||
image: "{{ .Values.attacher.repository }}:{{ .Values.attacher.tag }}" | ||
resources: | ||
requests: | ||
memory: "20Mi" | ||
cpu: "20m" | ||
args: | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
- "--retry-interval-max=5m" | ||
- "--retry-interval-start=5s" | ||
- "--timeout=90s" | ||
- "--worker-threads=5" | ||
- "--v=5" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
- name: MY_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
{{- if semverCompare ">=1.15" .Capabilities.KubeVersion.GitVersion }} | ||
- name: csi-resizer | ||
image: "{{ .Values.resizer.repository }}:{{ .Values.resizer.tag }}" | ||
resources: | ||
requests: | ||
memory: "20Mi" | ||
cpu: "20m" | ||
args: | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
- "--v=5" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
{{- end }} | ||
{{- if semverCompare ">=1.17" .Capabilities.KubeVersion.GitVersion }} | ||
- name: csi-snapshotter | ||
image: "{{ .Values.snapshotter.repository }}:{{ .Values.snapshotter.tag }}" | ||
resources: | ||
requests: | ||
memory: "20Mi" | ||
cpu: "20m" | ||
args: | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election=false" | ||
- "--v=5" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
{{- end }} | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: | ||
- name: neonsan-config | ||
emptyDir: {} |
Oops, something went wrong.