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

Updated QPS and Burst capacity for k8s client #482

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

abheda-crest
Copy link
Collaborator

@abheda-crest abheda-crest commented Nov 8, 2024

The PR focuses on updating QPS and Burst capacity for k8s client to handle a higher frequency of SA token retrieval. These configurations are now set via environment variables in deployment config, providing flexibility for adjusting values as per requirement. Additionally, the load test has been updated to reflect these changes.

Related to: #198 & #383

Example (deploy/provider-gcp-plugin.yaml):

          env:
            - name: TARGET_DIR
              value: "/etc/kubernetes/secrets-store-csi-providers"
            - name: K8S_CLIENT_QPS
              value: "20.0"
            - name: K8S_CLIENT_BURST
              value: "50"

Tested in the GKE environment across various configurations demonstrated successful scaling under moderate loads.
For ~100 secrets, the GKE environment remained stable across all tested pod and node configurations, supporting ~300 pods without issues.

main.go Outdated
@@ -61,8 +61,9 @@ var (
_ = flag.Bool("write_secrets", false, "[unused]")
smConnectionPoolSize = flag.Int("sm_connection_pool_size", 5, "size of the connection pool for the secret manager API client")
iamConnectionPoolSize = flag.Int("iam_connection_pool_size", 5, "size of the connection pool for the IAM API client")

version = "dev"
QPS = float32(20.0)
Copy link
Member

Choose a reason for hiding this comment

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

should we take this from the deployment config ?
same for other

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Accepting QPS and Burst values from the deployment configuration seems like a good approach, as it offers more flexibility for updates when necessary. There are two options I’m considering for retrieving these values from the config:

  • Passing QPS and Burst as environment variables in the DaemonSet at deploy/provider-gcp-plugin.yaml.
  • Specifying QPS and Burst as parameters within the SecretProviderClass for the GCP provider.

Please let me know which approach you think is preferable.

Copy link
Member

Choose a reason for hiding this comment

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

deploy/provider-gcp-plugin.yaml seems to be a good option. Also I think default behaviour should be the existing values (default values).
@amitmodak WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to configure QPS and Burst from values provided in environment variable in deployment config.

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

Successfully merging this pull request may close these issues.

2 participants