From 0c50fe791ddd0b54ebd6c3cc6f6a746a5814bddb Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Tue, 16 Feb 2021 16:02:45 +0100 Subject: [PATCH 1/8] update to work with K8up 1.0+ --- .gitignore | 1 + CHANGELOG.md | 2 ++ class/backup-k8up.yml | 10 ++++++++++ class/defaults.yml | 10 ++++++---- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 68d6355..6426315 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ _archive/ _public/ .cache/ helmcharts/ +crds/ manifests/ doxygen/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 3887f57..8e3af12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Option to disable the component - Move alert definitions to parameters ([#18]) - Adjust K8upJobStuck alert configuration ([#10]) +- Upgrade K8up chart to v1.0 release ([#20]) [Unreleased]: https://github.com/projectsyn/component-backup-k8up/compare/v1.0.0...HEAD [v1.0.0]: https://github.com/projectsyn/component-backup-k8up/releases/tag/v1.0.0 @@ -29,3 +30,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#14]: https://github.com/projectsyn/component-backup-k8up/pull/14 [#18]: https://github.com/projectsyn/component-backup-k8up/pull/18 [#19]: https://github.com/projectsyn/component-backup-k8up/pull/19 +[#20]: https://github.com/projectsyn/component-backup-k8up/pull/20 \ No newline at end of file diff --git a/class/backup-k8up.yml b/class/backup-k8up.yml index 65a3604..2d69862 100644 --- a/class/backup-k8up.yml +++ b/class/backup-k8up.yml @@ -5,11 +5,19 @@ parameters: source: 'https://charts.appuio.ch/k8up-${backup_k8up:charts:k8up}.tgz' unpack: true output_path: dependencies/backup-k8up/helmcharts + - type: https + source: 'https://github.com/vshn/k8up/releases/download/v${backup_k8up:charts:k8up}/k8up-crd.yaml' + output_path: dependencies/backup-k8up/crds/${backup_k8up:charts:k8up}/02_k8up_crds.yaml compile: - input_paths: - backup-k8up/component/app.jsonnet input_type: jsonnet output_path: apps/ + - input_paths: + - dependencies/backup-k8up/crds/v${backup_k8up:charts:k8up}/ + output_path: backup-k8up + input_type: copy + output_type: yaml - output_path: backup-k8up/01_k8up_helmchart input_type: helm output_type: yaml @@ -17,10 +25,12 @@ parameters: - backup-k8up/helmcharts/k8up helm_values: image: + registry: ${backup_k8up:images:k8up:registry} repository: ${backup_k8up:images:k8up:image} tag: ${backup_k8up:images:k8up:tag} k8up: backupImage: + registry: ${backup_k8up:images:wrestic:registry} repository: ${backup_k8up:images:wrestic:image} tag: ${backup_k8up:images:wrestic:tag} envVars: diff --git a/class/defaults.yml b/class/defaults.yml index 1467cfd..a530d3e 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -76,11 +76,13 @@ parameters: labels: severity: warning charts: - k8up: 0.6.1 + k8up: 1.0.0 images: k8up: - image: quay.io/vshn/k8up - tag: 'v0.1.10@sha256:74ef61f26c85b4a6ab6b02761caefe6d59234db559f7ed6bb7430f345b7ac488' + registry: quay.io + image: vshn/k8up + tag: 'v1.0.0@sha256:444fdff25c401dd312116e8b2e4813d61ac6c88656b50c888dbc00f0d2f7ecd4' wrestic: - image: quay.io/vshn/wrestic + registry: quay.io + image: vshn/wrestic tag: 'v0.1.9@sha256:6b756ddb70e15977fc3d53a0468bcf6386d79d989768d48696167161f20e115e' From edd41449385e1a314c98d8bff97001a6510820d6 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Tue, 16 Feb 2021 16:05:46 +0100 Subject: [PATCH 2/8] update to k8up v1.0.1 --- class/defaults.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/defaults.yml b/class/defaults.yml index a530d3e..7d683c7 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -76,12 +76,12 @@ parameters: labels: severity: warning charts: - k8up: 1.0.0 + k8up: 1.0.1 images: k8up: registry: quay.io image: vshn/k8up - tag: 'v1.0.0@sha256:444fdff25c401dd312116e8b2e4813d61ac6c88656b50c888dbc00f0d2f7ecd4' + tag: 'v1.0.1@sha256:7c351aa03781fb4cab075b4754b1c47afd3ed1d4737a2ed60c67cb45a20373ca' wrestic: registry: quay.io image: vshn/wrestic From 752fd11e8e6b2d061bdb6f8135723e4953b5c787 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Tue, 16 Feb 2021 16:24:58 +0100 Subject: [PATCH 3/8] expose leader election and CRD Version selection --- class/backup-k8up.yml | 3 ++- class/defaults.yml | 2 ++ .../ROOT/pages/references/parameters.adoc | 22 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/class/backup-k8up.yml b/class/backup-k8up.yml index 2d69862..23ee945 100644 --- a/class/backup-k8up.yml +++ b/class/backup-k8up.yml @@ -6,7 +6,7 @@ parameters: unpack: true output_path: dependencies/backup-k8up/helmcharts - type: https - source: 'https://github.com/vshn/k8up/releases/download/v${backup_k8up:charts:k8up}/k8up-crd.yaml' + source: 'https://github.com/vshn/k8up/releases/download/v${backup_k8up:charts:k8up}/${backup_k8up:crd}' output_path: dependencies/backup-k8up/crds/${backup_k8up:charts:k8up}/02_k8up_crds.yaml compile: - input_paths: @@ -33,6 +33,7 @@ parameters: registry: ${backup_k8up:images:wrestic:registry} repository: ${backup_k8up:images:wrestic:image} tag: ${backup_k8up:images:wrestic:tag} + enableLeaderElection: ${backup_k8up:enableLeaderElection} envVars: - name: BACKUP_PROMURL value: '${backup_k8up:prometheus_push_gateway}' diff --git a/class/defaults.yml b/class/defaults.yml index 7d683c7..5d4e724 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -4,6 +4,8 @@ parameters: # TODO: Reevaluate the need for this once we can remove components # See: https://github.com/projectsyn/commodore/issues/71 enabled: true + enableLeaderElection: true + crd: "k8up-crd.yaml" # Use k8up-crd-legacy.yaml for K8s <= 1.15 (e.g. OpenShift 3.11): namespace: syn-backup global_backup_config: enabled: true diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 49fc990..fa43c98 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -2,6 +2,19 @@ The parent key for all of the following parameters is `backup_k8up`. +== `crd` + +[horizontal] +type:: string +default:: `k8up-crd.yaml` + +The name of the CRD yaml File. + +Use `k8up-crd.yaml` (default) for K8s >= 1.16 +Change to `k8up-crd-legacy.yaml` for K8s <= 1.15 (e.g. OpenShift 3.11) + +See https://github.com/appuio/charts/tree/master/k8up#handling-crds + == `enabled` [horizontal] @@ -13,6 +26,15 @@ Setting this to false, effectively disables the component from being deployed. NOTE: The manifests will still appear in the catalog, but without the ArgoCD app they won't get deployed. +== `enableLeaderElection` + +[horizontal] +type:: bool +default:: `true` + +Specifies whether leader election should be enabled. Disable this for K8s versions < 1.16 + + == `namespace` [horizontal] From 6729b65e83f2d150396e54d401f69af6eaf41e84 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 10 Mar 2021 09:46:42 +0100 Subject: [PATCH 4/8] Refactor to pass all Helm values to Chart --- CHANGELOG.md | 6 +- class/backup-k8up.yml | 65 ++--------------- class/defaults.yml | 70 +++++++++++++++---- .../ROOT/pages/references/parameters.adoc | 38 +++++----- 4 files changed, 82 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3af12..60549f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Option to disable the component - Move alert definitions to parameters ([#18]) - Adjust K8upJobStuck alert configuration ([#10]) -- Upgrade K8up chart to v1.0 release ([#20]) +- Upgrade K8up chart to v1.0.1 release with seperate CRD deployment([#20]) +- Expose all Helm values ([#20]) +- Removed `image` parameter, they are available via Helm values ([#20]) +- Removed `tz` parameter, its available with same default value set in Helm values ([#20]) + [Unreleased]: https://github.com/projectsyn/component-backup-k8up/compare/v1.0.0...HEAD [v1.0.0]: https://github.com/projectsyn/component-backup-k8up/releases/tag/v1.0.0 diff --git a/class/backup-k8up.yml b/class/backup-k8up.yml index 23ee945..455a25d 100644 --- a/class/backup-k8up.yml +++ b/class/backup-k8up.yml @@ -4,10 +4,10 @@ parameters: - type: https source: 'https://charts.appuio.ch/k8up-${backup_k8up:charts:k8up}.tgz' unpack: true - output_path: dependencies/backup-k8up/helmcharts + output_path: dependencies/backup-k8up/helmcharts/v${backup_k8up:charts:k8up} - type: https source: 'https://github.com/vshn/k8up/releases/download/v${backup_k8up:charts:k8up}/${backup_k8up:crd}' - output_path: dependencies/backup-k8up/crds/${backup_k8up:charts:k8up}/02_k8up_crds.yaml + output_path: dependencies/backup-k8up/crds/v${backup_k8up:charts:k8up}/02_k8up_crds.yaml compile: - input_paths: - backup-k8up/component/app.jsonnet @@ -22,65 +22,8 @@ parameters: input_type: helm output_type: yaml input_paths: - - backup-k8up/helmcharts/k8up - helm_values: - image: - registry: ${backup_k8up:images:k8up:registry} - repository: ${backup_k8up:images:k8up:image} - tag: ${backup_k8up:images:k8up:tag} - k8up: - backupImage: - registry: ${backup_k8up:images:wrestic:registry} - repository: ${backup_k8up:images:wrestic:image} - tag: ${backup_k8up:images:wrestic:tag} - enableLeaderElection: ${backup_k8up:enableLeaderElection} - envVars: - - name: BACKUP_PROMURL - value: '${backup_k8up:prometheus_push_gateway}' - - name: BACKUP_GLOBALACCESSKEYID - valueFrom: - secretKeyRef: - name: '${backup_k8up:global_backup_config:s3_credentials:secretname}' - key: '${backup_k8up:global_backup_config:s3_credentials:accesskeyname}' - - name: BACKUP_GLOBALSECRETACCESSKEY - valueFrom: - secretKeyRef: - name: '${backup_k8up:global_backup_config:s3_credentials:secretname}' - key: '${backup_k8up:global_backup_config:s3_credentials:secretkeyname}' - - name: BACKUP_GLOBALREPOPASSWORD - valueFrom: - secretKeyRef: - name: '${backup_k8up:global_backup_config:backup_secret:name}' - key: password - - name: BACKUP_GLOBALRESTORES3ACCESSKEYID - valueFrom: - secretKeyRef: - name: '${backup_k8up:global_backup_config:s3restore_credentials:secretname}' - key: '${backup_k8up:global_backup_config:s3restore_credentials:accesskeyname}' - - name: BACKUP_GLOBALRESTORES3SECRETACCESSKEY - valueFrom: - secretKeyRef: - name: '${backup_k8up:global_backup_config:s3restore_credentials:secretname}' - key: '${backup_k8up:global_backup_config:s3restore_credentials:secretkeyname}' - - name: BACKUP_ANNOTATION - value: '${backup_k8up:annotation}' - - name: BACKUP_BACKUPCOMMANDANNOTATION - value: '${backup_k8up:backupcommandannotation}' - - name: BACKUP_GLOBALKEEPJOBS - value: '${backup_k8up:global_backup_config:keepjobs}' - - name: BACKUP_GLOBALS3ENDPOINT - value: '${backup_k8up:global_backup_config:s3_endpoint}' - - name: BACKUP_GLOBALSTATSURL - value: '${backup_k8up:global_backup_config:stats_url}' - - name: BACKUP_BACKOFFLIMIT - value: '${backup_k8up:backofflimit}' - - name: BACKUP_GLOBALRESTORES3BUCKET - value: '${backup_k8up:global_backup_config:restore_bucket}' - - name: BACKUP_GLOBALRESTORES3ENDPOINT - value: '${backup_k8up:global_backup_config:restore_s3endpoint}' - - name: TZ - value: '${backup_k8up:tz}' - + - backup-k8up/helmcharts/v${backup_k8up:charts:k8up}/k8up + helm_values: ${backup_k8up:helmValues} helm_params: release_name: k8up namespace: '${backup_k8up:namespace}' diff --git a/class/defaults.yml b/class/defaults.yml index 5d4e724..cd74847 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -4,9 +4,65 @@ parameters: # TODO: Reevaluate the need for this once we can remove components # See: https://github.com/projectsyn/commodore/issues/71 enabled: true - enableLeaderElection: true + + charts: + k8up: 1.0.3 + + crd: "k8up-crd.yaml" # Use k8up-crd-legacy.yaml for K8s <= 1.15 (e.g. OpenShift 3.11): namespace: syn-backup + + helmValues: + replicaCount: 1 + k8up: + enableLeaderElection: true + timezone: "Europe/Zurich" + + envVars: + - name: BACKUP_PROMURL + value: '${backup_k8up:prometheus_push_gateway}' + - name: BACKUP_GLOBALACCESSKEYID + valueFrom: + secretKeyRef: + name: '${backup_k8up:global_backup_config:s3_credentials:secretname}' + key: '${backup_k8up:global_backup_config:s3_credentials:accesskeyname}' + - name: BACKUP_GLOBALSECRETACCESSKEY + valueFrom: + secretKeyRef: + name: '${backup_k8up:global_backup_config:s3_credentials:secretname}' + key: '${backup_k8up:global_backup_config:s3_credentials:secretkeyname}' + - name: BACKUP_GLOBALREPOPASSWORD + valueFrom: + secretKeyRef: + name: '${backup_k8up:global_backup_config:backup_secret:name}' + key: password + - name: BACKUP_GLOBALRESTORES3ACCESSKEYID + valueFrom: + secretKeyRef: + name: '${backup_k8up:global_backup_config:s3restore_credentials:secretname}' + key: '${backup_k8up:global_backup_config:s3restore_credentials:accesskeyname}' + - name: BACKUP_GLOBALRESTORES3SECRETACCESSKEY + valueFrom: + secretKeyRef: + name: '${backup_k8up:global_backup_config:s3restore_credentials:secretname}' + key: '${backup_k8up:global_backup_config:s3restore_credentials:secretkeyname}' + - name: BACKUP_ANNOTATION + value: '${backup_k8up:annotation}' + - name: BACKUP_BACKUPCOMMANDANNOTATION + value: '${backup_k8up:backupcommandannotation}' + - name: BACKUP_GLOBALKEEPJOBS + value: '${backup_k8up:global_backup_config:keepjobs}' + - name: BACKUP_GLOBALS3ENDPOINT + value: '${backup_k8up:global_backup_config:s3_endpoint}' + - name: BACKUP_GLOBALSTATSURL + value: '${backup_k8up:global_backup_config:stats_url}' + - name: BACKUP_BACKOFFLIMIT + value: '${backup_k8up:backofflimit}' + - name: BACKUP_GLOBALRESTORES3BUCKET + value: '${backup_k8up:global_backup_config:restore_bucket}' + - name: BACKUP_GLOBALRESTORES3ENDPOINT + value: '${backup_k8up:global_backup_config:restore_s3endpoint}' + global_backup_config: enabled: true default_backup_bucket: '${cluster:name}-k8up-backups' @@ -33,7 +89,6 @@ parameters: backofflimit: '2' annotation: k8up.syn.tools/backup backupcommandannotation: k8up.syn.tools/backupcommand - tz: Europe/Zurich alert_rule_filters: namespace: namespace=~"syn.*" prometheus_push_gateway: 'http://platform-prometheus-pushgateway.syn-synsights.svc:9091' @@ -77,14 +132,3 @@ parameters: for: 1m labels: severity: warning - charts: - k8up: 1.0.1 - images: - k8up: - registry: quay.io - image: vshn/k8up - tag: 'v1.0.1@sha256:7c351aa03781fb4cab075b4754b1c47afd3ed1d4737a2ed60c67cb45a20373ca' - wrestic: - registry: quay.io - image: vshn/wrestic - tag: 'v0.1.9@sha256:6b756ddb70e15977fc3d53a0468bcf6386d79d989768d48696167161f20e115e' diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index fa43c98..3b8345a 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -2,18 +2,6 @@ The parent key for all of the following parameters is `backup_k8up`. -== `crd` - -[horizontal] -type:: string -default:: `k8up-crd.yaml` - -The name of the CRD yaml File. - -Use `k8up-crd.yaml` (default) for K8s >= 1.16 -Change to `k8up-crd-legacy.yaml` for K8s <= 1.15 (e.g. OpenShift 3.11) - -See https://github.com/appuio/charts/tree/master/k8up#handling-crds == `enabled` @@ -26,14 +14,26 @@ Setting this to false, effectively disables the component from being deployed. NOTE: The manifests will still appear in the catalog, but without the ArgoCD app they won't get deployed. -== `enableLeaderElection` +== `crd` [horizontal] -type:: bool -default:: `true` +type:: string +default:: `k8up-crd.yaml` + +The name of the CRD yaml File. + +Use `k8up-crd.yaml` (default) for K8s >= 1.16 +Change to `k8up-crd-legacy.yaml` for K8s <= 1.15 (e.g. OpenShift 3.11) -Specifies whether leader election should be enabled. Disable this for K8s versions < 1.16 +See https://github.com/appuio/charts/tree/master/k8up#handling-crds +== `helmValues` + +[horizontal] +type:: dict +default:: See `class/defaults.yaml` + +Values passed to Helm. See https://github.com/appuio/charts/tree/master/k8up == `namespace` @@ -125,12 +125,6 @@ default:: `k8up.syn.tools/backup` type:: string default:: `k8up.syn.tools/backupcommand` -== `tz` - -[horizontal] -type:: string -default:: `Europe/Zurich` - == `alert_rule_filters` [horizontal] From b20071305cf26a3be5552aa935caa8ec6fbd2995 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Wed, 17 Feb 2021 17:07:26 +0100 Subject: [PATCH 5/8] Use UTC as default Timezone --- CHANGELOG.md | 3 ++- class/defaults.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60549f7..b67d5f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Expose all Helm values ([#20]) - Removed `image` parameter, they are available via Helm values ([#20]) - Removed `tz` parameter, its available with same default value set in Helm values ([#20]) +- Set `Etc/UTC` as default Timezone ([#20]) [Unreleased]: https://github.com/projectsyn/component-backup-k8up/compare/v1.0.0...HEAD @@ -34,4 +35,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#14]: https://github.com/projectsyn/component-backup-k8up/pull/14 [#18]: https://github.com/projectsyn/component-backup-k8up/pull/18 [#19]: https://github.com/projectsyn/component-backup-k8up/pull/19 -[#20]: https://github.com/projectsyn/component-backup-k8up/pull/20 \ No newline at end of file +[#20]: https://github.com/projectsyn/component-backup-k8up/pull/20 diff --git a/class/defaults.yml b/class/defaults.yml index cd74847..0fff1b0 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -16,7 +16,7 @@ parameters: replicaCount: 1 k8up: enableLeaderElection: true - timezone: "Europe/Zurich" + timezone: "Etc/UTC" envVars: - name: BACKUP_PROMURL From e1c385024e0c4596db710fd87b464c16299038b8 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 10 Mar 2021 11:43:37 +0100 Subject: [PATCH 6/8] Add documentation to upgrade component from v1 to v2 --- docs/modules/ROOT/pages/how-tos/.gitkeep | 0 docs/modules/ROOT/pages/how-tos/upgrade.adoc | 23 ++++++++++++++++++++ docs/modules/ROOT/partials/nav.adoc | 1 + 3 files changed, 24 insertions(+) delete mode 100644 docs/modules/ROOT/pages/how-tos/.gitkeep create mode 100644 docs/modules/ROOT/pages/how-tos/upgrade.adoc diff --git a/docs/modules/ROOT/pages/how-tos/.gitkeep b/docs/modules/ROOT/pages/how-tos/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docs/modules/ROOT/pages/how-tos/upgrade.adoc b/docs/modules/ROOT/pages/how-tos/upgrade.adoc new file mode 100644 index 0000000..02eade6 --- /dev/null +++ b/docs/modules/ROOT/pages/how-tos/upgrade.adoc @@ -0,0 +1,23 @@ += How to upgrade + +== Upgrade component from v1 to v2 + +K8up v1.0.0 and also the respective Helm chart v1.0.0 introduced breaking changes that also affect this component. +The upgrade process of K8up itself is documented here: https://k8up.io/k8up/1.0.0/how-tos/upgrade.html. +Contrary to the Helm chart, v2 of this component already ships the necessary CRDs. + +v2 of the component exposes the parameter `helmValues`, which is one to one passed to the Helm chart. +See https://github.com/appuio/charts/tree/master/k8up[Helm Chart] for a list of supported values. + +TIP: The component exposes additional parameters for ease of access. + +=== Parameter migration + +- `tz` is now `helmValues.k8up.timezone`, defaults to `Etc/UTC`. +- `images.k8up` is now `helmValues.image` with same subparameters. +- `images.wrestic` is now `helmValues.k8up.backupImage` with same subparameters except `registry`, which is integrated in `repository`. + +If the target cluster is older than Kubernetes v1.16: + +- Set `crd=k8up-crd-legacy.yaml` +- Set `helmValues.k8up.enableLeaderElection=false` diff --git a/docs/modules/ROOT/partials/nav.adoc b/docs/modules/ROOT/partials/nav.adoc index 08f9283..3f3b512 100644 --- a/docs/modules/ROOT/partials/nav.adoc +++ b/docs/modules/ROOT/partials/nav.adoc @@ -1,2 +1,3 @@ * xref:index.adoc[Home] +* xref:how-tos/upgrade.adoc[Upgrade] * xref:references/parameters.adoc[Parameters] From 8897df9edf145906cfc44a70008c9587b8e1b67a Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Mar 2021 10:53:19 +0100 Subject: [PATCH 7/8] Replace customer.name with cluster.tenant customer.name is deprecated. --- class/defaults.yml | 2 +- docs/modules/ROOT/pages/references/parameters.adoc | 10 +++++----- lib/backup-k8up.libjsonnet | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/class/defaults.yml b/class/defaults.yml index 0fff1b0..fb3ee67 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -74,7 +74,7 @@ parameters: secretkeyname: password backup_secret: name: global-backup-password - password: '?{vaultkv:${customer:name}/${cluster:name}/global-backup/password}' + password: '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/password}' s3restore_credentials: accesskey: '' secretkey: '' diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 3b8345a..5d34b04 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -68,7 +68,7 @@ default:: `{'accesskey': '', 'secretkey': '', 'secretname': 'global-bucket-crede [horizontal] type:: dict -default:: `{'name': 'global-backup-password', 'password': '?{vaultkv:${customer:name}/${cluster:name}/global-backup/password}'}` +default:: `{'name': 'global-backup-password', 'password': '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/password}'}` == `global_backup_config.s3restore_credentials` @@ -233,11 +233,11 @@ This structure is chosen to easily adjust individual alert configurations in the namespace: example-namespace global_keepjobs: "1" global_s3_credentials: - accesskey: '?{vaultkv:${customer:name}/${cluster:name}/global-backup/access-key}' - secretkey: '?{vaultkv:${customer:name}/${cluster:name}/global-backup/secret-key}' + accesskey: '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/access-key}' + secretkey: '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/secret-key}' global_s3restore_credentials: - accesskey: '?{vaultkv:${customer:name}/${cluster:name}/global-backup/restore-access-key}' - secretkey: '?{vaultkv:${customer:name}/${cluster:name}/global-backup/restore-secret-key}' + accesskey: '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/restore-access-key}' + secretkey: '?{vaultkv:${cluster:tenant}/${cluster:name}/global-backup/restore-secret-key}' global_restore_s3endpoint: https://s3endpoint.example.com global_restore_bucket: example-restore-bucket monitoring_alerts: diff --git a/lib/backup-k8up.libjsonnet b/lib/backup-k8up.libjsonnet index b0b87c6..3e0606d 100644 --- a/lib/backup-k8up.libjsonnet +++ b/lib/backup-k8up.libjsonnet @@ -38,7 +38,7 @@ local Backend(backupkey, bucket, s3secret, create_bucket=true) = s3secret; local bname = if create_bucket && bucket != null then local prefix = 'syn-%s-%s-%s' % [ - inv.parameters.customer.name, + inv.parameters.cluster.tenant, inv.parameters.cluster.name, bucket, ]; From 50691ed50ecbdb01093a6615d0e7b4a966118cf1 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Mar 2021 11:04:20 +0100 Subject: [PATCH 8/8] Update changelog and prepare for release v2.0.0 --- CHANGELOG.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b67d5f1..61b4aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.0.0] +### Changed + +- Upgrade K8up chart to v1.0.3 release with seperate CRD deployment([#20]) +- Expose all Helm values ([#20]) +- Removed `image` parameter, they are available via Helm values ([#20]) +- Removed `tz` parameter, its available in Helm values ([#20]) +- Set `Etc/UTC` as default Timezone ([#20]) +- Replaced internal parameter usage of `customer.name` with `cluster.tenant` ([#20]) + ## [v1.0.0] ### Added - Initial implementation -- Introduce paramter for confiugring the Prometheus name ([#11]) +- Introduce parameter for configuring the Prometheus name ([#11]) - Add alert for slow backup jobs ([#19]) ### Changed @@ -18,15 +28,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Option to disable the component - Move alert definitions to parameters ([#18]) - Adjust K8upJobStuck alert configuration ([#10]) -- Upgrade K8up chart to v1.0.1 release with seperate CRD deployment([#20]) -- Expose all Helm values ([#20]) -- Removed `image` parameter, they are available via Helm values ([#20]) -- Removed `tz` parameter, its available with same default value set in Helm values ([#20]) -- Set `Etc/UTC` as default Timezone ([#20]) -[Unreleased]: https://github.com/projectsyn/component-backup-k8up/compare/v1.0.0...HEAD +[Unreleased]: https://github.com/projectsyn/component-backup-k8up/compare/v2.0.0...HEAD [v1.0.0]: https://github.com/projectsyn/component-backup-k8up/releases/tag/v1.0.0 +[v2.0.0]: https://github.com/projectsyn/component-backup-k8up/releases/tag/v1.0.0 [#2]: https://github.com/projectsyn/component-backup-k8up/pull/2 [#6]: https://github.com/projectsyn/component-backup-k8up/pull/6