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

clair: limit db connections pool (PROJQUAY-2659) #722

Merged
merged 1 commit into from Jun 24, 2022
Merged

clair: limit db connections pool (PROJQUAY-2659) #722

merged 1 commit into from Jun 24, 2022

Conversation

ricardomaraschini
Copy link
Contributor

Restrict the max number of open connections to the clair postgres. If
HPA is managed we have control over the max number of pods so we can
calculate the max number of connections per pod. If HPA is not managed
then we can't properly estimate the max number of pods so we decrease
the connection pool size.

Restrict the max number of open connections to the clair postgres. If
HPA is managed we have control over the max number of pods so we can
calculate the max number of connections per pod. If HPA is not managed
then we can't properly estimate the max number of pods so we decrease
the connection pool size.
@ricardomaraschini
Copy link
Contributor Author

/cherry-pick redhat-3.7

@openshift-cherrypick-robot

@ricardomaraschini: once the present PR merges, I will cherry-pick it on top of redhat-3.7 in a new PR and assign it to you.

In response to this:

/cherry-pick redhat-3.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -406,9 +416,8 @@ func clairConfigFor(log logr.Logger, quay *v1.QuayRegistry, quayHostname, preSha
"migrations": true,
},
"matcher": map[string]interface{}{
"connstring": dbConn,
"max_conn_pool": 100,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we decide what should be in this map and what should be in the connstring string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quay/clair should be able to shine some light here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clair's config is documented (via the go types) here. In this specific instance, we deprecated the dedicated connection pool size to make it uniformly specified in the connection string.

@openshift-cherrypick-robot

@ricardomaraschini: new pull request created: #723

In response to this:

/cherry-pick redhat-3.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants