apiVersion: v1
kind: ServiceAccount
metadata:
name: k8up
namespace: k8up
labels:
app: k8up
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- watch
- list
- create
- edit
- patch
- backup.appuio.ch
- '*'
- ''
- pods
- pods/exec
- persistentvolumeclaims
- events
- serviceaccounts
- batch
- jobs
- rbac.authorization.k8s.io
- rolebindings
- roles
apiVersion: rbac.authorization.k8s.io/v1
name: k8up-edit
# Add these permissions to the "admin" and "edit" default roles.
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
- "*"
name: k8up-view
# Add these permissions to the "view" default role.
rbac.authorization.k8s.io/aggregate-to-view: "true"
kind: ClusterRoleBinding
subjects:
- kind: ServiceAccount
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Service
name: k8up-metrics
spec:
ports:
- name: "8080"
port: 8080
protocol: TCP
targetPort: 8080
selector:
sessionAffinity: None
type: ClusterIP
apiVersion: apps/v1
kind: Deployment
replicas: 1
matchLabels:
template:
containers:
- name: k8up-operator
image: docker.io/vshn/k8up:v0.1.7
imagePullPolicy: Always
env:
- name: BACKUP_IMAGE
value: docker.io/vshn/wrestic:v0.1.8
- name: BACKUP_GLOBALACCESSKEYID
valueFrom:
secretKeyRef:
name: global-s3-credentials
key: access-key-id
- name: BACKUP_GLOBALSECRETACCESSKEY
key: access-key-secret
- name: BACKUP_GLOBALREPOPASSWORD
name: global-backup-secret
key: secret
- name: BACKUP_GLOBALS3ENDPOINT
value: http://10.42.42.2:9000
- name: BACKUP_GLOBALS3BUCKET
value: knurrli-k8up
- name: BACKUP_PROMURL
value: prometheus-pushgateway.monitoring.svc
- containerPort: 8080
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 0.5
memory: 0.5Gi
serviceAccountName: k8up