Skip to content

Commit d2bcaa9

Browse files
committed
KubeArchive: development upgrade to v1.15.0
Signed-off-by: Hector Martinez <[email protected]>
1 parent 2353ad3 commit d2bcaa9

File tree

4 files changed

+182
-68
lines changed

4 files changed

+182
-68
lines changed

components/kubearchive/README.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,68 +22,71 @@ Deleted Releases are archived in KubeArchive and can still be accessed through t
2222

2323
## Upgrading
2424

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

2828
```diff
2929
diff --git a/components/kubearchive/development/kustomization.yaml b/components/kubearchive/development/kustomization.yaml
30-
index b7d11eb00..8a5a0c9b1 100644
30+
index 98bf1d721..ee330ff5a 100644
3131
--- a/components/kubearchive/development/kustomization.yaml
3232
+++ b/components/kubearchive/development/kustomization.yaml
33-
@@ -8,7 +8,7 @@ resources:
34-
- release-vacuum.yaml
35-
- kubearchive-config.yaml
36-
- pipelines-vacuum.yaml
37-
- - https://github.com/kubearchive/kubearchive/releases/download/v1.7.0/kubearchive.yaml?timeout=90
38-
+ - https://github.com/kubearchive/kubearchive/releases/download/v1.8.0/kubearchive.yaml?timeout=90
39-
40-
namespace: product-kubearchive
41-
secretGenerator:
4233
@@ -56,7 +56,7 @@ patches:
4334
spec:
4435
containers:
4536
- name: vacuum
46-
- image: quay.io/kubearchive/vacuum:v1.7.0
47-
+ image: quay.io/kubearchive/vacuum:v1.8.0
37+
- image: quay.io/kubearchive/vacuum:v1.14.0
38+
+ image: quay.io/kubearchive/vacuum:v1.15.0
4839
- patch: |-
4940
apiVersion: batch/v1
5041
kind: CronJob
5142
@@ -69,7 +69,7 @@ patches:
5243
spec:
5344
containers:
5445
- name: vacuum
55-
- image: quay.io/kubearchive/vacuum:v1.7.0
56-
+ image: quay.io/kubearchive/vacuum:v1.8.0
46+
- image: quay.io/kubearchive/vacuum:v1.14.0
47+
+ image: quay.io/kubearchive/vacuum:v1.15.0
5748
- patch: |-
5849
apiVersion: batch/v1
5950
kind: CronJob
6051
@@ -82,7 +82,7 @@ patches:
6152
spec:
6253
containers:
6354
- name: vacuum
64-
- image: quay.io/kubearchive/vacuum:v1.7.0
65-
+ image: quay.io/kubearchive/vacuum:v1.8.0
55+
- image: quay.io/kubearchive/vacuum:v1.14.0
56+
+ image: quay.io/kubearchive/vacuum:v1.15.0
6657
- patch: |-
6758
apiVersion: batch/v1
6859
kind: Job
69-
@@ -95,7 +95,7 @@ patches:
60+
@@ -102,7 +102,7 @@ patches:
7061
- name: migration
7162
env:
7263
- name: KUBEARCHIVE_VERSION
73-
- value: v1.7.0
74-
+ value: v1.8.0
64+
- value: v1.14.0
65+
+ value: v1.15.0
7566
# These patches add an annotation so an OpenShift service
7667
# creates the TLS secrets instead of Cert Manager
7768
- patch: |-
7869
```
7970

8071
So the version should change at:
8172

82-
* URL that pulls KubeArchive release files.
8373
* Patches that change the KubeArchive vacuum image for vacuum CronJobs.
84-
* Environment variable that is used to pull the KubeArchive repository
85-
on the database migration Job.
74+
* Environment variable that is used to pull the KubeArchive repository on the database migration Job.
8675

8776
Then after the upgrade is successful, you can start upgrading production clusters.
8877
Make sure to review the changes inside the KubeArchive YAML pulled from GitHub. Some
8978
resources may change so some patches may not be useful/wrong after upgrading.
79+
80+
### Upgrade Script
81+
82+
There is a simple bash script you can use to upgrade, run it as follows:
83+
84+
```
85+
cd infra-deployments/
86+
bash components/kubearchive/upgrade.sh <current-version> <new-version>
87+
# For example: bash components/kubearchive/upgrade.sh v1.14.0 v1.15.0
88+
```
89+
90+
This script downloads the new manifests from the GitHub repository
91+
and replaces (using `sed`) the `<current-version>` string with the
92+
`<new-version>` string on all `kustomization.yaml` files.

0 commit comments

Comments
 (0)