Skip to content

Conversation

@mploski
Copy link
Collaborator

@mploski mploski commented Feb 9, 2026

Description

Adds the database CRD and validation

Key Changes

Highlight the updates in specific files

Testing and Verification

Added few validation yaml files to examples

Related Issues

Jira tickets, GitHub issues, Support tickets...

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@mploski mploski force-pushed the feature/postgresql-logical-db-controller branch 4 times, most recently from 9fc0e2f to f952cc6 Compare February 9, 2026 11:31
@mploski mploski marked this pull request as draft February 9, 2026 11:32
@mploski mploski force-pushed the feature/postgresql-logical-db-controller branch 3 times, most recently from 5ece4ee to 32e546e Compare February 9, 2026 11:39
@mploski mploski force-pushed the feature/postgresql-logical-db-controller branch from 32e546e to 91c8825 Compare February 9, 2026 11:40
)

// DatabaseSpec defines the desired state of Database.
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.clusterRef) || self.clusterRef == oldSelf.clusterRef",message="clusterRef is immutable"

Choose a reason for hiding this comment

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

nit: !has(oldSelf.clusterRef) is always true, as ClusterRef is Required

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is not when it is first deployment not update

Choose a reason for hiding this comment

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

"A rule that contains an expression referencing the identifier oldSelf is implicitly considered a transition rule. [...] Transition rules never apply to create operations." Source: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#transition-rules

Based on that, this rule is not running on the first deployment, as there is no oldSelf that could be used at all.

@limak9182 limak9182 marked this pull request as ready for review February 9, 2026 12:55
@limak9182 limak9182 marked this pull request as draft February 9, 2026 12:56
@DmytroPI-dev DmytroPI-dev marked this pull request as ready for review February 9, 2026 13:30
@DmytroPI-dev
Copy link

DmytroPI-dev commented Feb 9, 2026

LGTM!

@mploski mploski merged commit dc4758e into feature/database-controllers Feb 10, 2026
9 of 16 checks passed
@mploski mploski deleted the feature/postgresql-logical-db-controller branch February 10, 2026 15:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants