1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Refactor to adopt k8s standardized Condition type

Updates to use metav1.Condition type and removes references for
deprecated corev1.Condition* constants and uses the new k8s api/meta
helpers in place of the old pkg/apis/meta types.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
This commit is contained in:
Aurel Canciu
2020-11-17 16:48:29 +02:00
parent 3047b25193
commit 2a789ec705
24 changed files with 111 additions and 120 deletions

View File

@@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/api/errors"
apimeta "k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
@@ -243,6 +244,6 @@ func isHelmReleaseReady(ctx context.Context, kubeClient client.Client,
return false, nil
}
return meta.HasReadyCondition(helmRelease.Status.Conditions), nil
return apimeta.IsStatusConditionTrue(helmRelease.Status.Conditions, meta.ReadyCondition), nil
}
}