Skip to content

Commit d6c0535

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 3cea12a commit d6c0535

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/apiserver/pgbouncerservice/pgbouncerimpl.go

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

132132
cluster.Spec.PgBouncer.Resources = resources
133+
cluster.Spec.PgBouncer.Limits = limits
133134

134135
// update the cluster CRD with these udpates. If there is an error
135136
if _, err := apiserver.Clientset.CrunchydataV1().Pgclusters(request.Namespace).Update(&cluster); err != nil {

pgo/cmd/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func init() {
496496
// pgo create pgbouncer
497497
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPURequest, "cpu", "", "Set the number of millicores to request for CPU "+
498498
"for pgBouncer. Defaults to being unset.")
499-
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to request for CPU "+
499+
createPgbouncerCmd.Flags().StringVar(&PgBouncerCPULimit, "cpu-limit", "", "Set the number of millicores to limit for CPU "+
500500
"for pgBouncer.")
501501
createPgbouncerCmd.Flags().StringVar(&PgBouncerMemoryRequest, "memory", "", "Set the amount of memory to request for "+
502502
"pgBouncer. Defaults to server value (24Mi).")

0 commit comments

Comments
 (0)