From a61a35240e3e99af8386605de8cdbd9564051d2f Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Mon, 23 Dec 2024 22:55:09 +0000 Subject: [PATCH] understand it better Signed-off-by: Austin Abro --- pkg/kube/client.go | 1 + pkg/kube/interface.go | 1 + pkg/kube/kready.go | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 pkg/kube/kready.go diff --git a/pkg/kube/client.go b/pkg/kube/client.go index a25a6fcc3..b38b4b094 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -301,6 +301,7 @@ func (c *Client) Wait(resources ResourceList, timeout time.Duration) error { // log: c.Log, // timeout: timeout, // } + // w.waitForResources() cfg, err := c.Factory.ToRESTConfig() if err != nil { return err diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go index ce42ed950..af3823a3e 100644 --- a/pkg/kube/interface.go +++ b/pkg/kube/interface.go @@ -33,6 +33,7 @@ type Interface interface { Create(resources ResourceList) (*Result, error) // Wait waits up to the given timeout for the specified resources to be ready. + // TODO introduce another interface for the waiting of the KubeClient Wait(resources ResourceList, timeout time.Duration) error // WaitWithJobs wait up to the given timeout for the specified resources to be ready, including jobs. diff --git a/pkg/kube/kready.go b/pkg/kube/kready.go new file mode 100644 index 000000000..0752ba481 --- /dev/null +++ b/pkg/kube/kready.go @@ -0,0 +1,18 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kube // import "helm.sh/helm/v3/pkg/kube" +