Skip to content

Commit dfdb6ca

Browse files
committed
Merge branch '2806-sgdbops-restart-minor-version-upgrade-and-security-upgrade-always-fail-on-retry' into 'main'
Resolve "Implement SGStream to integrate with Postgres CDC and CloudEvents", "Implement migration in SGStream from an SGCluster or an external Postgres instance to ..." and "SGDbOps restart, minor version upgrade and security upgrade always fail on retry" Closes #2718, #2814, #2806, and #2834 See merge request ongresinc/stackgres!1593
2 parents fbdba7c + 7c11fee commit dfdb6ca

636 files changed

Lines changed: 40832 additions & 1809 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ hs_err_pid*
124124

125125
## ignoring target file
126126
target/
127+
!**/src/main/**/target/
127128
dist/
128129

129130
# maven-release-plugin

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: null
22

33
variables:
4-
SG_CI_IMAGE_NAME: "ci:1.25"
4+
SG_CI_IMAGE_NAME: "ci:1.26"
55
BUILDER_IMAGE_NAME: "builder:1.8"
66
SKIP_NATIVE: "false"
77
SKIP_E2E: "false"
@@ -16,7 +16,7 @@ variables:
1616
RESTORE_CACHE_ATTEMPTS: 3
1717
E2E_SHELL: sh
1818
E2E_ENV: kind
19-
K8S_VERSION: "1.22"
19+
K8S_VERSION: "1.24"
2020
LATEST: "false"
2121
BUILD_UID: 0
2222

