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

Add k8s client tuning settings to Provider #1748

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

lblackstone
Copy link
Member

Proposed changes

  • Provide options to configure burst and QPS
  • Configure the provider client to use these settings

Related issues (optional)

Fix #1704

@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

2 similar comments
@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@@ -1,4 +1,4 @@
// Copyright 2016-2020, Pulumi Corporation.
// Copyright 2016-2021, Pulumi Corporation.
Copy link
Member Author

Choose a reason for hiding this comment

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

You can ignore most of the changes in this file. I refactored the declaration into separate variables, but it's not a functional change.

"devel": {
TypeSpec: pschema.TypeSpec{
Type: "boolean",
var kubeClientSettings = pschema.ComplexTypeSpec{
Copy link
Member Author

Choose a reason for hiding this comment

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

Here's the new type.

@@ -231,6 +241,7 @@ func PulumiSchema(swagger map[string]interface{}) pschema.PackageSpec {

csharpNamespaces := map[string]string{
"helm.sh/v3": "Helm.V3",
"": "Provider",
Copy link
Contributor

Choose a reason for hiding this comment

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

A little confused why this was needed? I see that Provider.cs already existed right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't get the C# SDK to generate correctly without that. The compatibility logic is causing problems without it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a tracking bug for this in codegen?

@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

- Provide options to configure burst and QPS
- Configure the provider client to use these settings
@github-actions
Copy link

github-actions bot commented Oct 4, 2021

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@lblackstone lblackstone merged commit f229421 into master Oct 4, 2021
@pulumi-bot pulumi-bot deleted the lblackstone/k8s-client-tuning branch October 4, 2021 17:03
@AaronFriel
Copy link
Member

@lukehoban @viveklak it looks like the provider codegen for Node.js doesn't handle the nested object and I am not familiar enough with the codegen to understand what would need to change.

Discovered as I investigated why the env var did not have any impact on pulumi up or pulumi destroy timing or the throttling messages we observed.

@lblackstone
Copy link
Member Author

@lukehoban @viveklak it looks like the provider codegen for Node.js doesn't handle the nested object and I am not familiar enough with the codegen to understand what would need to change.

Discovered as I investigated why the env var did not have any impact on pulumi up or pulumi destroy timing or the throttling messages we observed.

Oh, I see the problem. I filed pulumi/pulumi#8132 after finishing this PR, and forgot to update it. The Node SDK isn't handling the env vars properly, so it will only work with a stack config or arguments to a Provider. https://github.com/pulumi/pulumi-kubernetes/blob/master/CHANGELOG.md#380-october-6-2021 has notes on setting nested Provider values that would be similar.

I'll get the env vars fixed soon, but you can test it in the meantime with the other options.

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.

Configurable Kubernetes Client Throttling/Rate Limiting
3 participants