-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from bizflycloud/feat/Structure_manifest_file
Structure manifest folder for each major version
- Loading branch information
Showing
64 changed files
with
11,571 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,9 @@ | ||
apiVersion: storage.k8s.io/v1beta1 | ||
kind: CSIDriver | ||
metadata: | ||
name: volume.csi.bizflycloud.vn | ||
spec: | ||
attachRequired: true | ||
podInfoOnMount: true | ||
volumeLifecycleModes: | ||
- Persistent |
File renamed without changes.
File renamed without changes.
File renamed without changes.
249 changes: 249 additions & 0 deletions
249
manifest/v1.21/plugin/csi-bizflycloud-controllerplugin-rbac.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,249 @@ | ||
# This YAML file contains RBAC API objects, | ||
# which are necessary to run csi controller plugin | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system | ||
|
||
--- | ||
# external-attacher | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-attacher-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["volumeattachments"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["volumeattachments/status"] | ||
verbs: ["patch"] | ||
# Secret permission is optional. | ||
# Enable it if you need value from secret. | ||
# For example, you have key `csi.storage.k8s.io/controller-publish-secret-name` in StorageClass.parameters | ||
# see https://kubernetes-csi.github.io/docs/secrets-and-credentials.html | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list"] | ||
# Attacher must be able to work with configmaps or leases in the current namespace | ||
# if (and only if) leadership election is enabled | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: csi-attacher-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: csi-attacher-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system | ||
|
||
--- | ||
# external-provisioner | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-provisioner-role | ||
rules: | ||
# The following rule should be uncommented for plugins that require secrets | ||
# for provisioning. | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
# Provisioner must be able to work with endpoints in current namespace | ||
# if (and only if) leadership election is enabled | ||
# Only one of the following rules for endpoints or leases is required based on | ||
# what is set for `--leader-election-type`. Endpoints are deprecated in favor of Leases. | ||
- apiGroups: [""] | ||
resources: ["endpoints"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-provisioner-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: csi-provisioner-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system | ||
|
||
--- | ||
# snapshot-controller | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: snapshot-controller-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["create", "get", "list", "watch", "update", "delete"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots/status"] | ||
verbs: ["update"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: snapshot-controller-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: snapshot-controller-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system | ||
|
||
--- | ||
# external-snapshotter | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-snapshotter-role | ||
rules: | ||
# Secret permission is optional. | ||
# Enable it if your driver needs secret. | ||
# For example, `csi.storage.k8s.io/snapshotter-secret-name` is set in VolumeSnapshotClass. | ||
# See https://kubernetes-csi.github.io/docs/secrets-and-credentials.html for more details. | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["create", "get", "list", "watch", "update", "delete"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents/status"] | ||
verbs: ["update"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-snapshotter-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: csi-snapshotter-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system | ||
|
||
--- | ||
# external-resizer | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-resizer-role | ||
rules: | ||
# The following rule should be uncommented for plugins that require secrets | ||
# for provisioning. | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims/status"] | ||
verbs: ["patch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-resizer-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: csi-resizer-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-bizflycloud-controller-sa | ||
namespace: kube-system |
115 changes: 115 additions & 0 deletions
115
manifest/v1.21/plugin/csi-bizflycloud-controllerplugin.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,115 @@ | ||
# This YAML file contains CSI Controller Plugin Sidecars | ||
# external-attacher, external-provisioner, external-snapshotter | ||
|
||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-bizflycloud-controller-service | ||
namespace: kube-system | ||
labels: | ||
app: csi-bizflycloud-controllerplugin | ||
spec: | ||
selector: | ||
app: csi-bizflycloud-controllerplugin | ||
ports: | ||
- name: dummy | ||
port: 12345 | ||
|
||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-bizflycloud-controllerplugin | ||
namespace: kube-system | ||
spec: | ||
serviceName: "csi-bizflycloud-controller-service" | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-bizflycloud-controllerplugin | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-bizflycloud-controllerplugin | ||
spec: | ||
serviceAccount: csi-bizflycloud-controller-sa | ||
containers: | ||
- name: csi-provisioner | ||
image: quay.io/k8scsi/csi-provisioner:v1.6.1 | ||
imagePullPolicy: "IfNotPresent" | ||
args: | ||
- "--csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock" | ||
- "--timeout=3m" | ||
- "--feature-gates=Topology=true" | ||
- "--extra-create-metadata=true" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
- name: csi-attacher | ||
image: quay.io/k8scsi/csi-attacher:v3.0.1 | ||
imagePullPolicy: "IfNotPresent" | ||
args: | ||
- "--csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock" | ||
- "--timeout=3m" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
- name: csi-resizer | ||
image: quay.io/k8scsi/csi-resizer:v1.0.1 | ||
imagePullPolicy: "IfNotPresent" | ||
args: | ||
- "--csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
- name: snapshot-controller | ||
image: quay.io/k8scsi/snapshot-controller:v3.0.1 | ||
imagePullPolicy: IfNotPresent | ||
- name: csi-snapshotter | ||
image: quay.io/k8scsi/csi-snapshotter:v3.0.1 | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- "--csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock" | ||
volumeMounts: | ||
- mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
name: socket-dir | ||
- name: bizflycloud-csi-plugin | ||
image: cr-hn-1.vccloud.vn/31ff9581861a4d0ea4df5e7dda0f665d/csi-bizflycloud:v0.3.0 | ||
imagePullPolicy: "Always" | ||
args : | ||
- /bin/csi-bizflycloud | ||
- "--endpoint=unix:///var/lib/csi/sockets/pluginproxy/csi.sock" | ||
- "--cluster=kubernetes" | ||
- "--is_control_plane=true" | ||
- "--auth_method=application_credential" | ||
- "--application_credential_id=$(BIZFLYCLOUD_APPLICATION_CREDENTIAL_ID)" | ||
- "--application_credential_secret=$(BIZFLYCLOUD_APPLICATION_CREDENTIAL_SECRET)" | ||
- "--tenant_id=$(BIZFLYCLOUD_TENANT_ID)" | ||
- "--region=$(BIZFLYCLOUD_REGION)" | ||
env: | ||
- name: BIZFLYCLOUD_APPLICATION_CREDENTIAL_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: bizflycloud | ||
key: application_credential_id | ||
- name: BIZFLYCLOUD_APPLICATION_CREDENTIAL_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: bizflycloud | ||
key: application_credential_secret | ||
- name: BIZFLYCLOUD_TENANT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: bizflycloud | ||
key: tenant_id | ||
- name: BIZFLYCLOUD_REGION | ||
valueFrom: | ||
secretKeyRef: | ||
name: bizflycloud | ||
key: region | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /var/lib/csi/sockets/pluginproxy/ | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: |
Oops, something went wrong.