Commit 7e1423a0 authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Add kubernetes deploy files

parent ba08a15c
apiVersion: apps/v1
kind: Deployment
metadata:
name: local-provisioner
namespace: kube-system
labels:
app: local-provisioner
spec:
selector:
matchLabels:
app: local-provisioner
template:
metadata:
name: local-provisioner
labels:
app: local-provisioner
spec:
serviceAccountName: local-provisioner
containers:
- name: local-provisioner
image: docker.greenhost.net/openappstack/local-storage/provisioner:latest
imagePullPolicy: "Always"
volumeMounts:
- mountPath: "/var/lib/OpenAppStack/local-storage"
name: storage-directory
env:
- name: LOCAL_STORAGE_DIR
value: "/var/lib/OpenAppStack/local-storage"
volumes:
- name: storage-directory
hostPath:
path: "/var/lib/OpenAppStack/local-storage"
---
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: local
provisioner: openappstack/local-provisioner
parameters:
kind: ServiceAccount
apiVersion: v1
metadata:
name: local-provisioner
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: local-provisioner-runner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: run-local-provisioner
namespace: kube-system
subjects:
- kind: ServiceAccount
name: local-provisioner
namespace: kube-system
roleRef:
kind: ClusterRole
name: local-provisioner-runner
apiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: leader-locking-local-provisioner
namespace: kube-system
rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: leader-locking-local-provisioner
namespace: kube-system
subjects:
- kind: ServiceAccount
name: local-provisioner
namespace: kube-system
roleRef:
kind: Role
name: leader-locking-local-provisioner
apiGroup: rbac.authorization.k8s.io
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment