From 0c337acf8986b9f8e99976aca3660bd392177431 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Sat, 21 Dec 2019 23:45:07 +0100 Subject: [PATCH] benji: fix in waw2, run in waw3 This needed an upstream change to allow only some pools to be backed up, otherwise benji would crash when stubmling upon the first PVC from a pool that wasn't backed by the ceph cluster it was acting upon. Change-Id: I52bf163c16352cb59fdd3dbdd576145ce1dbac03 --- cluster/kube/cluster.jsonnet | 5 ++++- cluster/kube/lib/rook.libsonnet | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cluster/kube/cluster.jsonnet b/cluster/kube/cluster.jsonnet index 28c82fd9..9bbb2598 100644 --- a/cluster/kube/cluster.jsonnet +++ b/cluster/kube/cluster.jsonnet @@ -422,9 +422,12 @@ local Cluster(short, realm) = { ], }, benji:: { - metadataStorageClass: "waw-hdd-paranoid-3", + metadataStorageClass: "waw-hdd-redundant-3", encryptionPassword: std.split((importstr "../secrets/plain/k0-benji-encryption-password"), '\n')[0], pools: [ + "waw-hdd-redundant-3", + "waw-hdd-redundant-3-metadata", + "waw-hdd-yolo-3", ], s3Configuration: { awsAccessKeyId: "RPYZIROFXNLQVU2WJ4R3", diff --git a/cluster/kube/lib/rook.libsonnet b/cluster/kube/lib/rook.libsonnet index e594e3db..cadf9ee3 100644 --- a/cluster/kube/lib/rook.libsonnet +++ b/cluster/kube/lib/rook.libsonnet @@ -638,10 +638,10 @@ local policies = import "../../../kube/policies.libsonnet"; serviceAccountName: cluster.benji.sa.metadata.name, containers_: { benji: kube.Container(cluster.name("benji")) { - # TODO(q3k): switch back to upstream after pull/52 goes in. + # TODO(q3k): switch back to upstream after pull/65 goes in. # Currently this is being built from github.com/q3k/benji. - # https://github.com/elemental-lf/benji/pull/52 - image: "registry.k0.hswaw.net/q3k/benji-k8s:20190831-1351", + # https://github.com/elemental-lf/benji/pull/65 + image: "registry.k0.hswaw.net/q3k/benji-k8s:20191221-2336", volumeMounts_: { extrabins: { mountPath: "/usr/local/extrabins" }, monendpoints: { mountPath: "/etc/rook" }, @@ -654,11 +654,11 @@ local policies = import "../../../kube/policies.libsonnet"; command: [ "bash", "-c", ||| bash /usr/local/extrabins/get-rook-creds.sh - benji-backup-pvc + benji-backup-pvc %s benji-command enforce latest3,hours48,days7,months12 benji-command cleanup bash /usr/local/extrabins/metabackup.sh - |||, + ||| % [std.join(" ", ["--pool-filter=%s" % [p] for p in cluster.spec.benji.pools])], ], }, },