utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKubeConfigFromToken

func GenerateKubeConfigFromToken(serverURL, token string, caCert []byte, flowRate int) (*rest.Config, error)

GenerateKubeConfigFromToken composes a kubeconfig from token

func GracefulStopWithContext

func GracefulStopWithContext() context.Context

GracefulStopWithContext registered for SIGTERM and SIGINT with a cancel context returned. When one of these signals get caught, the returned context's channel will be closed. If a second signal is caught, then the program is terminated with exit code 1.

func LoadsKubeConfig

func LoadsKubeConfig(kubeConfigPath string, flowRate int) (*rest.Config, error)

LoadsKubeConfig tries to load kubeconfig from specified kubeconfig file or in-cluster config

func WordSepNormalizeFunc

func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName

WordSepNormalizeFunc changes all flags with separators from "_" to "-"

Types

This section is empty.

Jump to

Keyboard shortcuts

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