Skip to content

Commit 0d739ef

Browse files
authored
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 d98e790 commit 0d739ef

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
@@ -556,7 +556,7 @@ func init() {
556556
// pgo create pgbouncer
557557
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPURequest, "cpu", "", "Set the number of millicores to request for CPU "+
558558
"for pgBouncer. Defaults to being unset.")
559-
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to request for CPU "+
559+
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to limit for CPU "+
560560
"for pgBouncer.")
561561
createPgbouncerCmd.Flags().StringVar(&PgBouncerMemoryRequest, "memory", "", "Set the amount of memory to request for "+
562562
"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)