Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0d61233
configure profiles with related compose dev services to test against …
ThoSap Jan 22, 2026
4984200
specify optimized tmpfs mount options
ThoSap Jan 22, 2026
27b0b57
adjust the GitHub test workflow to use a test matrix for PostgreSQL v…
ThoSap Jan 22, 2026
14f473b
implement a release workflow
ThoSap Jan 23, 2026
af2420f
remove the container image app suffix
ThoSap Jan 23, 2026
e80d4ee
fix typo
ThoSap Jan 23, 2026
8510471
fix the image name in the Helm chart values.yml
ThoSap Jan 23, 2026
62b8137
enable Gradle configuration cache as Quarkus is compatible with it
ThoSap Jan 23, 2026
1d16cfc
update to Quarkus 3.30.8
ThoSap Jan 23, 2026
cc66654
restructure release description
ThoSap Jan 26, 2026
dc5e0fa
error out if an unsupported privilege is used and conditionally refle…
ThoSap Jan 26, 2026
de4bab9
move the unsupported privilege test to the CRDValidation tests and do…
ThoSap Jan 26, 2026
becb9c1
add the maintain privilege again to the Javadoc
ThoSap Jan 26, 2026
e602f5a
use aboutbits/java-checkstyle-config version 2.0.0-RC1
ThoSap Jan 26, 2026
f3c00a6
update to AssertJ 3.27.7
ThoSap Jan 26, 2026
446b269
run the test matrix also when running the release workflow and on mai…
ThoSap Jan 26, 2026
10283d2
fix the workflow in PRs
ThoSap Jan 26, 2026
3c80bff
remove the concurrency block from the reused test workflow
ThoSap Jan 26, 2026
3ec0efa
specify the About Bits GmbH MIT license
ThoSap Jan 26, 2026
011ba49
use the exec-form in the compose files to properly handle SIGTERM
ThoSap Jan 26, 2026
c2a28cf
reference the correct ObjectType TABLE constant
ThoSap Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ concurrency:

