Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serverRef -> databaseRef for pgbouncerOps & publisher & subscriber #1318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions apis/ops/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/ops/v1alpha1/pgbouncer_ops_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (p *PgBouncerOpsRequest) GetObjectMeta() metav1.ObjectMeta {
}

func (p *PgBouncerOpsRequest) GetDBRefName() string {
return p.Spec.ServerRef.Name
return p.Spec.DatabaseRef.Name
}

func (p *PgBouncerOpsRequest) GetRequestType() any {
Expand Down
2 changes: 1 addition & 1 deletion apis/ops/v1alpha1/pgbouncer_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type PgBouncerOpsRequest struct {
// PgBouncerOpsRequestSpec is the spec for PgBouncerOpsRequest
type PgBouncerOpsRequestSpec struct {
// Specifies the PgBouncer reference
ServerRef core.LocalObjectReference `json:"serverRef"`
DatabaseRef core.LocalObjectReference `json:"databaseRef"`
// Specifies the ops request type: Upgrade, HorizontalScaling, VerticalScaling etc.
Type PgBouncerOpsRequestType `json:"type"`
// Specifies information necessary for upgrading PgBouncer
Expand Down
2 changes: 1 addition & 1 deletion apis/ops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions apis/postgres/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/postgres/v1alpha1/publisher_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type PublisherSpec struct {
// Name of the publisher
Name string `json:"name"`
// ServerRef specifies the database appbinding reference in any namespace.
ServerRef core.LocalObjectReference `json:"serverRef"`
DatabaseRef core.LocalObjectReference `json:"databaseRef"`
// DatabaseName is the name of the target database inside a Postgres instance.
DatabaseName string `json:"databaseName"`
// PublishAllTables is the option to publish all tables in the database
Expand Down
2 changes: 1 addition & 1 deletion apis/postgres/v1alpha1/subscriber_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type SubscriberSpec struct {
// Name of the publisher
Name string `json:"name"`
// ServerRef specifies the database appbinding reference in any namespace.
ServerRef core.LocalObjectReference `json:"serverRef"`
DatabaseRef core.LocalObjectReference `json:"databaseRef"`
// DatabaseName is the name of the target database inside a Postgres instance.
DatabaseName string `json:"databaseName"`
// Parameters to set while creating subscriber
Expand Down
4 changes: 2 additions & 2 deletions apis/postgres/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions crds/ops.kubedb.com_pgbounceropsrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ spec:
required:
- pgbouncer
type: object
databaseRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
horizontalScaling:
properties:
replicas:
Expand All @@ -77,13 +84,6 @@ spec:
type: object
restart:
type: object
serverRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
timeout:
type: string
tls:
Expand Down Expand Up @@ -287,7 +287,7 @@ spec:
type: object
type: object
required:
- serverRef
- databaseRef
- type
type: object
status:
Expand Down
16 changes: 8 additions & 8 deletions crds/postgres.kubedb.com_publishers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ spec:
type: object
databaseName:
type: string
databaseRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
deletionPolicy:
default: Delete
enum:
Expand All @@ -137,21 +144,14 @@ spec:
type: object
publishAllTables:
type: boolean
serverRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
tables:
items:
type: string
type: array
required:
- databaseName
- databaseRef
- name
- serverRef
type: object
status:
properties:
Expand Down
16 changes: 8 additions & 8 deletions crds/postgres.kubedb.com_subscribers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ spec:
properties:
databaseName:
type: string
databaseRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
deletionPolicy:
default: Delete
enum:
Expand Down Expand Up @@ -113,18 +120,11 @@ spec:
- refs
type: object
type: object
serverRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
required:
- databaseName
- databaseRef
- name
- publisher
- serverRef
type: object
status:
properties:
Expand Down
Loading