This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
NickrenREN
committed
Dec 26, 2017
1 parent
32b191a
commit e4974b6
Showing
4 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
local-volume/provisioner/deployment/kubernetes/monitor/admin_account.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,33 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: local-storage-admin | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: local-storage-provisioner-pv-binding | ||
namespace: default | ||
subjects: | ||
- kind: ServiceAccount | ||
name: local-storage-admin | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: system:persistent-volume-monitor | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: local-storage-provisioner-node-binding | ||
namespace: default | ||
subjects: | ||
- kind: ServiceAccount | ||
name: local-storage-admin | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: system:node | ||
apiGroup: rbac.authorization.k8s.io | ||
|
9 changes: 9 additions & 0 deletions
9
local-volume/provisioner/deployment/kubernetes/monitor/monitor-config.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,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: local-volume-config | ||
data: | ||
storageClassMap: | | ||
local-storage: | ||
hostDir: "/mnt/disks/vol" | ||
mountDir: "/local-disks" |
17 changes: 17 additions & 0 deletions
17
local-volume/provisioner/deployment/kubernetes/monitor/monitor_cluster_role.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,17 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: system:persistent-volume-monitor | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete", "update"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["watch", "create", "update", "patch"] |
42 changes: 42 additions & 0 deletions
42
local-volume/provisioner/deployment/kubernetes/monitor/provisioner-monitor-daemonset.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,42 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: local-volume-provisioner | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: local-volume-provisioner | ||
spec: | ||
containers: | ||
- name: provisioner | ||
image: "quay.io/external_storage/local-volume-provisioner:latest" | ||
args: | ||
- "-enable-monitor=true" | ||
imagePullPolicy: Always | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: discovery-vol | ||
mountPath: "/local-disks" | ||
- name: local-volume-config | ||
mountPath: "/etc/provisioner/config/" | ||
env: | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
# If you want provisioner to use a kubeconfig file to access API server, instead of the default | ||
# in-cluster config, then specify the following environment variable: | ||
# - name: KUBECONFIG | ||
# value: /path/to/kubeconfig | ||
|
||
volumes: | ||
- name: discovery-vol | ||
hostPath: | ||
path: "/mnt/disks/vol" | ||
- name: local-volume-config | ||
configMap: | ||
name: local-volume-config | ||
serviceAccount: local-storage-admin | ||
|