-
Notifications
You must be signed in to change notification settings - Fork 58
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 #60 from phillc/master
Update CSI components
- Loading branch information
Showing
35 changed files
with
1,056 additions
and
552 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,40 @@ | ||
##### Node Service Account, Roles, RoleBindings | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-node-sa | ||
namespace: kube-system | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: linode-csi-role | ||
namespace: kube-system | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["get", "list", "watch", "create", "update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: linode-csi-binding | ||
namespace: kube-system | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-node-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: linode-csi-role | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
##### Controller Service Account, Roles, Rolebindings | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-controller-sa | ||
namespace: kube-system |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...oy/kubernetes/04-csi-driver-instance.yaml → .../kubernetes/base/csi-driver-instance.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: csi.storage.k8s.io/v1alpha1 | ||
apiVersion: storage.k8s.io/v1beta1 | ||
kind: CSIDriver | ||
metadata: | ||
name: linodebs.csi.linode.com | ||
spec: | ||
attachRequired: true | ||
podInfoOnMountVersion: "v1" | ||
podInfoOnMount: true |
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
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,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../sidecars/external-provisioner | ||
- ../sidecars/external-attacher | ||
- ../sidecars/external-resizer | ||
- accounts-roles-bindings.yaml | ||
- csi-driver-instance.yaml | ||
- csi-storageclass.yaml | ||
- ss-csi-linode-controller.yaml | ||
- ds-csi-linode-node.yaml | ||
- cm-get-linode-id.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
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,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
images: | ||
- name: linode/linode-blockstorage-csi-driver | ||
newTag: canary |
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 @@ | ||
kustomization.yaml |
7 changes: 7 additions & 0 deletions
7
deploy/kubernetes/overlays/release/kustomization.yaml.template
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,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
images: | ||
- name: linode/linode-blockstorage-csi-driver | ||
newTag: ${CSI_VERSION} |
50 changes: 50 additions & 0 deletions
50
deploy/kubernetes/sidecars/external-attacher/kustomization.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,50 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- rbac.yaml | ||
namespace: kube-system | ||
patchesStrategicMerge: | ||
- |- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-attacher-role-cfg | ||
$patch: delete | ||
- |- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: external-attacher-cfg | ||
$patch: delete | ||
- |- | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-attacher | ||
$patch: delete | ||
patchesJson6902: | ||
- target: | ||
group: rbac.authorization.k8s.io | ||
version: v1 | ||
kind: ClusterRole | ||
name: external-attacher-runner | ||
patch: |- | ||
- op: replace | ||
path: /metadata/name | ||
value: external-attacher-role | ||
- target: | ||
group: rbac.authorization.k8s.io | ||
version: v1 | ||
kind: ClusterRoleBinding | ||
name: csi-attacher-role | ||
patch: |- | ||
- op: replace | ||
path: /metadata/name | ||
value: csi-controller-attacher-binding | ||
- op: replace | ||
path: /subjects/0/name | ||
value: csi-controller-sa | ||
- op: replace | ||
path: /subjects/0/namespace | ||
value: kube-system | ||
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,88 @@ | ||
# xref: https://raw.githubusercontent.com/kubernetes-csi/external-attacher/release-2.2/deploy/kubernetes/rbac.yaml | ||
|
||
# This YAML file contains all RBAC objects that are necessary to run external | ||
# CSI attacher. | ||
# | ||
# In production, each CSI driver deployment has to be customized: | ||
# - to avoid conflicts, use non-default namespace and different names | ||
# for non-namespaced entities like the ClusterRole | ||
# - decide whether the deployment replicates the external CSI | ||
# attacher, in which case leadership election must be enabled; | ||
# this influences the RBAC setup, see below | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-attacher | ||
# replace with non-default namespace name | ||
namespace: default | ||
|
||
--- | ||
# Attacher must be able to work with PVs, CSINodes and VolumeAttachments | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: external-attacher-runner | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "update", "patch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["volumeattachments"] | ||
verbs: ["get", "list", "watch", "update", "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"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-attacher-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-attacher | ||
# replace with non-default namespace name | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: external-attacher-runner | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
--- | ||
# Attacher must be able to work with configmaps or leases in the current namespace | ||
# if (and only if) leadership election is enabled | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
# replace with non-default namespace name | ||
namespace: default | ||
name: external-attacher-cfg | ||
rules: | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] | ||
|
||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-attacher-role-cfg | ||
# replace with non-default namespace name | ||
namespace: default | ||
subjects: | ||
- kind: ServiceAccount | ||
name: csi-attacher | ||
# replace with non-default namespace name | ||
namespace: default | ||
roleRef: | ||
kind: Role | ||
name: external-attacher-cfg | ||
apiGroup: rbac.authorization.k8s.io |
49 changes: 49 additions & 0 deletions
49
deploy/kubernetes/sidecars/external-provisioner/kustomization.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,49 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- rbac.yaml | ||
namespace: kube-system | ||
patchesStrategicMerge: | ||
- |- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: csi-provisioner-role-cfg | ||
$patch: delete | ||
- |- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: external-provisioner-cfg | ||
$patch: delete | ||
- |- | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-provisioner | ||
$patch: delete | ||
patchesJson6902: | ||
- target: | ||
group: rbac.authorization.k8s.io | ||
version: v1 | ||
kind: ClusterRole | ||
name: external-provisioner-runner | ||
patch: |- | ||
- op: replace | ||
path: /metadata/name | ||
value: external-provisioner-role | ||
- target: | ||
group: rbac.authorization.k8s.io | ||
version: v1 | ||
kind: ClusterRoleBinding | ||
name: csi-provisioner-role | ||
patch: |- | ||
- op: replace | ||
path: /metadata/name | ||
value: csi-controller-provisioner-binding | ||
- op: replace | ||
path: /subjects/0/name | ||
value: csi-controller-sa | ||
- op: replace | ||
path: /subjects/0/namespace | ||
value: kube-system |
Oops, something went wrong.