K8SPG-1056 Add distribution field to version service API#542
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the VersionService API surface to accept a new distribution query parameter (intended to distinguish PostgreSQL “percona” vs “community”), and regenerates protobuf/OpenAPI artifacts accordingly.
Changes:
- Added
distributiontoApplyRequest,OperatorRequest, andProductRequestinapi/version.proto(and regenerated Go protobuf output). - Updated generated OpenAPI specs to include
distributionas an optional query parameter on the Apply/Operator/Product endpoints. - Updated Buf dependency lockfile to newer dep commits/digests.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| versionpb/api/version.pb.go | Regenerated protobuf Go output; adds distribution fields/getters and updates generator output format. |
| api/version.proto | Adds distribution field to the three request messages that back the VersionService endpoints. |
| api/version.swagger.yaml | Adds distribution query param to the OpenAPI spec for Apply/Operator/Product endpoints (generated copy). |
| third_party/OpenAPI/api/version.swagger.yaml | Same OpenAPI updates as api/version.swagger.yaml (source-of-truth generated output). |
| buf.lock | Updates Buf dependency pins (googleapis + grpc-gateway). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
151
to
155
| bool role_management_enabled = 27; | ||
| bool mcs_enabled = 28; | ||
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30; | ||
| } |
Comment on lines
181
to
186
| bool user_management_enabled = 26; | ||
| bool role_management_enabled = 27; | ||
| bool mcs_enabled = 28; | ||
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30; | ||
| } |
Comment on lines
+208
to
+211
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Comment on lines
+342
to
+345
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Comment on lines
+480
to
+483
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Comment on lines
+208
to
+211
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Comment on lines
+342
to
+345
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Comment on lines
+480
to
+483
| - name: distribution | ||
| in: query | ||
| required: false | ||
| type: string |
Contributor
|
Add a distribution query parameter to the VersionService Apply,
Operator, and Product endpoints to track which PostgreSQL distribution
("percona" or "community") is running, following the same pattern as
the existing platform field.
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30 [ | ||
| (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)." |
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30 [ | ||
| (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)." |
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30 [ | ||
| (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)." |
Contributor
|
| required: false | ||
| type: boolean | ||
| - name: distribution | ||
| description: PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet). |
| required: false | ||
| type: boolean | ||
| - name: distribution | ||
| description: PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet). |
Comment on lines
+122
to
+126
| string distribution = 30 [ | ||
| (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)." | ||
| enum: ["", "percona", "community"] | ||
| } |
| bool volume_expansion_enabled = 29; | ||
| string distribution = 30 [ | ||
| (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)." |
egegunes
approved these changes
Jul 1, 2026
gkech
approved these changes
Jul 1, 2026
Contributor
|
just for reference, the related pr: percona/percona-postgresql-operator#1664 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a distribution query parameter to the VersionService Apply endpoint to track which PostgreSQL distribution ("percona" or "community") is running, following the same pattern as the existing platform field.