Skip to content

Commit

Permalink
helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
min-zh committed Apr 18, 2020
1 parent 49a4e5c commit 4bba5bd
Show file tree
Hide file tree
Showing 10 changed files with 1,316 additions and 0 deletions.
23 changes: 23 additions & 0 deletions helm/csi-neonsan/.helmignore
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/
29 changes: 29 additions & 0 deletions helm/csi-neonsan/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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.
apiVersion: v2

appVersion: 1.2.0
name: csi-neonsan
description: A Helm chart for AWS EFS CSI Driver
version: 1.2.0-canary
kubeVersion: ">=1.14.0-0"
home: https://github.com/yunify/qingstor-csi
sources:
- https://github.com/yunify/qingstor-csi
keywords:
- neonsan
- csi
maintainers:
- name: min-zh
icon: https://s3.qingcloud.com/files/2020/01/qing-stor-neon-san.png
164 changes: 164 additions & 0 deletions helm/csi-neonsan/templates/controller-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# 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:
role: "controller"
template:
metadata:
labels:
role: "controller"
spec:
serviceAccount: csi-neonsan-controller
containers:
- name: csi-neonsan
image: "{{ .Values.driver.repository }}:{{ .Values.driver.tag }}"
resources:
limits:
memory: "50Mi"
cpu: "50m"
requests:
memory: "50Mi"
cpu: "50m"
args:
- "--config=/etc/neonsan/{{ .Values.driver.config.file }}"
- "--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:
limits:
memory: "20Mi"
cpu: "20m"
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:
limits:
memory: "20Mi"
cpu: "20m"
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:
limits:
memory: "20Mi"
cpu: "20m"
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:
limits:
memory: "20Mi"
cpu: "20m"
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
hostPath:
path: /etc/neonsan
Loading

0 comments on commit 4bba5bd

Please sign in to comment.