Update Kubernetes packages to v1.24.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2022-05-31 13:00:16 +03:00
parent 560f884cc0
commit bfcf288561
5 changed files with 232 additions and 109 deletions
@@ -157,6 +157,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.UserAgent == "" {
configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent()
}
// share the transport between all clients
httpClient, err := rest.HTTPClientFor(&configShallowCopy)
if err != nil {
+2 -1
View File
@@ -54,7 +54,8 @@ func TestTaskNGrinder(t *testing.T) {
"pollInterval": "1s",
}, canary, logger)
require.NoError(t, err, "Failed to create ngrinder task")
ctx, _ := context.WithTimeout(context.Background(), time.Second*3)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*3)
defer cancel()
task.Run(ctx)
<-ctx.Done()
})