install external snapshotter for volsync

This commit is contained in:
Tobias Brunner 2022-10-08 20:01:24 +02:00
parent 91e9c62a38
commit 801d42ec00
3 changed files with 1186 additions and 0 deletions

View file

@ -0,0 +1,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-snapshotter
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: system
source:
path: system/external-snapshotter
repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
targetRevision: HEAD
destination:
namespace: kube-system
server: https://kubernetes.default.svc
syncPolicy:
automated:
selfHeal: false

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,155 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: snapshot-controller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: snapshot-controller-leaderelection
namespace: kube-system
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- watch
- list
- delete
- update
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: snapshot-controller-runner
rules:
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- update
- apiGroups:
- ""
resources:
- events
verbs:
- list
- watch
- create
- update
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotclasses
verbs:
- get
- list
- watch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotcontents
verbs:
- create
- get
- list
- watch
- update
- delete
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotcontents/status
verbs:
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
verbs:
- get
- list
- watch
- update
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots/status
verbs:
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: snapshot-controller-leaderelection
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: snapshot-controller-leaderelection
subjects:
- kind: ServiceAccount
name: snapshot-controller
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: snapshot-controller-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: snapshot-controller-runner
subjects:
- kind: ServiceAccount
name: snapshot-controller
namespace: kube-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: snapshot-controller
namespace: kube-system
spec:
minReadySeconds: 15
replicas: 2
selector:
matchLabels:
app: snapshot-controller
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: snapshot-controller
spec:
containers:
- args:
- --v=5
- --leader-election=true
image: registry.k8s.io/sig-storage/snapshot-controller:v6.1.0
imagePullPolicy: IfNotPresent
name: snapshot-controller
serviceAccountName: snapshot-controller