Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
update manifests and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed Jul 16, 2017
1 parent e9820e3 commit 14531b6
Showing 10 changed files with 138 additions and 445 deletions.
415 changes: 29 additions & 386 deletions README.md

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions class.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion hostpath-provisioner.go
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ import (

const (
resyncPeriod = 15 * time.Second
provisionerName = "example.com/hostpath"
provisionerName = "hostpath"
exponentialBackOffOnError = false
failedRetryThreshold = 5
leasePeriod = controller.DefaultLeaseDuration
45 changes: 45 additions & 0 deletions manifests/deployment.yaml
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
35 changes: 35 additions & 0 deletions manifests/rbac.yaml
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
7 changes: 7 additions & 0 deletions manifests/storageclass.yaml
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
7 changes: 4 additions & 3 deletions claim.yaml → manifests/test-claim.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: hostpath
annotations:
volume.beta.kubernetes.io/storage-class: "example-hostpath"
name: hostpath-test-claim
# annotations:
# volume.beta.kubernetes.io/storage-class: "hostpath"
spec:
storageClassName: "hostpath"
accessModes:
- ReadWriteMany
resources:
17 changes: 17 additions & 0 deletions manifests/test-pod.yaml
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
29 changes: 0 additions & 29 deletions pod.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions test-pod.yaml

This file was deleted.

0 comments on commit 14531b6

Please sign in to comment.