Add mayastor

This commit is contained in:
Daniel Flanagan 2022-07-17 14:53:28 -05:00
parent 4574c70879
commit 1d94c3c8b7
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
9 changed files with 26 additions and 109 deletions

View file

@ -0,0 +1,21 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mayastor
resources:
- namespace.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/operator-rbac.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/mayastorpoolcrd.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/nats-deployment.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/storage/localpv.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/statefulset.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/svc.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/svc-headless.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/csi-daemonset.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/core-agents-deployment.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/rest-deployment.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/rest-service.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/csi-deployment.yaml
- https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/msp-deployment.yaml
- https://raw.githubusercontent.com/openebs/mayastor/master/deploy/mayastor-daemonset.yaml

View file

@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: mayastor

View file

@ -1,4 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: local-storage-admin

View file

@ -1,24 +0,0 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: local-storage-provisioner-pv-binding
subjects:
- kind: ServiceAccount
name: local-storage-admin
roleRef:
kind: ClusterRole
name: system:persistent-volume-provisioner
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: local-storage-provisioner-node-binding
subjects:
- kind: ServiceAccount
name: local-storage-admin
roleRef:
kind: ClusterRole
name: local-storage-provisioner-node-clusterrole
apiGroup: rbac.authorization.k8s.io

View file

@ -1,8 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: local-storage-provisioner-node-clusterrole
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]

View file

@ -1,41 +0,0 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: local-volume-provisioner
labels:
app: local-volume-provisioner
spec:
selector:
matchLabels:
app: local-volume-provisioner
template:
metadata:
labels:
app: local-volume-provisioner
spec:
serviceAccountName: local-storage-admin
containers:
- image: "registry.k8s.io/sig-storage/local-volume-provisioner:v2.4.0"
imagePullPolicy: "Always"
name: provisioner
securityContext:
privileged: true
env:
- name: MY_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- mountPath: /etc/provisioner/config
name: provisioner-config
readOnly: true
- mountPath: /var/data/local-storage
name: local-storage
mountPropagation: "HostToContainer"
volumes:
- name: provisioner-config
configMap:
name: local-provisioner-config
- name: local-storage
hostPath:
path: /var/data/local-storage

View file

@ -1,11 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
resources:
- ./storage-class.yaml
- ./admin-sa.yaml
- ./cluster-role.yaml
- ./cluster-role-bindings.yaml
- ./local-provisioner-config-map.yaml
- ./daemonset.yaml

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: local-provisioner-config
data:
storageClassMap: |
local-storage:
hostDir: /var/data/local-storage
mountDir: /var/data/local-storage
blockCleanerCommand:
- "/scripts/shred.sh"
- "2"
volumeMode: Filesystem
fsType: ext4
namePattern: "*"

View file

@ -1,6 +0,0 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer