Documentation ¶
Index ¶
- func CfgFromContext(ctx context.Context) *rest.Config
- func GetCurrentNamespace() (string, error)
- func GetInClusterKubeClient() (*kubernetes.Clientset, error)
- func GetKubeConfig(dir string) (*rest.Config, error)
- func KubernetesCSFromContext(ctx context.Context) *kubernetes.Clientset
- func WithContext(ctx context.Context) context.Context
- type ContainerSpec
- type EnvFrom
- type JobSpec
- type KV
- type PodSpec
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfgFromContext ¶
FromContext returns the config stored in context.
func GetCurrentNamespace ¶
GetCurrentNamespace returns the namespace where the pod is running
func GetInClusterKubeClient ¶
func GetInClusterKubeClient() (*kubernetes.Clientset, error)
GetInClusterKubeClient returns the client set for incluster config
func GetKubeConfig ¶
GetKubeConfig returns rest config for the give kube config directory if directory input is not given its taken from KUBE_CONFIG_DIR env variable if that variable is not present incluster config is considered
func KubernetesCSFromContext ¶
func KubernetesCSFromContext(ctx context.Context) *kubernetes.Clientset
FromContext returns the kubernetes client set stored in context.
Types ¶
type ContainerSpec ¶
type ContainerSpec struct { Image string Port int32 Name string Resources []Resource Secrets []corev1.VolumeMount ConfigMaps []corev1.VolumeMount EnvVariables []corev1.EnvVar User int64 EnvFromSecretorCM []EnvFrom Cmd []string ServiceAccount string }
ContainerSpec - kubernetes core/v1/container
type PodSpec ¶
type PodSpec struct {
Containers []ContainerSpec
}
ContainerSpec - kubernetes core/v1/pod
Click to show internal directories.
Click to hide internal directories.