Skip to content

Commit

Permalink
Operator bundle ehancements (#239)
Browse files Browse the repository at this point in the history
* Make the operator work

Signed-off-by: carlosthe19916 <[email protected]>

* Upgrade xbuilder version

Signed-off-by: carlosthe19916 <[email protected]>

* Upgrade xbuilder version

Signed-off-by: carlosthe19916 <[email protected]>

* Fix Jreleaser config

Signed-off-by: carlosthe19916 <[email protected]>

* Enhance Operator bundle process

Signed-off-by: carlosthe19916 <[email protected]>

Signed-off-by: carlosthe19916 <[email protected]>
  • Loading branch information
carlosthe19916 authored Dec 22, 2022
1 parent 676a21c commit 93f5ca7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
-Dquarkus.container-image.name=ublhub \
-Dquarkus.container-image.tag=latest \
-P native,ui \
-f application
-pl application
# Identify major version
major=$(echo "${{ github.event.inputs.version }}" | cut -d. -f1)
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
-Dquarkus.operator-sdk.bundle.channels=alpha \
-Doperator.ublhub.image=quay.io/projectopenubl/ublhub:v${{ github.event.inputs.version }} \
-P native \
-f operator
-pl operator
# Tag images
docker tag quay.io/projectopenubl/ublhub-operator:latest quay.io/projectopenubl/ublhub-operator:v${{ github.event.inputs.version }}
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
-Doperator.ublhub.image=quay.io/projectopenubl/ublhub:v${{ github.event.inputs.version }} \
-Dquarkus.operator-sdk.bundle.package-name=ublhub-operator \
-Dquarkus.operator-sdk.bundle.channels=alpha \
-f operator
-pl operator
groovy scripts/enrichCSV.groovy \
operator/target/bundle/ublhub-operator/manifests/ublhub-operator.clusterserviceversion.yaml \
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
distribution: temurin
cache: maven
- name: Build distribution
run: mvn package -DskipTests -P ui,distribution -f application
run: mvn package -DskipTests -P ui,distribution -pl application

- name: JReleaser - release
uses: jreleaser/release-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
-Dquarkus.container-image.name=ublhub \
-Dquarkus.container-image.tag=latest \
-P native,ui \
-f application
-pl application
- name: Save container image
run: docker save -o ublhub-container-image.tar quay.io/projectopenubl/ublhub:latest
- name: Upload container image
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
-Dquarkus.container-image.name=ublhub-operator \
-Dquarkus.container-image.tag=latest \
-P native \
-f operator
-pl operator
- name: Save container image
run: docker save -o ublhub-operator-container-image.tar quay.io/projectopenubl/ublhub-operator:latest
- name: Upload container image
Expand Down
10 changes: 5 additions & 5 deletions operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,27 @@ mvn clean package \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=false \
-Dquarkus.container-image.registry=quay.io \
-Dquarkus.container-image.group=projectopenubl \
-Dquarkus.container-image.group=$USER \
-Dquarkus.container-image.name=ublhub-operator \
-Dquarkus.container-image.tag=nightly \
-Dquarkus.operator-sdk.bundle.package-name=ublhub-operator \
-Dquarkus.operator-sdk.bundle.channels=alpha \
-Dquarkus.application.version=test \
-P native
podman push quay.io/projectopenubl/ublhub-operator:nightly
podman push quay.io/$USER/ublhub-operator:test
```

Create bundle:

```shell
BUNDLE_IMAGE=quay.io/$USER/ublhub-operator-bundle:nightly
BUNDLE_IMAGE=quay.io/$USER/ublhub-operator-bundle:test
podman build -t $BUNDLE_IMAGE -f target/bundle/ublhub-operator/bundle.Dockerfile target/bundle/ublhub-operator
podman push $BUNDLE_IMAGE
```

Create catalog image:

```shell
CATALOG_IMAGE=quay.io/$USER/ublhub-operator-catalog:nightly
CATALOG_IMAGE=quay.io/$USER/ublhub-operator-catalog:test
opm index add \
--bundles $BUNDLE_IMAGE \
--tag $CATALOG_IMAGE \
Expand Down
8 changes: 8 additions & 0 deletions operator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-jib</artifactId>
</dependency>

<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"key": "password"
},
"url": "jdbc:postgresql://postgresql-primary.default.svc:5432/ublhubdb"
},
"storage": {
"type": "filesystem",
"filesystem": {
"size": "1Gi"
}
}
}
}]
Expand Down

0 comments on commit 93f5ca7

Please sign in to comment.