Skip to content

Commit 93f5ca7

Browse files
Operator bundle ehancements (#239)
* Make the operator work Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> * Upgrade xbuilder version Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> * Upgrade xbuilder version Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> * Fix Jreleaser config Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> * Enhance Operator bundle process Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Signed-off-by: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com>
1 parent 676a21c commit 93f5ca7

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
-Dquarkus.container-image.name=ublhub \
6767
-Dquarkus.container-image.tag=latest \
6868
-P native,ui \
69-
-f application
69+
-pl application
7070
7171
# Identify major version
7272
major=$(echo "${{ github.event.inputs.version }}" | cut -d. -f1)
@@ -136,7 +136,7 @@ jobs:
136136
-Dquarkus.operator-sdk.bundle.channels=alpha \
137137
-Doperator.ublhub.image=quay.io/projectopenubl/ublhub:v${{ github.event.inputs.version }} \
138138
-P native \
139-
-f operator
139+
-pl operator
140140
141141
# Tag images
142142
docker tag quay.io/projectopenubl/ublhub-operator:latest quay.io/projectopenubl/ublhub-operator:v${{ github.event.inputs.version }}
@@ -167,7 +167,7 @@ jobs:
167167
-Doperator.ublhub.image=quay.io/projectopenubl/ublhub:v${{ github.event.inputs.version }} \
168168
-Dquarkus.operator-sdk.bundle.package-name=ublhub-operator \
169169
-Dquarkus.operator-sdk.bundle.channels=alpha \
170-
-f operator
170+
-pl operator
171171
172172
groovy scripts/enrichCSV.groovy \
173173
operator/target/bundle/ublhub-operator/manifests/ublhub-operator.clusterserviceversion.yaml \
@@ -200,7 +200,7 @@ jobs:
200200
distribution: temurin
201201
cache: maven
202202
- name: Build distribution
203-
run: mvn package -DskipTests -P ui,distribution -f application
203+
run: mvn package -DskipTests -P ui,distribution -pl application
204204

205205
- name: JReleaser - release
206206
uses: jreleaser/release-action@v2

.github/workflows/snapshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
-Dquarkus.container-image.name=ublhub \
3232
-Dquarkus.container-image.tag=latest \
3333
-P native,ui \
34-
-f application
34+
-pl application
3535
- name: Save container image
3636
run: docker save -o ublhub-container-image.tar quay.io/projectopenubl/ublhub:latest
3737
- name: Upload container image
@@ -60,7 +60,7 @@ jobs:
6060
-Dquarkus.container-image.name=ublhub-operator \
6161
-Dquarkus.container-image.tag=latest \
6262
-P native \
63-
-f operator
63+
-pl operator
6464
- name: Save container image
6565
run: docker save -o ublhub-operator-container-image.tar quay.io/projectopenubl/ublhub-operator:latest
6666
- name: Upload container image

operator/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,27 @@ mvn clean package \
9090
-Dquarkus.container-image.build=true \
9191
-Dquarkus.container-image.push=false \
9292
-Dquarkus.container-image.registry=quay.io \
93-
-Dquarkus.container-image.group=projectopenubl \
93+
-Dquarkus.container-image.group=$USER \
9494
-Dquarkus.container-image.name=ublhub-operator \
95-
-Dquarkus.container-image.tag=nightly \
9695
-Dquarkus.operator-sdk.bundle.package-name=ublhub-operator \
9796
-Dquarkus.operator-sdk.bundle.channels=alpha \
97+
-Dquarkus.application.version=test \
9898
-P native
99-
podman push quay.io/projectopenubl/ublhub-operator:nightly
99+
podman push quay.io/$USER/ublhub-operator:test
100100
```
101101

102102
Create bundle:
103103

104104
```shell
105-
BUNDLE_IMAGE=quay.io/$USER/ublhub-operator-bundle:nightly
105+
BUNDLE_IMAGE=quay.io/$USER/ublhub-operator-bundle:test
106106
podman build -t $BUNDLE_IMAGE -f target/bundle/ublhub-operator/bundle.Dockerfile target/bundle/ublhub-operator
107107
podman push $BUNDLE_IMAGE
108108
```
109109

110110
Create catalog image:
111111

112112
```shell
113-
CATALOG_IMAGE=quay.io/$USER/ublhub-operator-catalog:nightly
113+
CATALOG_IMAGE=quay.io/$USER/ublhub-operator-catalog:test
114114
opm index add \
115115
--bundles $BUNDLE_IMAGE \
116116
--tag $CATALOG_IMAGE \

operator/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@
6363
<groupId>io.quarkus</groupId>
6464
<artifactId>quarkus-resteasy-reactive</artifactId>
6565
</dependency>
66+
<dependency>
67+
<groupId>io.quarkus</groupId>
68+
<artifactId>quarkus-smallrye-health</artifactId>
69+
</dependency>
70+
<dependency>
71+
<groupId>io.quarkus</groupId>
72+
<artifactId>quarkus-container-image-jib</artifactId>
73+
</dependency>
6674

6775
<dependency>
6876
<groupId>io.quarkiverse.operatorsdk</groupId>

operator/src/main/java/io/github/project/openubl/operator/UblhubOperatorCSVMetadata.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
"key": "password"
4646
},
4747
"url": "jdbc:postgresql://postgresql-primary.default.svc:5432/ublhubdb"
48+
},
49+
"storage": {
50+
"type": "filesystem",
51+
"filesystem": {
52+
"size": "1Gi"
53+
}
4854
}
4955
}
5056
}]

0 commit comments

Comments
 (0)