forked from yunify/qingstor-csi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ubuntu:16.04 as base images which can run qbd
Signed-off-by: zhangmin <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,470 additions
and
5 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
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
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,31 @@ | ||
# +------------------------------------------------------------------------- | ||
# | 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. | ||
# +------------------------------------------------------------------------- | ||
|
||
FROM golang:1.12.7-alpine as builder | ||
WORKDIR /qingstor-csi | ||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=vendor -ldflags "-s -w" -o _output/neonsan-csi-driver ./cmd/neonsan | ||
|
||
FROM ubuntu:16.04 | ||
LABEL maintainers="Yunify" | ||
LABEL description="NeonSAN CSI plugin" | ||
# libcurl3 and libicu55 for qbd | ||
RUN apt-get update -y && \ | ||
apt-get install -y libcurl3 libicu55 | ||
COPY --from=builder /qingstor-csi/_output/neonsan-csi-driver /neonsan-csi-driver | ||
RUN chmod +x /neonsan-csi-driver && \ | ||
mkdir -p /var/log/neonsan-csi-driver | ||
ENTRYPOINT ["/neonsan-csi-driver"] |
161 changes: 161 additions & 0 deletions
161
deploy/neonsan/kubernetes/base-ubuntu/controller-deploy.yaml
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,161 @@ | ||
# 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: kube-system | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
role: controller | ||
template: | ||
metadata: | ||
labels: | ||
role: controller | ||
spec: | ||
serviceAccount: csi-neonsan-controller | ||
containers: | ||
- name: csi-provisioner | ||
image: csiplugin/csi-provisioner:v1.5.0 | ||
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=pvc" | ||
- "--v=5" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: csi-attacher | ||
image: csiplugin/csi-attacher:v2.1.1 | ||
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 | ||
- name: csi-snapshotter | ||
image: csiplugin/csi-snapshotter:v2.0.1 | ||
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 | ||
- name: csi-resizer | ||
image: csiplugin/csi-resizer:v0.4.0 | ||
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 | ||
- name: csi-neonsan | ||
image: csiplugin/csi-neonsan:v1.2.0-rc2 | ||
resources: | ||
limits: | ||
memory: "50Mi" | ||
cpu: "50m" | ||
requests: | ||
memory: "50Mi" | ||
cpu: "50m" | ||
args: | ||
- "--config=/etc/neonsan/qbd.conf" | ||
- "--drivername=neonsan.csi.qingstor.com" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
- "--maxvolume=100" | ||
- "--nodeid=$(NODE_ID)" | ||
- "--v=5" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix://csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: neonsan-config | ||
mountPath: /etc/neonsan | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: | ||
- name: neonsan-config | ||
hostPath: | ||
path: /etc/neonsan |
Oops, something went wrong.