.gitlab-ci/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
--extract jobs-java-test:'stackgres-k8s/src/jobs/target/surefire-reports/TEST-*.xml' \
1616
--extract cluster-controller-java-test:'stackgres-k8s/src/cluster-controller/target/surefire-reports/TEST-*.xml' \
1717
--extract distributedlogs-controller-java-test:'stackgres-k8s/src/distributedlogs-controller/target/surefire-reports/TEST-*.xml' \
18+
--extract stream-java-test:'stackgres-k8s/src/stream/target/surefire-reports/TEST-*.xml' \
1819
--extract restapi-java:'stackgres-k8s/src/api-web/target/swagger*' \
1920
parent-java \
2021
operator-framework-java operator-framework-java-test \
@@ -24,7 +25,9 @@
2425
restapi-java restapi-java-test \
2526
jobs-java jobs-java-test \
2627
cluster-controller-java cluster-controller-java-test \
27-
distributedlogs-controller-java distributedlogs-controller-java-test
28+
distributedlogs-controller-java distributedlogs-controller-java-test \
29+
stream-java stream-java-test
30+
cp stackgres-k8s/ci/build/target/junit-build.hashes.xml."$(cat stackgres-k8s/ci/build/target/build_hash)" stackgres-k8s/ci/build/target/junit-build.hashes.xml
2831
retry:
2932
max: 2
3033
when: [ unknown_failure, api_failure, stuck_or_timeout_failure, runner_system_failure, runner_unsupported,

.gitlab-ci/deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ deploy distributedlogs-controller jvm image:
9696
variables:
9797
IMAGE_NAME: "stackgres/distributedlogs-controller"
9898

99+
deploy stream jvm image:
100+
extends: .deploy jvm image
101+
variables:
102+
IMAGE_NAME: "stackgres/stream"
103+
TARGET_REGISTRIES: "quay.io"
104+
99105
.deploy native image:
100106
extends: .deploy image
101107
variables:
@@ -131,6 +137,12 @@ deploy distributedlogs-controller native image:
131137
variables:
132138
IMAGE_NAME: "stackgres/distributedlogs-controller"
133139

140+
.deploy stream native image:
141+
extends: .deploy native image
142+
variables:
143+
IMAGE_NAME: "stackgres/stream"
144+
TARGET_REGISTRIES: "quay.io"
145+
134146
deploy admin-ui image:
135147
extends: .deploy native image
136148
variables:

.gitlab-ci/image-build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ build distributedlogs-controller jvm image amd64:
118118
LOCK_FILE: stackgres-distributedlogs-controller-build-jvm-image
119119
IMAGE_MODULE_NAME: distributedlogs-controller-jvm-image
120120

121+
build stream jvm image amd64:
122+
extends: .build jvm image amd64
123+
variables:
124+
IMAGE_BASE_NAME: stackgres/stream
125+
LOCK_FILE: stackgres-stream-build-jvm-image
126+
IMAGE_MODULE_NAME: stream-jvm-image
127+
121128
build operator native image amd64:
122129
extends: .build native image amd64
123130
variables:
@@ -153,6 +160,13 @@ build distributedlogs-controller native image amd64:
153160
LOCK_FILE: stackgres-distributedlogs-controller-build-native-image
154161
IMAGE_MODULE_NAME: distributedlogs-controller-native-image
155162

163+
.build stream native image amd64:
164+
extends: .build native image amd64
165+
variables:
166+
IMAGE_BASE_NAME: stackgres/stream
167+
LOCK_FILE: stackgres-stream-build-native-image
168+
IMAGE_MODULE_NAME: stream-native-image
169+
156170
build admin-ui image amd64:
157171
extends: .build image
158172
dependencies:
@@ -229,6 +243,13 @@ build distributedlogs-controller jvm image arm64:
229243
LOCK_FILE: stackgres-distributedlogs-controller-build-jvm-image
230244
IMAGE_MODULE_NAME: distributedlogs-controller-jvm-image
231245

246+
build stream jvm image arm64:
247+
extends: .build jvm image arm64
248+
variables:
249+
IMAGE_BASE_NAME: stackgres/stream
250+
LOCK_FILE: stackgres-stream-build-jvm-image
251+
IMAGE_MODULE_NAME: stream-jvm-image
252+
232253
build operator native image arm64:
233254
extends: .build native image arm64
234255
variables:
@@ -264,6 +285,13 @@ build distributedlogs-controller native image arm64:
264285
LOCK_FILE: stackgres-distributedlogs-controller-build-native-image
265286
IMAGE_MODULE_NAME: distributedlogs-controller-native-image
266287

288+
.build stream native image arm64:
289+
extends: .build native image arm64
290+
variables:
291+
IMAGE_BASE_NAME: stackgres/stream
292+
LOCK_FILE: stackgres-stream-build-native-image
293+
IMAGE_MODULE_NAME: stream-native-image
294+
267295
build admin-ui image arm64:
268296
extends: .build image
269297
dependencies:
@@ -325,6 +353,11 @@ build distributedlogs-controller jvm image multi archs:
325353
variables:
326354
IMAGE_BASE_NAME: stackgres/distributedlogs-controller
327355

356+
build stream jvm image multi archs:
357+
extends: .build jvm image multi archs
358+
variables:
359+
IMAGE_BASE_NAME: stackgres/stream
360+
328361
build operator native image multi archs:
329362
extends: .build native image multi archs
330363
variables:
@@ -350,6 +383,11 @@ build distributedlogs-controller native image multi archs:
350383
variables:
351384
IMAGE_BASE_NAME: stackgres/distributedlogs-controller
352385

386+
.build stream native image multi archs:
387+
extends: .build native image multi archs
388+
variables:
389+
IMAGE_BASE_NAME: stackgres/stream
390+
353391
build admin-ui image multi archs:
354392
extends: .build image multi archs
355393
tags:

.gitlab-ci/image-release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ release distributedlogs-controller jvm image amd64:
125125
LOCK_FILE: stackgres-distributedlogs-controller-release-jvm-release-image
126126
IMAGE_MODULE_NAME: distributedlogs-controller-jvm-release-image
127127

128+
release stream jvm image amd64:
129+
extends: .release jvm image amd64
130+
variables:
131+
IMAGE_BASE_NAME: stackgres/stream
132+
LOCK_FILE: stackgres-stream-release-jvm-release-image
133+
IMAGE_MODULE_NAME: stream-jvm-release-image
134+
128135
release operator native image amd64:
129136
extends: .release native image amd64
130137
variables:
@@ -160,6 +167,13 @@ release distributedlogs-controller native image amd64:
160167
LOCK_FILE: stackgres-distributedlogs-controller-release-native-release-image
161168
IMAGE_MODULE_NAME: distributedlogs-controller-native-release-image
162169

170+
.release stream native image amd64:
171+
extends: .release native image amd64
172+
variables:
173+
IMAGE_BASE_NAME: stackgres/stream
174+
LOCK_FILE: stackgres-stream-release-native-release-image
175+
IMAGE_MODULE_NAME: stream-native-release-image
176+
163177
release admin-ui image amd64:
164178
extends: .release image
165179
dependencies:
@@ -244,6 +258,13 @@ release distributedlogs-controller jvm image arm64:
244258
LOCK_FILE: stackgres-distributedlogs-controller-release-jvm-release-image
245259
IMAGE_MODULE_NAME: distributedlogs-controller-jvm-release-image
246260

261+
release stream jvm image arm64:
262+
extends: .release jvm image arm64
263+
variables:
264+
IMAGE_BASE_NAME: stackgres/stream
265+
LOCK_FILE: stackgres-stream-release-jvm-release-image
266+
IMAGE_MODULE_NAME: stream-jvm-release-image
267+
247268
release operator native image arm64:
248269
extends: .release native image arm64
249270
variables:
@@ -279,6 +300,13 @@ release distributedlogs-controller native image arm64:
279300
LOCK_FILE: stackgres-distributedlogs-controller-release-native-release-image
280301
IMAGE_MODULE_NAME: distributedlogs-controller-native-release-image
281302

303+
.release stream native image arm64:
304+
extends: .release native image arm64
305+
variables:
306+
IMAGE_BASE_NAME: stackgres/stream
307+
LOCK_FILE: stackgres-stream-release-native-release-image
308+
IMAGE_MODULE_NAME: stream-native-release-image
309+
282310
release admin-ui image arm64:
283311
extends: .release image
284312
dependencies:
@@ -348,6 +376,11 @@ release distributedlogs-controller jvm image multi archs:
348376
variables:
349377
IMAGE_BASE_NAME: stackgres/distributedlogs-controller
350378

379+
release stream jvm image multi archs:
380+
extends: .release jvm image multi archs
381+
variables:
382+
IMAGE_BASE_NAME: stackgres/stream
383+
351384
release operator native image multi archs:
352385
extends: .release native image multi archs
353386
variables:
@@ -373,6 +406,11 @@ release distributedlogs-controller native image multi archs:
373406
variables:
374407
IMAGE_BASE_NAME: stackgres/distributedlogs-controller
375408

409+
.release stream native image multi archs:
410+
extends: .release native image multi archs
411+
variables:
412+
IMAGE_BASE_NAME: stackgres/stream
413+
376414
release admin-ui image multi archs:
377415
extends: .release image multi archs
378416
tags:

.gitlab-ci/native-build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ build distributedlogs-controller native executable amd64:
8080
MAVEN_EXTRA_ARGS: "-pl .,common,operator-framework,test-util,distributedlogs-controller"
8181
MODULE: "distributedlogs-controller-native"
8282

83+
.build stream native executable amd64:
84+
extends: .build native executable amd64
85+
variables:
86+
NATIVE_IMAGE_EXTRA_PREFIX: "-stream"
87+
MAVEN_EXTRA_ARGS: "-pl .,common,operator-framework,test-util,stream"
88+
MODULE: "stream-native"
89+
8390
.build native executable arm64:
8491
extends: .build native executable
8592
dependencies:
@@ -127,3 +134,10 @@ build distributedlogs-controller native executable arm64:
127134
NATIVE_IMAGE_EXTRA_PREFIX: "-distributedlogs-controller"
128135
MAVEN_EXTRA_ARGS: "-pl .,common,operator-framework,test-util,distributedlogs-controller"
129136
MODULE: "distributedlogs-controller-native"
137+
138+
.build stream native executable arm64:
139+
extends: .build native executable arm64
140+
variables:
141+
NATIVE_IMAGE_EXTRA_PREFIX: "-stream"
142+
MAVEN_EXTRA_ARGS: "-pl .,common,operator-framework,test-util,stream"
143+
MODULE: "stream-native"

doc/content/en/06-crd-reference/14-sgshardeddbops/_index.template.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ kind: SGShardedDbOps
2828
metadata:
2929
name: restart
3030
spec:
31-
sgShardedCluster: my-cluster
32-
op: restart
33-
maxRetries: 1
34-
restart:
35-
mode: InPlace
31+
sgShardedCluster: my-cluster
32+
op: restart
33+
maxRetries: 1
34+
restart:
35+
mode: InPlace
3636
```
3737
3838
{{% include "generated/SGShardedDbOps.md" %}}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: SGStream
3+
weight: 14
4+
url: /reference/crd/sgstream
5+
description: Details about SGStream
6+
showToc: true
7+
---
8+
9+
___
10+
**Kind:** SGStream
11+
12+
**listKind:** SGStreamList
13+
14+
**plural:** sgstreams
15+
16+
**singular:** sgstream
17+
18+
**shortNames** sgstr
19+
___
20+
21+
The `SGStream` custom resource represents a stream of Change Data Capture (CDC) events from a source database to a target service.
22+
23+
**Example:**
24+
25+
```yaml
26+
apiVersion: stackgres.io/v1
27+
kind: SGStream
28+
metadata:
29+
name: cloudevent
30+
spec:
31+
source:
32+
type: SGCluster
33+
sgCluster:
34+
name: my-cluster
35+
target:
36+
type: CloudEvent
37+
cloudEvent:
38+
binding: http
39+
format: json
40+
http:
41+
url: cloudevent-service
42+
```
43+
44+
{{% include "generated/SGStream.md" %}}

doc/content/en/08-stackgres-web-api/01-error-types/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ That means that all error messages follow this structure:
3232
| [forbidden-configuration-deletion](#forbidden-configuration-deletion) | A resource that the cluster depends on is attempted to be deleted. |
3333
| [forbidden-configuration-update](#forbidden-configuration-update) | A resource that the cluster depends on is attempted to be updated. |
3434
| [forbidden-cluster-update](#forbidden-cluster-update) | A certain cluster property that must not be updated is attempted to be updated. |
35+
| [forbidden-stream-update](#forbidden-stream-update) | A certain stream property that must not be updated is attempted to be updated. |
3536
| [invalid-storage-class](#invalid-storage-class) | The StackGres cluster refers to a storage class that doesn't exist. |
3637
| [constraint-violation](#constraint-violation) | One of the resource properties that is created or updated violates its syntactic rules. |
3738
| [forbidden-authorization](#forbidden-authorization) | You don't have permission to access the Kubernetes resource based on the RBAC rules. |

0 commit comments

Comments
 (0)