k8sutil

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RecommendedConfigPathEnvVar = "KUBECONFIG"

RecommendedConfigPathEnvVar is a environment variable for path configuration

Variables

This section is empty.

Functions

func CascadeDeleteOptions

func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions

TODO(jlewi): CascadeDeletOptions are part of garbage collection policy. CascadeDeleteOptions deletes the workload after the grace period Do we want to use this? See https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/

func GetClusterConfig

func GetClusterConfig() (*rest.Config, error)

GetClusterConfig obtain the config from the Kube configuration used by kubeconfig, or from k8s cluster.

func IsKubernetesResourceAlreadyExistError

func IsKubernetesResourceAlreadyExistError(err error) bool

IsKubernetesResourceAlreadyExistError throws error when kubernetes resources already exist.

func IsKubernetesResourceNotFoundError

func IsKubernetesResourceNotFoundError(err error) bool

IsKubernetesResourceNotFoundError throws error when there is no kubernetes resource found.

func JobListOpt

func JobListOpt(clusterName string) metav1.ListOptions

JobListOpt returns a list of options after assigning the label selector for a given cluster name

func LabelsForJob

func LabelsForJob(jobName string) map[string]string

LabelsForJob returns map which stores the tf_job name and app label.

func MustNewKubeClient

func MustNewKubeClient() kubernetes.Interface

MustNewKubeClient returns new kubernetes client for cluster configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL