Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions components/kubearchive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,68 +22,71 @@ Deleted Releases are archived in KubeArchive and can still be accessed through t

## Upgrading

To upgrade start by upgrading development, which also upgrades staging. The diff should
look like this:
To upgrade start by upgrading development, which also upgrades staging. First replace the current `kubearchive.yaml` manifest
with the one from the new version, then the change the `kustomization.yaml` file so the diff looks like this:

```diff
diff --git a/components/kubearchive/development/kustomization.yaml b/components/kubearchive/development/kustomization.yaml
index b7d11eb00..8a5a0c9b1 100644
index 98bf1d721..ee330ff5a 100644
--- a/components/kubearchive/development/kustomization.yaml
+++ b/components/kubearchive/development/kustomization.yaml
@@ -8,7 +8,7 @@ resources:
- release-vacuum.yaml
- kubearchive-config.yaml
- pipelines-vacuum.yaml
- - https://github.com/kubearchive/kubearchive/releases/download/v1.7.0/kubearchive.yaml?timeout=90
+ - https://github.com/kubearchive/kubearchive/releases/download/v1.8.0/kubearchive.yaml?timeout=90

namespace: product-kubearchive
secretGenerator:
@@ -56,7 +56,7 @@ patches:
spec:
containers:
- name: vacuum
- image: quay.io/kubearchive/vacuum:v1.7.0
+ image: quay.io/kubearchive/vacuum:v1.8.0
- image: quay.io/kubearchive/vacuum:v1.14.0
+ image: quay.io/kubearchive/vacuum:v1.15.0
- patch: |-
apiVersion: batch/v1
kind: CronJob
@@ -69,7 +69,7 @@ patches:
spec:
containers:
- name: vacuum
- image: quay.io/kubearchive/vacuum:v1.7.0
+ image: quay.io/kubearchive/vacuum:v1.8.0
- image: quay.io/kubearchive/vacuum:v1.14.0
+ image: quay.io/kubearchive/vacuum:v1.15.0
- patch: |-
apiVersion: batch/v1
kind: CronJob
@@ -82,7 +82,7 @@ patches:
spec:
containers:
- name: vacuum
- image: quay.io/kubearchive/vacuum:v1.7.0
+ image: quay.io/kubearchive/vacuum:v1.8.0
- image: quay.io/kubearchive/vacuum:v1.14.0
+ image: quay.io/kubearchive/vacuum:v1.15.0
- patch: |-
apiVersion: batch/v1
kind: Job
@@ -95,7 +95,7 @@ patches:
@@ -102,7 +102,7 @@ patches:
- name: migration
env:
- name: KUBEARCHIVE_VERSION
- value: v1.7.0
+ value: v1.8.0
- value: v1.14.0
+ value: v1.15.0
# These patches add an annotation so an OpenShift service
# creates the TLS secrets instead of Cert Manager
- patch: |-
```

So the version should change at:

* URL that pulls KubeArchive release files.
* Patches that change the KubeArchive vacuum image for vacuum CronJobs.
* Environment variable that is used to pull the KubeArchive repository
on the database migration Job.
* Environment variable that is used to pull the KubeArchive repository on the database migration Job.

Then after the upgrade is successful, you can start upgrading production clusters.
Make sure to review the changes inside the KubeArchive YAML pulled from GitHub. Some
resources may change so some patches may not be useful/wrong after upgrading.

### Upgrade Script

There is a simple bash script you can use to upgrade, run it as follows:

```
cd infra-deployments/
bash components/kubearchive/upgrade.sh <current-version> <new-version>
# For example: bash components/kubearchive/upgrade.sh v1.14.0 v1.15.0
```

This script downloads the new manifests from the GitHub repository
and replaces (using `sed`) the `<current-version>` string with the
`<new-version>` string on all `kustomization.yaml` files.
Loading
Loading