Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup unused functions #827

Merged
merged 1 commit into from
Sep 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions pkg/util/k8sutil/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ import (
log "github.com/sirupsen/logrus"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // for gcp auth
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

tfv1alpha1 "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1alpha1"
)

// RecommendedConfigPathEnvVar is a environment variable for path configuration
Expand Down Expand Up @@ -85,22 +82,6 @@ func IsKubernetesResourceNotFoundError(err error) bool {
return apierrors.IsNotFound(err)
}

// JobListOpt returns a list of options after assigning the label selector for a given cluster name
func JobListOpt(clusterName string) metav1.ListOptions {
return metav1.ListOptions{
LabelSelector: labels.SelectorFromSet(LabelsForJob(clusterName)).String(),
}
}

// LabelsForJob returns map which stores the tf_job name and app label.
func LabelsForJob(jobName string) map[string]string {
return map[string]string{
// TODO(jlewi): Need to set appropriate labels for TF.
"tf_job": jobName,
"app": tfv1alpha1.AppLabel,
}
}

// TODO(jlewi): CascadeDeletOptions are part of garbage collection policy.
// CascadeDeleteOptions deletes the workload after the grace period
// Do we want to use this? See
Expand Down