Skip to content

Commit 1e85587

Browse files
jkatzJonathan S. Katz
authored andcommitted
Ensure pgBouncer resource limits can be set on create
This only affects the `pgo create pgbouncer` command; the resource limits were not being set in the custom resource from the API. However, this functionally works correctly if set directly on the custom resource. Issue: [sc-13146]
1 parent ebdfe63 commit 1e85587

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmd/pgo/cmd/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ func init() {
530530
// pgo create pgbouncer
531531
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPURequest, "cpu", "", "Set the number of millicores to request for CPU "+
532532
"for pgBouncer. Defaults to being unset.")
533-
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to request for CPU "+
533+
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to limit for CPU "+
534534
"for pgBouncer.")
535535
createPgbouncerCmd.Flags().StringVar(&PgBouncerMemoryRequest, "memory", "", "Set the amount of memory to request for "+
536536
"pgBouncer. Defaults to server value (24Mi).")

internal/apiserver/pgbouncerservice/pgbouncerimpl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func CreatePgbouncer(request *msgs.CreatePgbouncerRequest, ns, pgouser string) m
149149
}
150150

151151
cluster.Spec.PgBouncer.Resources = resources
152+
cluster.Spec.PgBouncer.Limits = limits
152153
cluster.Spec.PgBouncer.TLSSecret = request.TLSSecret
153154

154155
// update the cluster CRD with these udpates. If there is an error

0 commit comments

Comments
 (0)