forked from sodafoundation/nbp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSI OFFLINE volume expansion support (#8)
- Loading branch information
1 parent
cb712e2
commit 92ddee4
Showing
24 changed files
with
1,634 additions
and
758 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
124 changes: 124 additions & 0 deletions
124
csi/deploy/kubernetes/block/csi-resizer-opensdsplugin.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,124 @@ | ||
# This YAML file contains attacher & csi driver API objects, | ||
# which are necessary to run external csi resizer for opensds. | ||
|
||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-resizer-opensdsplugin-block | ||
labels: | ||
app: csi-resizer-opensdsplugin-block | ||
spec: | ||
selector: | ||
app: csi-resizer-opensdsplugin-block | ||
ports: | ||
- name: dummy | ||
port: 12345 | ||
|
||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-resizer-opensdsplugin-block | ||
spec: | ||
serviceName: "csi-resizer-opensdsplugin-block" | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-resizer-opensdsplugin-block | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-resizer-opensdsplugin-block | ||
spec: | ||
serviceAccount: csi-resizer-block | ||
containers: | ||
- name: csi-resizer | ||
image: quay.io/k8scsi/csi-resizer:v0.3.0 | ||
args: | ||
- "--csi-address=$(ADDRESS)" | ||
- "--csiTimeout=15s" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: opensds | ||
image: opensdsio/csiplugin-block:latest | ||
args : | ||
- "--csiEndpoint=$(CSI_ENDPOINT)" | ||
- "--opensdsEndpoint=$(OPENSDS_ENDPOINT)" | ||
- "--opensdsAuthStrategy=$(OPENSDS_AUTH_STRATEGY)" | ||
- "--v=8" | ||
env: | ||
- name: CSI_ENDPOINT | ||
value: unix://csi/csi.sock | ||
- name: OPENSDS_ENDPOINT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: opensdsendpoint | ||
- name: OPENSDS_AUTH_STRATEGY | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: opensdsauthstrategy | ||
- name: OS_AUTH_URL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: osauthurl | ||
- name: OS_USERNAME | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: osusername | ||
- name: PASSWORD_ENCRYPTER | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: passwordencrypter | ||
- name: OS_PASSWORD | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: ospassword | ||
- name: PASSWORD_ENCRYPTER | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: passwordencrypter | ||
- name: ENABLE_ENCRYPTED | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: enableEncrypted | ||
- name: OS_TENANT_NAME | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: ostenantname | ||
- name: OS_PROJECT_NAME | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: osprojectname | ||
- name: OS_USER_DOMAIN_ID | ||
valueFrom: | ||
configMapKeyRef: | ||
name: csi-configmap-opensdsplugin-block | ||
key: osuserdomainid | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
- name: certificate-path | ||
mountPath: /opt/opensds-security | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: | ||
- name: certificate-path | ||
hostPath: | ||
path: /opt/opensds-security | ||
type: DirectoryOrCreate |
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,60 @@ | ||
# This YAML file contains RBAC API objects, | ||
# which are necessary to run external csi resizer for opensds. | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-resizer-block | ||
|
||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: external-resizer-runner-block | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete", "patch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims/status"] | ||
verbs: ["update", "patch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses", "csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["endpoints"] | ||
verbs: ["get", "create", "update"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["create","get", "list", "watch","update", "delete"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots/status"] | ||
verbs: ["update"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["create","get", "list", "watch","update", "delete"] | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-resizer-role-block | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-resizer-block | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: external-resizer-runner-block | ||
apiGroup: rbac.authorization.k8s.io |
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
Oops, something went wrong.