Skip to content

Commit 8d5d56c

Browse files
authored
Dependency Updates and Release Preparation (#36)
* WIP: updating Go version and dependencies * WIP: updated GHA and versions * WIP: updated plugin and tests" * WIP: updated kind version and using buildx with platform support * WIP: make fmt * Fixed issues around requeue * Updated redis, node, and go module versions * Updated makefile to use arch properly * Fixing lint issues * Fix e2e tests by correcting Helm chart path and adding Helm setup step * Fixing warning in e2e tests and potential release workflow issue * Fixing old image references in prep for release
1 parent 0b7edb3 commit 8d5d56c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2860
-3295
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,21 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
9+
# Maintain Go dependencies
10+
- package-ecosystem: "gomod"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"
14+
15+
# Maintain npm dependencies in docs folder
16+
- package-ecosystem: "npm"
17+
directory: "/docs"
18+
schedule:
19+
interval: "weekly"
20+
21+
# Maintain Docker dependencies
22+
- package-ecosystem: "docker"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"

.github/workflows/pull_request.yml

Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ on:
66
- main
77

88
env:
9-
GO_VERSION: ^1.20
10-
HELM_VERSION: v3.11.2
11-
PYTHON_VERSION: 3.7 # required for helm tester
9+
GO_VERSION: '1.24'
10+
HELM_VERSION: v3.18.0
11+
PYTHON_VERSION: '3.12' # required for helm tester
1212

1313
jobs:
1414
run-tests:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Setup Go
21-
uses: actions/setup-go@v4
21+
uses: actions/setup-go@v5
2222
with:
2323
go-version: ${{ env.GO_VERSION }}
2424

2525
- name: Run golangci-lint
26-
uses: golangci/golangci-lint-action@v3
26+
uses: golangci/golangci-lint-action@v4
2727
with:
28-
args: --timeout=3m --enable exportloopref
28+
args: --timeout=3m --enable copyloopvar --out-format colored-line-number
2929
skip-pkg-cache: true
3030
skip-build-cache: true
3131

@@ -37,70 +37,70 @@ jobs:
3737
needs: run-tests
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141

4242
- name: Setup Buildx
43-
uses: docker/setup-buildx-action@v2
43+
uses: docker/setup-buildx-action@v3
4444

4545
- name: Build operator image
46-
uses: docker/build-push-action@v4
46+
uses: docker/build-push-action@v5
4747
with:
48-
tags: ibmcom/operator-for-redis:local
48+
tags: cinple/operator-for-redis-cluster-operator:local
4949
file: Dockerfile.operator
5050

5151
build-cluster-node:
5252
runs-on: ubuntu-latest
5353
needs: run-tests
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5757

5858
- name: Setup Buildx
59-
uses: docker/setup-buildx-action@v2
59+
uses: docker/setup-buildx-action@v3
6060

6161
- name: Build redis node image
62-
uses: docker/build-push-action@v4
62+
uses: docker/build-push-action@v5
6363
with:
64-
tags: ibmcom/node-for-redis:local
64+
tags: cinple/operator-for-redis-cluster-node:local
6565
file: Dockerfile.node
6666

6767
build-metrics:
6868
runs-on: ubuntu-latest
6969
needs: run-tests
7070
steps:
7171
- name: Checkout
72-
uses: actions/checkout@v3
72+
uses: actions/checkout@v4
7373

7474
- name: Setup Buildx
75-
uses: docker/setup-buildx-action@v2
75+
uses: docker/setup-buildx-action@v3
7676

7777
- name: Build redis metrics image
78-
uses: docker/build-push-action@v4
78+
uses: docker/build-push-action@v5
7979
with:
80-
tags: ibmcom/metrics-for-redis:local
80+
tags: cinple/operator-for-redis-cluster-metrics:local
8181
file: Dockerfile.metrics
8282

8383
validate-helm-charts:
8484
runs-on: ubuntu-latest
8585
needs: run-tests
8686
steps:
8787
- name: Checkout
88-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8989
with:
9090
fetch-depth: 0 # ct needs history to compare
9191

9292
- name: Setup Helm
93-
uses: azure/setup-helm@v3.5
93+
uses: azure/setup-helm@v4
9494
with:
9595
version: ${{ env.HELM_VERSION }}
9696

9797
- name: Setup Python
98-
uses: actions/setup-python@v4.7.0
98+
uses: actions/setup-python@v5
9999
with:
100100
python-version: ${{ env.PYTHON_VERSION }}
101101

102102
- name: Setup chart-testing
103-
uses: helm/chart-testing-action@v2.4.0
103+
uses: helm/chart-testing-action@v2.6.0
104104

105105
- name: Run chart-testing (list-changed)
106106
id: list-changed
@@ -116,11 +116,11 @@ jobs:
116116
check-docs:
117117
runs-on: ubuntu-latest
118118
steps:
119-
- uses: actions/checkout@v3
119+
- uses: actions/checkout@v4
120120
- name: Setup Node
121-
uses: actions/setup-node@v3
121+
uses: actions/setup-node@v4
122122
with:
123-
node-version: 16.17.1 # This is recommended LTS version which includes npm 6.14.10
123+
node-version: 22.x # Latest LTS
124124
- name: Build docs website
125125
run: |
126126
npm -v
@@ -135,50 +135,55 @@ jobs:
135135
strategy:
136136
fail-fast: false
137137
matrix:
138-
kubernetes-version: [ "1.26" ] #, "1.25", "1.24", "1.23"]
138+
kubernetes-version: [ "1.33" ] #, "1.32", "1.31" ]
139139
include:
140-
- kubernetes-version: "1.26"
141-
kind-node: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
142-
# - kubernetes-version: "1.25"
143-
# kind-node: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
144-
# - kubernetes-version: "1.24"
145-
# kind-node: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
146-
# - kubernetes-version: "1.23"
147-
# kind-node: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb
140+
- kubernetes-version: "1.33"
141+
kind-node: kindest/node:v1.33.1@sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f
142+
# - kubernetes-version: "1.32"
143+
# kind-node: kindest/node:v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d
144+
# - kubernetes-version: "1.31"
145+
# kind-node: kindest/node:v1.31.9@sha256:b94a3a6c06198d17f59cca8c6f486236fa05e2fb359cbd75dabbfc348a10b211
146+
147+
148148
steps:
149149
- name: Checkout
150-
uses: actions/checkout@v3
150+
uses: actions/checkout@v4
151151

152152
- name: Setup Go
153-
uses: actions/setup-go@v4
153+
uses: actions/setup-go@v5
154154
with:
155155
go-version: ${{ env.GO_VERSION }}
156156

157+
- name: Setup Helm
158+
uses: azure/setup-helm@v4
159+
with:
160+
version: ${{ env.HELM_VERSION }}
161+
157162
- name: Build images
158163
run: |
159-
docker build -f Dockerfile.operator -t ibmcom/operator-for-redis:local .
160-
docker build -f Dockerfile.node -t ibmcom/node-for-redis:local -t ibmcom/node-for-redis:new .
161-
docker build -f Dockerfile.metrics -t ibmcom/metrics-for-redis:local .
164+
docker build -f Dockerfile.operator -t cinple/operator-for-redis-cluster-operator:local .
165+
docker build -f Dockerfile.node -t cinple/operator-for-redis-cluster-node:local -t cinple/operator-for-redis-cluster-node:new .
166+
docker build -f Dockerfile.metrics -t cinple/operator-for-redis-cluster-metrics:local .
162167
163168
- name: kind create cluster
164-
uses: helm/kind-action@v1.8.0
169+
uses: helm/kind-action@v1.12.0
165170
with:
166-
version: v0.18.0
171+
version: v0.29.0
167172
config: ./test/e2e/kind_config.yml
168173
cluster_name: kind
169174
node_image: ${{ matrix.kind-node }}
170175
wait: 120s
171176

172177
- name: Load Images to KIND
173178
run: |
174-
kind load docker-image ibmcom/operator-for-redis:local
175-
kind load docker-image ibmcom/node-for-redis:local
176-
kind load docker-image ibmcom/node-for-redis:new
177-
kind load docker-image ibmcom/metrics-for-redis:local
179+
kind load docker-image cinple/operator-for-redis-cluster-operator:local
180+
kind load docker-image cinple/operator-for-redis-cluster-node:local
181+
kind load docker-image cinple/operator-for-redis-cluster-node:new
182+
kind load docker-image cinple/operator-for-redis-cluster-metrics:local
178183
179-
- name: Install operator-for-redis with Helm
184+
- name: Install operator-for-redis-cluster with Helm
180185
id: helm
181-
run: helm install operator-for-redis charts/operator-for-redis --wait --set image.repository=ibmcom/operator-for-redis --set image.tag=local --set logLevel=7
186+
run: helm install operator-for-redis-cluster charts/operator-for-redis --wait --set image.repository=cinple/operator-for-redis-cluster-operator --set image.tag=local --set logLevel=7
182187

183188
- name: Run e2e tests
184189
id: e2e
@@ -193,7 +198,7 @@ jobs:
193198
194199
- name: Upload logs artifact
195200
if: ${{ always() && (steps.e2e.outcome == 'failure' || steps.helm.outcome == 'failure') }}
196-
uses: actions/upload-artifact@v3
201+
uses: actions/upload-artifact@v4
197202
with:
198203
name: kind-e2e-logs-${{ matrix.kubernetes-version }}.tar
199204
path: kind-e2e-logs-${{ matrix.kubernetes-version }}.tar

.github/workflows/release.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66
- published
77

88
env:
9-
GO_VERSION: ^1.20
10-
HELM_VERSION: v3.11.2
11-
REDIS_VERSION: 7.0.12
9+
GO_VERSION: '1.24'
10+
HELM_VERSION: v3.18.0
11+
REDIS_VERSION: 7.2.4
1212
CRD_PATH: charts/operator-for-redis/crds/db.ibm.com_redisclusters.yaml
1313
CRD_DIFF: crd.diff
1414

@@ -19,24 +19,24 @@ jobs:
1919
version: ${{ steps.meta.outputs.version }}
2020
steps:
2121
- name: Setup Buildx
22-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
2323

2424
- name: Prepare image metadata
25-
uses: docker/metadata-action@v4
25+
uses: docker/metadata-action@v5
2626
id: meta
2727
with:
2828
images: |
29-
cinple/operator-for-redis
29+
cinple/operator-for-redis-cluster-operator
3030
tags: type=ref,event=tag
3131

3232
- name: Login to DockerHub
33-
uses: docker/login-action@v2
33+
uses: docker/login-action@v3
3434
with:
3535
username: ${{ secrets.DOCKERHUB_USERNAME }}
3636
password: ${{ secrets.DOCKERHUB_TOKEN }}
3737

3838
- name: Build and push operator image
39-
uses: docker/build-push-action@v4
39+
uses: docker/build-push-action@v5
4040
with:
4141
file: Dockerfile.operator
4242
push: true
@@ -54,24 +54,24 @@ jobs:
5454
version: ${{ steps.meta.outputs.version }}
5555
steps:
5656
- name: Setup Buildx
57-
uses: docker/setup-buildx-action@v2
57+
uses: docker/setup-buildx-action@v3
5858

5959
- name: Prepare image metadata
60-
uses: docker/metadata-action@v4
60+
uses: docker/metadata-action@v5
6161
id: meta
6262
with:
6363
images: |
64-
cinple/node-for-redis
64+
cinple/operator-for-redis-cluster-node
6565
tags: type=ref,event=tag
6666

6767
- name: Login to DockerHub
68-
uses: docker/login-action@v2
68+
uses: docker/login-action@v3
6969
with:
7070
username: ${{ secrets.DOCKERHUB_USERNAME }}
7171
password: ${{ secrets.DOCKERHUB_TOKEN }}
7272

7373
- name: Build and push cluster node image
74-
uses: docker/build-push-action@v4
74+
uses: docker/build-push-action@v5
7575
with:
7676
file: Dockerfile.node
7777
push: true
@@ -88,24 +88,24 @@ jobs:
8888
version: ${{ steps.meta.outputs.version }}
8989
steps:
9090
- name: Setup Buildx
91-
uses: docker/setup-buildx-action@v2
91+
uses: docker/setup-buildx-action@v3
9292

9393
- name: Prepare image metadata
94-
uses: docker/metadata-action@v4
94+
uses: docker/metadata-action@v5
9595
id: meta
9696
with:
9797
images: |
98-
cinple/metrics-for-redis
98+
cinple/operator-for-redis-cluster-metrics
9999
tags: type=ref,event=tag
100100

101101
- name: Login to DockerHub
102-
uses: docker/login-action@v2
102+
uses: docker/login-action@v3
103103
with:
104104
username: ${{ secrets.DOCKERHUB_USERNAME }}
105105
password: ${{ secrets.DOCKERHUB_TOKEN }}
106106

107107
- name: Build and push metrics image
108-
uses: docker/build-push-action@v4
108+
uses: docker/build-push-action@v5
109109
with:
110110
file: Dockerfile.metrics
111111
push: true
@@ -121,10 +121,10 @@ jobs:
121121
needs: [ operator, cluster-node, metrics ]
122122
steps:
123123
- name: Checkout
124-
uses: actions/checkout@v3
124+
uses: actions/checkout@v4
125125

126126
- name: Setup Helm
127-
uses: azure/setup-helm@v3.5
127+
uses: azure/setup-helm@v4
128128
with:
129129
version: ${{ env.HELM_VERSION }}
130130

@@ -157,11 +157,11 @@ jobs:
157157
needs: [ helm-release ]
158158
runs-on: ubuntu-latest
159159
steps:
160-
- uses: actions/checkout@v3
160+
- uses: actions/checkout@v4
161161
- name: Setup Node
162-
uses: actions/setup-node@v3
162+
uses: actions/setup-node@v4
163163
with:
164-
node-version: 16.17.1 # This is recommended LTS version which includes npm 6.14.10
164+
node-version: 22.x # Latest LTS
165165
- name: Publish docs website
166166
env:
167167
USE_SSH: false
@@ -181,9 +181,9 @@ jobs:
181181
needs: [ docs ]
182182
runs-on: ubuntu-latest
183183
steps:
184-
- uses: actions/checkout@v3
184+
- uses: actions/checkout@v4
185185
- name: Setup Go
186-
uses: actions/setup-go@v4
186+
uses: actions/setup-go@v5
187187
with:
188188
go-version: ${{ env.GO_VERSION }}
189189

0 commit comments

Comments
 (0)