This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
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
1 parent
e9820e3
commit 14531b6
Showing
10 changed files
with
138 additions
and
445 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: hostpath-provisioner | ||
labels: | ||
k8s-app: hostpath-provisioner | ||
namespace: kube-system | ||
|
||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 0 | ||
|
||
selector: | ||
matchLabels: | ||
k8s-app: hostpath-provisioner | ||
|
||
template: | ||
metadata: | ||
labels: | ||
k8s-app: hostpath-provisioner | ||
|
||
spec: | ||
containers: | ||
- name: hostpath-provisioner | ||
image: mazdermind/hostpath-provisioner:latest | ||
env: | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
|
||
- name: PV_DIR | ||
value: /var/kubernetes | ||
|
||
# - name: PV_RECLAIM_POLICY | ||
# value: Retain | ||
|
||
volumeMounts: | ||
- name: pv-volume | ||
mountPath: /var/kubernetes | ||
|
||
volumes: | ||
- name: pv-volume | ||
hostPath: | ||
path: /var/kubernetes |
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,35 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: hostpath-provisioner | ||
rules: | ||
- 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"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: hostpath-provisioner | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: hostpath-provisioner | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: 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,7 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: hostpath | ||
annotations: | ||
storageclass.kubernetes.io/is-default-class: "true" | ||
provisioner: hostpath |
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,17 @@ | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: hostpath-test-pod | ||
spec: | ||
containers: | ||
- name: hostpath-test-container | ||
image: gcr.io/google_containers/busybox:1.24 | ||
command: ["/bin/sh", "-c", "while true; do date >> /mnt/dates; sleep 10; done"] | ||
volumeMounts: | ||
- name: hostpath-volume | ||
mountPath: "/mnt" | ||
restartPolicy: "Never" | ||
volumes: | ||
- name: hostpath-volume | ||
persistentVolumeClaim: | ||
claimName: hostpath-test-claim |
This file was deleted.
Oops, something went wrong.