jobs:
test:
name: Tests
uses: ./.github/workflows/test.yml
secrets: inherit
name: Tests (PostgreSQL ${{ matrix.postgres-version }})
runs-on: ubuntu-24.04
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
postgres-version: [ 15, 16, 17, 18 ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sick! 💯

steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: aboutbits/github-actions-java/setup-with-gradle@v4
with:
java-version: 25
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Build & Test
run: >-
./gradlew
--console=colored
:operator:test
--fail-fast
-Dquarkus.test.profile=test-pg${{ matrix.postgres-version }}
env:
GITHUB_USER_NAME: ${{ github.actor }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the frontend packages we called this file like this. In the backend packages we used the name publish.yml. I think the name release.yml is more appropriate. I will make a note for myself to change it at all other backend packages.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it already for all backend repositories.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it.

Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Release

on:
workflow_dispatch:
inputs:
increment:
description: "Version increment type"
type: choice
required: true
default: "Patch"
options:
- "Major"
- "Minor"
- "Patch"
- "Prerelease"

env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}

jobs:
build-and-publish:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- uses: aboutbits/github-actions-base/git-setup@v2
- uses: aboutbits/github-actions-java/setup-with-gradle@v4
with:
java-version: 25
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Increment version
run: ./gradlew --console=colored createRelease -Prelease.versionIncrementer=increment${{ github.event.inputs.increment }}
shell: bash
- name: Get next package version
id: nextVersion
run: echo "version=$(./gradlew currentVersion -q -Prelease.quiet)" >> $GITHUB_OUTPUT
shell: bash
- name: Build package
run: ./gradlew --console=colored build
- name: Build Docker image
uses: aboutbits/github-actions-docker/build-push@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
docker-image: ${{ env.DOCKER_IMAGE }}
docker-tag: ${{ steps.nextVersion.outputs.version }}
working-directory: './operator'
dockerfile: './operator/src/main/docker/Dockerfile.jvm'
- name: Push tag to remote
run: ./gradlew --console=colored pushRelease
shell: bash
- uses: aboutbits/github-actions-base/github-create-release@v2
with:
tag-name: 'v${{ steps.nextVersion.outputs.version }}'
release-description: |
## Installation

**Docker Image:**
```bash
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.nextVersion.outputs.version }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When does a user need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only if you want to inspect the container image with tools like https://github.com/wagoodman/dive or https://github.com/reproducible-containers/diffoci

For the other cases, you most likely always use the Helm chart.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this, since this is just for debugging reasons. Or at least this is the least important information here. So first the must be the Helm installation instruction.

```

**Helm Chart:**
Comment thread
ThoSap marked this conversation as resolved.
Outdated
```bash
helm install postgresql-operator https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/postgresql-operator-${{ steps.nextVersion.outputs.version }}.tgz
```

**Manually installing CRDs:**
Comment thread
ThoSap marked this conversation as resolved.
Outdated
```bash
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/clusterconnections.postgresql.aboutbits.it-v1.yml
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/databases.postgresql.aboutbits.it-v1.yml
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/schemas.postgresql.aboutbits.it-v1.yml
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/roles.postgresql.aboutbits.it-v1.yml
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/grants.postgresql.aboutbits.it-v1.yml
kubectl apply -f https://github.com/${{ github.repository }}/releases/download/v${{ steps.nextVersion.outputs.version }}/defaultprivileges.postgresql.aboutbits.it-v1.yml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we need these manual installations? Is this really something that is required? Or will everything be handeled by the Helm chart?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is required if someone is not using the Helm chart, or we add a flag to the Helm chart to not install the CRDs using a simple boolean switch.

```
release-notes-generation: 'true'
- name: Upload Helm chart and CRD assets
env:
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
run: |
gh release upload v${{ steps.nextVersion.outputs.version }} operator/build/helm/kubernetes/*.tgz operator/build/kubernetes/*.postgresql.aboutbits.it-v1.yml
shell: bash
25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,21 @@ run:
generate-jooq:
./gradlew --console=colored :generated:jooqCodegen

# Latest PostgreSQL Version configured in application.yml
test:
./gradlew --console=colored :operator:clean :operator:test
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks

test-pg18:
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg18

test-pg17:
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg17

test-pg16:
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg16

test-pg15:
./gradlew --console=colored :operator:clean :operator:test --rerun-tasks -Dquarkus.test.profile=test-pg15

# Flag targets as phony, to tell `make` that these are no file targets
.PHONY: init install run generate-jooq test
.PHONY: init install run generate-jooq test test-pg18 test-pg17 test-pg16 test-pg15
20 changes: 17 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,36 @@ plugins {
java
checkstyle
id("io.quarkus").apply(false)
alias(libs.plugins.axionReleasePlugin)
alias(libs.plugins.errorPronePlugin)
alias(libs.plugins.jooqPlugin).apply(false)
}

description = "AboutBits PostgreSQL Operator"

scmVersion {
checks {
aheadOfRemote = true
snapshotDependencies = false
uncommittedChanges = false
}
releaseBranchNames = setOf("main")
releaseOnlyOnReleaseBranches = true
versionCreator("simple")
}

version = scmVersion.version

allprojects {
group = "it.aboutbits.postgresql"
version = "0.0.1-SNAPSHOT"
version = rootProject.version

tasks.withType<Checkstyle>().configureEach {
dependsOn(":checkstyleExtractConfig")

reports {
html.required.set(false)
xml.required.set(false)
html.required = false
xml.required = false
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Gradle properties
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configuration-cache=true
# TODO: Set to true when https://github.com/quarkusio/quarkus/issues/49115 is fixed
org.gradle.parallel=false
org.gradle.logging.level=INFO

# Quarkus
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.30.7
quarkusPluginVersion=3.30.8
# https://mvnrepository.com/artifact/io.quarkus.platform/quarkus-bom
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=3.30.7
quarkusPlatformVersion=3.30.8
systemProp.quarkus.analytics.disabled=true
7 changes: 7 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## AboutBits Libraries ##
checkstyleConfig = "2.0.0"

# Axion Release Plugin #
axionReleasePlugin = "1.21.1"

## Libraries ##
jooq = "3.20.10"
jSpecify = "1.0.0"
Expand All @@ -19,6 +22,10 @@ errorPronePlugin = "4.4.0"
nullAway = "0.13.0"

[plugins]
# https://github.com/allegro/axion-release-plugin
# https://axion-release-plugin.readthedocs.io/
axionReleasePlugin = { id = "pl.allegro.tech.build.axion-release", version.ref = "axionReleasePlugin" }

# https://github.com/tbroyer/gradle-errorprone-plugin
# https://mvnrepository.com/artifact/net.ltgt.errorprone/net.ltgt.errorprone.gradle.plugin
errorPronePlugin = { id = "net.ltgt.errorprone", version.ref = "errorPronePlugin" }
Expand Down
19 changes: 19 additions & 0 deletions operator/src/main/docker/compose-devservices-test-pg15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
db:
image: postgres:15
command: "postgres -c checkpoint_timeout=10min -c fsync=off -c full_page_writes=off -c max_wal_size=2GB -c synchronous_commit=off"
tmpfs:
- /var/lib/postgresql/data:rw,async,noatime
healthcheck:
test: pg_isready -U root -d dummy
interval: 3s
timeout: 3s
retries: 3
ports:
- "5432"
labels:
io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dummy
19 changes: 19 additions & 0 deletions operator/src/main/docker/compose-devservices-test-pg16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
db:
image: postgres:16
command: "postgres -c checkpoint_timeout=10min -c fsync=off -c full_page_writes=off -c max_wal_size=2GB -c synchronous_commit=off"
tmpfs:
- /var/lib/postgresql/data:rw,async,noatime
healthcheck:
test: pg_isready -U root -d dummy
interval: 3s
timeout: 3s
retries: 3
ports:
- "5432"
labels:
io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dummy
19 changes: 19 additions & 0 deletions operator/src/main/docker/compose-devservices-test-pg17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
db:
image: postgres:17
command: "postgres -c checkpoint_timeout=10min -c fsync=off -c full_page_writes=off -c max_wal_size=2GB -c synchronous_commit=off"
tmpfs:
- /var/lib/postgresql/data:rw,async,noatime
healthcheck:
test: pg_isready -U root -d dummy
interval: 3s
timeout: 3s
retries: 3
ports:
- "5432"
labels:
io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dummy
19 changes: 19 additions & 0 deletions operator/src/main/docker/compose-devservices-test-pg18.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
db:
image: postgres:18
command: "postgres -c checkpoint_timeout=10min -c fsync=off -c full_page_writes=off -c max_wal_size=2GB -c synchronous_commit=off"
tmpfs:
- /var/lib/postgresql/18/docker:rw,async,noatime
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tmpfs path includes a version-specific directory '/var/lib/postgresql/18/docker' that differs from the standard PostgreSQL data directory path used in other versions. This inconsistency could lead to confusion. Consider using the standard '/var/lib/postgresql/data' path for consistency with pg15, pg16, and pg17 configurations.

Suggested change
- /var/lib/postgresql/18/docker:rw,async,noatime
- /var/lib/postgresql/data:rw,async,noatime

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

@ThoSap ThoSap Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is correct, see docker-library/postgres#1259

healthcheck:
test: pg_isready -U root -d dummy
interval: 3s
timeout: 3s
retries: 3
ports:
- "5432"
labels:
io.quarkus.devservices.compose.config_map.port.5432: quarkus.datasource.jdbc.port
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dummy
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public enum Privilege {
CREATE,
CONNECT,
TEMPORARY,
USAGE,
MAINTAIN;
USAGE;
//MAINTAIN; // PostgreSQL 17+

@JsonValue
public String toValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import static it.aboutbits.postgresql.core.Privilege.CREATE;
import static it.aboutbits.postgresql.core.Privilege.DELETE;
import static it.aboutbits.postgresql.core.Privilege.INSERT;
import static it.aboutbits.postgresql.core.Privilege.MAINTAIN;
import static it.aboutbits.postgresql.core.Privilege.REFERENCES;
import static it.aboutbits.postgresql.core.Privilege.SELECT;
import static it.aboutbits.postgresql.core.Privilege.TRIGGER;
Expand Down Expand Up @@ -48,8 +47,8 @@ public enum DefaultPrivilegeObjectType {
DELETE,
TRUNCATE,
REFERENCES,
TRIGGER,
MAINTAIN
TRIGGER
//MAINTAIN // PostgreSQL 17+
)
),
SEQUENCE(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public class DefaultPrivilegeSpec {
/// - `trigger`
/// - `create`
/// - `usage`
/// - `maintain`
@Required
@JsonFormat(with = JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_VALUES)
@ValidationRule(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import static it.aboutbits.postgresql.core.Privilege.CREATE;
import static it.aboutbits.postgresql.core.Privilege.DELETE;
import static it.aboutbits.postgresql.core.Privilege.INSERT;
import static it.aboutbits.postgresql.core.Privilege.MAINTAIN;
import static it.aboutbits.postgresql.core.Privilege.REFERENCES;
import static it.aboutbits.postgresql.core.Privilege.SELECT;
import static it.aboutbits.postgresql.core.Privilege.TEMPORARY;
Expand Down Expand Up @@ -55,8 +54,8 @@ public enum GrantObjectType {
DELETE,
TRUNCATE,
REFERENCES,
TRIGGER,
MAINTAIN
TRIGGER
//MAINTAIN // PostgreSQL 17+
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: Would this break the integration with 15 and 16 if it is not used?

Copy link
Copy Markdown
Contributor Author

@ThoSap ThoSap Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it would not break the integration if it is not used or tested against.

It currently fails as I added a grant all Grant/DefaultPrivileges step for the respective ObjectType in the tests, which then fails as follows in the code block below.

What I could do is retrieve the PostgreSQL major version from the jOOQ DSLContext and add a minimum optional/nullable PG major version to the Privilege enum constants, and then filter out privileges from the List/Set that do not satisfy the minimum database version.

// Returns the major version number (e.g., 17)
int majorVersion = dsl.connectionResult(connection -> 
    connection.getMetaData().getDatabaseMajorVersion()
);

// OR

// Returns an integer, e.g., 170000
Integer versionNum = dsl.fetchValue("show server_version_num", Integer.class);

// OR

// Returns short string, e.g., "17.0"
String version = dsl.fetchValue("show server_version", String.class);

    2026-01-26 08:40:30,201 DEBUG [org.jooq.tools.LoggerListener] (ReconcilerExecutor-defaultprivilegereconciler-196) Executing query          : alter default privileges for role "test-role-75yz5h1v0srm9acoof5a0czky5xru8lpkan2y2zxc894g74ixwcxk" in schema "test-schema-b9igbunxgzg18l95upbnwtasfq01m5tbanecrinm55rv2b27bpv" grant delete, insert, references, truncate, update, maintain, trigger on tables to "test-role-2y69entlxnrljru70a9at1lhq363ro4msi9c7b05omvjxl6lg39az"
    2026-01-26 08:40:30,206 DEBUG [org.jooq.tools.LoggerListener] (ReconcilerExecutor-defaultprivilegereconciler-196) Exception                : org.jooq.exception.DataAccessException: SQL [alter default privileges for role "test-role-75yz5h1v0srm9acoof5a0czky5xru8lpkan2y2zxc894g74ixwcxk" in schema "test-schema-b9igbunxgzg18l95upbnwtasfq01m5tbanecrinm55rv2b27bpv" grant delete, insert, references, truncate, update, maintain, trigger on tables to "test-role-2y69entlxnrljru70a9at1lhq363ro4msi9c7b05omvjxl6lg39az"]; ERROR: unrecognized privilege type "maintain"
    	at org.jooq_3.20.10.POSTGRES.debug(Unknown Source)
    	at org.jooq.impl.Tools.translate(Tools.java:3709)
    	at org.jooq.impl.Tools.translate(Tools.java:3685)
    	at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:869)
    	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:363)
    	at org.jooq.impl.Tools.attach(Tools.java:1735)
    	at org.jooq.impl.DefaultDSLContext.execute(DefaultDSLContext.java:5338)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeService.grant(DefaultPrivilegeService.java:110)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeReconciler.reconcileInTransaction(DefaultPrivilegeReconciler.java:232)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeReconciler.lambda$reconcile$0(DefaultPrivilegeReconciler.java:99)
    	at org.jooq.impl.DefaultDSLContext.lambda$transactionResult0$3(DefaultDSLContext.java:533)
    	at org.jooq.impl.Tools$3$1.block(Tools.java:6402)
    	at java.base/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4364)
    	at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:4310)
    	at org.jooq.impl.Tools$3.get(Tools.java:6399)
    	at org.jooq.impl.DefaultDSLContext.transactionResult0(DefaultDSLContext.java:581)
    	at org.jooq.impl.DefaultDSLContext.transactionResult(DefaultDSLContext.java:504)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeReconciler.reconcile(DefaultPrivilegeReconciler.java:98)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeReconciler.reconcile(DefaultPrivilegeReconciler.java:22)
    	at it.aboutbits.postgresql.crd.defaultprivilege.DefaultPrivilegeReconciler_ClientProxy.reconcile(Unknown Source)
    	at io.javaoperatorsdk.operator.processing.Controller$1.execute(Controller.java:161)
    	at io.javaoperatorsdk.operator.processing.Controller$1.execute(Controller.java:117)
    	at io.javaoperatorsdk.operator.monitoring.micrometer.MicrometerMetrics.lambda$timeControllerExecution$0(MicrometerMetrics.java:151)
    	at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:69)
    	at io.javaoperatorsdk.operator.monitoring.micrometer.MicrometerMetrics.timeControllerExecution(MicrometerMetrics.java:148)
    	at io.javaoperatorsdk.operator.processing.Controller.reconcile(Controller.java:116)
    	at io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.reconcileExecution(ReconciliationDispatcher.java:154)
    	at io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleReconcile(ReconciliationDispatcher.java:131)
    	at io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleDispatch(ReconciliationDispatcher.java:98)
    	at io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleExecution(ReconciliationDispatcher.java:69)
    	at io.javaoperatorsdk.operator.processing.event.EventProcessor$ReconcilerExecutor.run(EventProcessor.java:483)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    	at java.base/java.lang.Thread.run(Thread.java:1474)
    Caused by: org.postgresql.util.PSQLException: ERROR: unrecognized privilege type "maintain"
    	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2736)
    	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2421)
    	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)
    	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:525)
    	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:435)
    	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:357)
    	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:342)
    	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:318)
    	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:313)
    	at org.jooq.tools.jdbc.DefaultStatement.execute(DefaultStatement.java:102)
    	at org.jooq.impl.SettingsEnabledPreparedStatement.execute(SettingsEnabledPreparedStatement.java:227)
    	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:459)
    	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:349)
    	... 29 more
    2026-01-26 08:40:30,206 DEBUG [org.jooq.impl.DefaultConnectionProvider] (ReconcilerExecutor-defaultprivilegereconciler-196) rollback                 
    2026-01-26 08:40:30,207 DEBUG [org.jooq.impl.DefaultConnectionProvider] (ReconcilerExecutor-defaultprivilegereconciler-196) setting auto commit      : true
    2026-01-26 08:40:30,208 ERROR [it.aboutbits.postgresql.core.BaseReconciler] (ReconcilerExecutor-defaultprivilegereconciler-196) Failed to reconcile resource [resource=test-default-privilege-rc5qtair1jkf9ur5tkulnz5k60tb2cke5io6deom]: org.jooq.exception.DataAccessException: SQL [alter default privileges for role "test-role-75yz5h1v0srm9acoof5a0czky5xru8lpkan2y2zxc894g74ixwcxk" in schema "test-schema-b9igbunxgzg18l95upbnwtasfq01m5tbanecrinm55rv2b27bpv" grant delete, insert, references, truncate, update, maintain, trigger on tables to "test-role-2y69entlxnrljru70a9at1lhq363ro4msi9c7b05omvjxl6lg39az"]; ERROR: unrecognized privilege type "maintain"
    	at org.jooq_3.20.10.POSTGRES.debug(Unknown Source)
    	...

Copy link
Copy Markdown
Contributor Author

@ThoSap ThoSap Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now check for unsupported privileges and conditionally test these.

)
),
SEQUENCE(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public class GrantSpec {
/// - `connect`
/// - `temporary`
/// - `usage`
/// - `maintain`
@Required
@JsonFormat(with = JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_VALUES)
@ValidationRule(
Expand Down
Loading