2019-05-14 16:01:32 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall-service-account
|
2019-09-17 02:28:31 +00:00
|
|
|
namespace: default
|
2019-05-14 16:01:32 +00:00
|
|
|
---
|
2019-09-21 21:39:49 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2019-05-14 16:01:32 +00:00
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall-role
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- apiextensions.k8s.io
|
|
|
|
resources:
|
|
|
|
- customresourcedefinitions
|
|
|
|
verbs:
|
|
|
|
- "*"
|
|
|
|
- apiGroups: [""]
|
2019-10-08 00:20:55 +00:00
|
|
|
resources: ["pods", "persistentvolumes", "persistentvolumeclaims", "nodes"]
|
2019-05-14 16:01:32 +00:00
|
|
|
verbs: ["*"]
|
|
|
|
- apiGroups: ["apps"]
|
|
|
|
resources: ["daemonsets", "statefulsets", "deployments"]
|
|
|
|
verbs: ["*"]
|
|
|
|
- apiGroups: ["batch"]
|
|
|
|
resources: ["jobs", "cronjobs"]
|
|
|
|
verbs: ["*"]
|
2019-11-08 06:37:50 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["csidrivers"]
|
|
|
|
verbs: ["*"]
|
|
|
|
- apiGroups: ["longhorn.io"]
|
2019-09-17 02:28:31 +00:00
|
|
|
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
|
2019-05-14 16:01:32 +00:00
|
|
|
verbs: ["*"]
|
|
|
|
---
|
2019-09-21 21:39:49 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2019-05-14 16:01:32 +00:00
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall-bind
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: longhorn-uninstall-role
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: longhorn-uninstall-service-account
|
|
|
|
namespace: default
|
|
|
|
---
|
2019-01-11 19:08:02 +00:00
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: Job
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall
|
2019-09-17 02:28:31 +00:00
|
|
|
namespace: default
|
2019-01-11 19:08:02 +00:00
|
|
|
spec:
|
|
|
|
activeDeadlineSeconds: 900
|
|
|
|
backoffLimit: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: longhorn-uninstall
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: longhorn-uninstall
|
2020-03-01 02:33:09 +00:00
|
|
|
image: longhornio/longhorn-manager:v0.8.0-rc1
|
2019-01-11 19:08:02 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
command:
|
|
|
|
- longhorn-manager
|
|
|
|
- uninstall
|
|
|
|
- --force
|
|
|
|
env:
|
2019-05-14 16:01:32 +00:00
|
|
|
- name: LONGHORN_NAMESPACE
|
|
|
|
value: longhorn-system
|
2019-01-11 19:08:02 +00:00
|
|
|
restartPolicy: OnFailure
|
2019-05-14 16:01:32 +00:00
|
|
|
serviceAccountName: longhorn-uninstall-service-account
|