Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 79ed5ce

Browse files
authored
Remove dependency on unsupported k8s.io/kubernetes library (#457)
1 parent 35de5b8 commit 79ed5ce

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ require (
4343
k8s.io/api v0.24.1
4444
k8s.io/apimachinery v0.24.1
4545
k8s.io/client-go v0.24.1
46-
k8s.io/kubernetes v1.13.0
4746
sigs.k8s.io/yaml v1.3.0
4847
)
4948

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,8 +1429,6 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG
14291429
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
14301430
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg=
14311431
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg=
1432-
k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8=
1433-
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
14341432
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
14351433
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
14361434
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=

pkg/sandbox/start.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
3030
"k8s.io/client-go/tools/clientcmd"
31-
"k8s.io/kubernetes/pkg/api/v1/pod"
3231
)
3332

3433
const (
@@ -103,12 +102,13 @@ func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface
103102
ready = 0
104103
if total != 0 {
105104
for _, v := range pods.Items {
106-
// TODO (jeev): We should really be using
107-
// `IsContainersReadyConditionTrue`, but that is not available until
108-
// version v1.22.11. We are on v1.13.0 for some reason.
109-
if pod.IsPodReadyConditionTrue(v.Status) {
110-
ready++
105+
for _, condition := range v.Status.Conditions {
106+
if string(condition.Type) == string(corev1api.PodReady) && condition.Status == corev1api.ConditionTrue {
107+
ready++
108+
break
109+
}
111110
}
111+
112112
if len(v.Status.Conditions) > 0 {
113113
table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()})
114114
}

0 commit comments

Comments
 (0)