Skip to content
Merged
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
2 changes: 2 additions & 0 deletions api/v1/postgres_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ type Backup struct {
type Size struct {
// CPU is in the format as pod.spec.resource.request.cpu
CPU string `json:"cpu,omitempty"`
// Memory is in the format as pod.spec.resource.request.memory
Memory string `json:"memory,omitempty"`
// SharedBuffer of the database
SharedBuffer string `json:"sharedBuffer,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/database.fits.cloud_postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ spec:
cpu:
description: CPU is in the format as pod.spec.resource.request.cpu
type: string
memory:
description: Memory is in the format as pod.spec.resource.request.memory
type: string
sharedBuffer:
description: SharedBuffer of the database
type: string
Expand Down
1 change: 1 addition & 0 deletions controllers/postgres_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ func patchRawZ(out *zalando.Postgresql, in *pg.Postgres) {
out.Spec.PostgresqlParam.PgVersion = in.Spec.Version

out.Spec.ResourceRequests.CPU = in.Spec.Size.CPU
out.Spec.ResourceRequests.Memory = in.Spec.Size.Memory

// todo: Check if the validation should be performed here.
out.Spec.Volume.Size = in.Spec.Size.StorageSize
Expand Down