Skip to content

Commit 5f5e9e0

Browse files
authored
Support rolling upgrade by node (#668)
* Support different rolling upgrade strategies. * Enhance site and rack configuration * Use topology.kubernetes.io/subzone Node label for Coherence rack if the label is present on the node.
1 parent 9f1f60a commit 5f5e9e0

Some content is hidden

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

61 files changed

+2525
-585
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,6 @@ jobs:
8888
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
8989
restore-keys: ${{ runner.os }}-m2
9090

91-
- name: Cache Tools
92-
uses: actions/cache@v4
93-
with:
94-
path: build/tools
95-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
96-
restore-keys: ${{ runner.os }}-build-tools
97-
9891
- name: Edit DNS Resolve
9992
shell: bash
10093
run: |
@@ -151,26 +144,30 @@ jobs:
151144
with:
152145
name: coherence-operator-manifests.tar.gz
153146
path: build/_output/coherence-operator-manifests.tar.gz
147+
if-no-files-found: ignore
154148

155149
- name: Upload Yaml
156150
uses: actions/upload-artifact@v4
157151
if: success()
158152
with:
159153
name: coherence-operator.yaml
160154
path: build/_output/coherence-operator.yaml
155+
if-no-files-found: ignore
161156

162157
- name: Upload CRD
163158
uses: actions/upload-artifact@v4
164159
if: success()
165160
with:
166161
name: coherence.oracle.com_coherence.yaml
167162
path: build/_output/manifests/crd/coherence.oracle.com_coherence.yaml
163+
if-no-files-found: ignore
168164

169165
- uses: actions/upload-artifact@v4
170-
if: failure()
166+
if: ${{ failure() || cancelled() }}
171167
with:
172168
name: test-output
173169
path: build/_output/test-logs
170+
if-no-files-found: ignore
174171

175172
- name: Deploy Snapshots & Docs
176173
if: ${{ github.ref == 'refs/heads/main' && success() }}

.github/workflows/coherence-matrix.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ jobs:
164164
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
165165
restore-keys: ${{ runner.os }}-m2
166166

167-
- name: Cache Tools
168-
uses: actions/cache@v4
169-
with:
170-
path: build/tools
171-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
172-
restore-keys: ${{ runner.os }}-build-tools
173-
174167
- name: Edit DNS Resolve
175168
shell: bash
176169
run: |
@@ -213,7 +206,8 @@ jobs:
213206
make coherence-compatibility-test
214207
215208
- uses: actions/upload-artifact@v4
216-
if: failure()
209+
if: ${{ failure() || cancelled() }}
217210
with:
218211
name: test-output-${{ matrix.matrixName }}
219212
path: build/_output/test-logs
213+
if-no-files-found: ignore

.github/workflows/compatibility-tests.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ jobs:
147147
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
148148
restore-keys: ${{ runner.os }}-m2
149149

150-
- name: Cache Tools
151-
uses: actions/cache@v4
152-
with:
153-
path: build/tools
154-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
155-
restore-keys: ${{ runner.os }}-build-tools
156-
157150
- name: Edit DNS Resolve
158151
shell: bash
159152
run: |
@@ -193,7 +186,8 @@ jobs:
193186
make compatibility-test
194187
195188
- uses: actions/upload-artifact@v4
196-
if: failure()
189+
if: ${{ failure() || cancelled() }}
197190
with:
198191
name: test-output-${{ matrix.compatibilityVersion }}
199192
path: build/_output/test-logs
193+
if-no-files-found: ignore

.github/workflows/doc-check.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ jobs:
5656
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5757
restore-keys: ${{ runner.os }}-m2
5858

59-
- name: Cache Tools
60-
uses: actions/cache@v4
61-
with:
62-
path: build/tools
63-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
64-
restore-keys: ${{ runner.os }}-build-tools
65-
6659
- name: Edit DNS Resolve
6760
shell: bash
6861
run: |

.github/workflows/istio-tests.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ jobs:
9494
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
9595
restore-keys: ${{ runner.os }}-m2
9696

97-
- name: Cache Tools
98-
uses: actions/cache@v4
99-
with:
100-
path: build/tools
101-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
102-
restore-keys: ${{ runner.os }}-build-tools
103-
10497
- name: Edit DNS Resolve
10598
shell: bash
10699
run: |
@@ -139,7 +132,8 @@ jobs:
139132
ISTIO_VERSION=${{ matrix.istioVersion }} make uninstall-istio
140133
141134
- uses: actions/upload-artifact@v4
142-
if: failure()
135+
if: ${{ failure() || cancelled() }}
143136
with:
144137
name: test-output-${{ matrix.istioVersion }}
145138
path: build/_output/test-logs
139+
if-no-files-found: ignore

.github/workflows/k3d-tests.yaml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at
3+
# http://oss.oracle.com/licenses/upl.
4+
5+
# ---------------------------------------------------------------------------
6+
# Coherence Operator GitHub Actions K3d build.
7+
# ---------------------------------------------------------------------------
8+
name: K3d Tests
9+
10+
on:
11+
workflow_dispatch:
12+
push:
13+
branches-ignore:
14+
- gh-pages
15+
- 1.0.0
16+
- 2.x
17+
- 3.x
18+
pull_request:
19+
types:
20+
- opened
21+
- synchronize
22+
- committed
23+
branches-ignore:
24+
- gh-pages
25+
- 1.0.0
26+
- 2.x
27+
- 3.x
28+
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
jobs:
33+
build:
34+
runs-on: ubuntu-latest
35+
36+
# Checkout the source, we need a depth of zero to fetch all the history otherwise
37+
# the copyright check cannot work out the date of the files from Git.
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 0
42+
43+
# This step will free up disc space on the runner by removing
44+
# lots of things that we do not need.
45+
- name: disc
46+
shell: bash
47+
run: |
48+
echo "Listing 100 largest packages"
49+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
50+
df -h
51+
echo "Removing large packages"
52+
sudo apt-get remove -y '^dotnet-.*' || true
53+
sudo apt-get remove -y '^llvm-.*' || true
54+
sudo apt-get remove -y 'monodoc-http' || true
55+
sudo apt-get remove -y 'php.*' || true
56+
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel || true
57+
sudo apt-get autoremove -y || true
58+
sudo apt-get clean
59+
df -h
60+
echo "Removing large directories"
61+
rm -rf /usr/share/dotnet/
62+
sudo rm -rf /usr/local/lib/android
63+
df -h
64+
65+
- name: Set up JDK
66+
uses: oracle-actions/setup-java@v1
67+
with:
68+
website: oracle.com
69+
release: 21
70+
71+
- name: Set up Go
72+
uses: actions/setup-go@v5
73+
with:
74+
go-version: 1.22.x
75+
76+
- name: Cache Go Modules
77+
uses: actions/cache@v4
78+
with:
79+
path: ~/go/pkg/mod
80+
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
81+
restore-keys: |
82+
${{ runner.os }}-go-mods-
83+
84+
- name: Cache Maven packages
85+
uses: actions/cache@v4
86+
with:
87+
path: ~/.m2
88+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
89+
restore-keys: ${{ runner.os }}-m2
90+
91+
- name: Edit DNS Resolve
92+
shell: bash
93+
run: |
94+
sudo chown -R runner:runner /run/systemd/resolve/stub-resolv.conf
95+
sudo echo nameserver 8.8.8.8 > /run/systemd/resolve/stub-resolv.conf
96+
97+
- name: Run K3d Tests
98+
shell: bash
99+
run: |
100+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
101+
make build-operator
102+
make k3d
103+
kubectl version
104+
kubectl get nodes
105+
docker pull gcr.io/distroless/java
106+
docker pull gcr.io/distroless/java11-debian11
107+
docker pull gcr.io/distroless/java17-debian11
108+
109+
- name: K3d Tests
110+
shell: bash
111+
timeout-minutes: 60
112+
run: |
113+
make e2e-k3d-test
114+
115+
- uses: actions/upload-artifact@v4
116+
if: ${{ failure() || cancelled() }}
117+
with:
118+
name: test-output
119+
path: build/_output/test-logs

.github/workflows/k8s-matrix.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,6 @@ jobs:
130130
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
131131
restore-keys: ${{ runner.os }}-m2
132132

133-
- name: Cache Tools
134-
uses: actions/cache@v4
135-
with:
136-
path: build/tools
137-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
138-
restore-keys: ${{ runner.os }}-build-tools
139-
140133
- name: Edit DNS Resolve
141134
shell: bash
142135
run: |
@@ -161,7 +154,8 @@ jobs:
161154
./hack/k8s-certification.sh
162155
163156
- uses: actions/upload-artifact@v4
164-
if: failure()
157+
if: ${{ failure() || cancelled() }}
165158
with:
166159
name: test-output-${{ matrix.matrixName }}
167160
path: build/_output/test-logs
161+
if-no-files-found: ignore

.github/workflows/minikube-matrix.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ jobs:
110110
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
111111
restore-keys: ${{ runner.os }}-m2
112112

113-
- name: Cache Tools
114-
uses: actions/cache@v4
115-
with:
116-
path: build/tools
117-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
118-
restore-keys: ${{ runner.os }}-build-tools
119-
120113
- name: Edit DNS Resolve
121114
shell: bash
122115
run: |
@@ -141,7 +134,8 @@ jobs:
141134
./hack/k8s-certification.sh
142135
143136
- uses: actions/upload-artifact@v4
144-
if: failure()
137+
if: ${{ failure() || cancelled() }}
145138
with:
146139
name: test-output-${{ matrix.matrixName }}
147140
path: build/_output/test-logs
141+
if-no-files-found: ignore

.github/workflows/prometheus-tests.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,6 @@ jobs:
8888
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
8989
restore-keys: ${{ runner.os }}-m2
9090

91-
- name: Cache Tools
92-
uses: actions/cache@v4
93-
with:
94-
path: build/tools
95-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
96-
restore-keys: ${{ runner.os }}-build-tools
97-
9891
- name: Edit DNS Resolve
9992
shell: bash
10093
run: |
@@ -121,7 +114,8 @@ jobs:
121114
make e2e-prometheus-test
122115
123116
- uses: actions/upload-artifact@v4
124-
if: failure()
117+
if: ${{ failure() || cancelled() }}
125118
with:
126119
name: test-output
127120
path: build/_output/test-logs
121+
if-no-files-found: ignore

.github/workflows/release.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ jobs:
4949
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5050
restore-keys: ${{ runner.os }}-m2
5151

52-
- name: Cache Tools
53-
uses: actions/cache@v4
54-
with:
55-
path: build/tools
56-
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
57-
restore-keys: ${{ runner.os }}-build-tools
58-
5952
- name: Start KinD Cluster
6053
shell: bash
6154
run: |
@@ -124,6 +117,28 @@ jobs:
124117
asset_name: coherence.oracle.com_coherence_small.yaml
125118
asset_content_type: text/plain
126119

120+
- name: Upload Release Job CRD
121+
id: upload-release-crd
122+
uses: actions/upload-release-asset@v1
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
with:
126+
upload_url: ${{ github.event.release.upload_url }}
127+
asset_path: /tmp/coherence-operator/_output/manifests/crd/coherencejob.oracle.com_coherence.yaml
128+
asset_name: coherence.oracle.com_coherence.yaml
129+
asset_content_type: text/plain
130+
131+
- name: Upload Release Small Job CRD
132+
id: upload-release-small-crd
133+
uses: actions/upload-release-asset@v1
134+
env:
135+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
with:
137+
upload_url: ${{ github.event.release.upload_url }}
138+
asset_path: /tmp/coherence-operator/_output/manifests/crd-small/coherencejob.oracle.com_coherence.yaml
139+
asset_name: coherence.oracle.com_coherence_small.yaml
140+
asset_content_type: text/plain
141+
127142
- name: Upload Release Dashboards
128143
id: upload-release-dashboards
129144
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)