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

refactor: improve instrumented clients code and support dynamic/metadata client #5428

Merged
merged 16 commits into from
Nov 22, 2022

Conversation

eddycharly
Copy link
Member

@eddycharly eddycharly commented Nov 21, 2022

Explanation

This PR improve instrumented clients code:

  • split files generated files for clientset, client and resource

It also adds support for dynamic and metadata client.

eddycharly and others added 6 commits November 20, 2022 22:46
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #5428 (23fef98) into main (28619ce) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #5428   +/-   ##
=======================================
  Coverage   36.43%   36.44%           
=======================================
  Files         171      171           
  Lines       19104    19102    -2     
=======================================
  Hits         6961     6961           
+ Misses      11345    11343    -2     
  Partials      798      798           
Impacted Files Coverage Δ
pkg/clients/dclient/client.go 45.21% <0.00%> (+0.77%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@eddycharly eddycharly changed the title Instrumented client 4 refactor: improve instrumented clients code and support dynamic client Nov 21, 2022
@eddycharly eddycharly added this to the Kyverno Release 1.9.0 milestone Nov 21, 2022
@eddycharly eddycharly marked this pull request as ready for review November 21, 2022 17:22
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@eddycharly eddycharly changed the title refactor: improve instrumented clients code and support dynamic client refactor: improve instrumented clients code and support dynamic/metadata client Nov 21, 2022
@eddycharly eddycharly enabled auto-merge (squash) November 22, 2022 08:51
@realshuting realshuting self-assigned this Nov 22, 2022
logger = logger.WithName("kyverno-client")
logger.Info("create kyverno client...", "kubeconfig", kubeconfig, "qps", clientRateLimitQPS, "burst", clientRateLimitBurst)
client, err := kyverno.NewForConfig(CreateClientConfig(logger), opts...)
checkError(logger, err, "failed to create kubernetes client")
Copy link
Member

Choose a reason for hiding this comment

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

.."failed to create kyverno client"..

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, will fix in the next PR !

@eddycharly eddycharly merged commit 447360c into kyverno:main Nov 22, 2022
@eddycharly eddycharly deleted the instrumented-client-4 branch November 22, 2022 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants