Skip to content

Commit

Permalink
Remove dependency on unsupported k8s.io/kubernetes library (flyteor…
Browse files Browse the repository at this point in the history
  • Loading branch information
katrogan authored Jan 22, 2024
1 parent 35de5b8 commit 79ed5ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ require (
k8s.io/api v0.24.1
k8s.io/apimachinery v0.24.1
k8s.io/client-go v0.24.1
k8s.io/kubernetes v1.13.0
sigs.k8s.io/yaml v1.3.0
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,6 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg=
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg=
k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8=
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
Expand Down
12 changes: 6 additions & 6 deletions pkg/sandbox/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/kubernetes/pkg/api/v1/pod"
)

const (
Expand Down Expand Up @@ -103,12 +102,13 @@ func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface
ready = 0
if total != 0 {
for _, v := range pods.Items {
// TODO (jeev): We should really be using
// `IsContainersReadyConditionTrue`, but that is not available until
// version v1.22.11. We are on v1.13.0 for some reason.
if pod.IsPodReadyConditionTrue(v.Status) {
ready++
for _, condition := range v.Status.Conditions {
if string(condition.Type) == string(corev1api.PodReady) && condition.Status == corev1api.ConditionTrue {
ready++
break
}
}

if len(v.Status.Conditions) > 0 {
table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()})
}
Expand Down

0 comments on commit 79ed5ce

Please sign in to comment.