Skip to content

Commit

Permalink
Update K8up to v2.7.1 and Helm chart to 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Jul 19, 2023
1 parent 3c34ee9 commit 6bc946a
Show file tree
Hide file tree
Showing 9 changed files with 218 additions and 102 deletions.
4 changes: 2 additions & 2 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ parameters:
charts:
k8up:
source: https://k8up-io.github.io/k8up
version: 3.0.2
version: 4.3.0

images:
k8up:
registry: ghcr.io
repository: k8up-io/k8up
tag: v2.5.2
tag: v2.7.1
pullPolicy: IfNotPresent

helmReleaseName: k8up
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade,post-delete
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: '1'
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-4.3.0
name: cleanup-service-account
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade,post-delete
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: '2'
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-4.3.0
name: k8up-cleanup-roles
namespace: syn-backup-k8up
rules:
- apiGroups:
- ''
resources:
- namespaces
verbs:
- get
- list
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade,post-delete
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: '3'
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-4.3.0
name: cleanup-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: k8up-cleanup-roles
subjects:
- kind: ServiceAccount
name: cleanup-service-account
namespace: syn-backup-k8up
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade,post-delete
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: '4'
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-4.3.0
name: k8up-cleanup
spec:
template:
metadata:
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/name: k8up
name: k8up
spec:
containers:
- args:
- |
#!/bin/bash
NAMESPACES=$(kubectl get namespace -ojson | jq -r '.items[].metadata.name')
for ns in $NAMESPACES
do
kubectl -n "$ns" delete rolebinding pod-executor-namespaced --ignore-not-found=true
kubectl -n "$ns" delete role pod-executor --ignore-not-found=true
done
command:
- sh
- -c
image: bitnami/kubectl:latest
name: k8up-cleanup
restartPolicy: Never
serviceAccountName: cleanup-service-account
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-3.0.2
helm.sh/chart: k8up-4.3.0
name: k8up
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-3.0.2
helm.sh/chart: k8up-4.3.0
name: k8up
spec:
replicas: 1
Expand All @@ -24,7 +24,7 @@ spec:
- operator
env:
- name: BACKUP_IMAGE
value: ghcr.io/k8up-io/k8up:v2.5.2
value: ghcr.io/k8up-io/k8up:v2.7.1
- name: TZ
value: Etc/UTC
- name: BACKUP_ENABLE_LEADER_ELECTION
Expand All @@ -41,7 +41,7 @@ spec:
value: k8up.io/backupcommand
- name: BACKUP_BACKOFFLIMIT
value: '2'
image: ghcr.io/k8up-io/k8up:v2.5.2
image: ghcr.io/k8up-io/k8up:v2.7.1
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-4.3.0
name: k8up-executor
rules:
- apiGroups:
- ''
resources:
- pods
verbs:
- get
- list
- apiGroups:
- ''
resources:
- pods/exec
verbs:
- create
- apiGroups:
- k8up.io
resources:
- snapshots
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-3.0.2
helm.sh/chart: k8up-4.3.0
name: k8up-manager
rules:
- apiGroups:
Expand All @@ -32,15 +32,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- batch
resources:
- jobs/finalizers
- jobs/status
verbs:
- get
- patch
- update
- apiGroups:
- coordination.k8s.io
resources:
Expand Down Expand Up @@ -68,15 +59,19 @@ rules:
- apiGroups:
- ''
resources:
- pods
- persistentvolumes
verbs:
- '*'
- get
- list
- watch
- apiGroups:
- ''
resources:
- pods/exec
- pods
verbs:
- '*'
- get
- list
- watch
- apiGroups:
- ''
resources:
Expand All @@ -86,6 +81,7 @@ rules:
- delete
- get
- list
- watch
- apiGroups:
- k8up.io
resources:
Expand Down Expand Up @@ -251,13 +247,43 @@ rules:
- get
- patch
- update
- apiGroups:
- k8up.io
resources:
- snapshots
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- k8up.io
resources:
- snapshots/finalizers
- snapshots/status
verbs:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resourceNames:
- k8up-executor
resources:
- clusterroles
verbs:
- bind
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- create
- delete
- get
- list
- update
- watch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-3.0.2
helm.sh/chart: k8up-4.3.0
name: k8up-metrics
spec:
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
app.kubernetes.io/instance: k8up
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: k8up
helm.sh/chart: k8up-3.0.2
helm.sh/chart: k8up-4.3.0
name: k8up
Loading

0 comments on commit 6bc946a

Please sign in to comment.