features

package
v0.0.0-...-1adad1f Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (

	Author = `
DevOps Corner Indonesia (devopscorner.id)
https://github.com/devopscorner/k8s-context
Apache v2.0 License`
	AppName = "K8S-CONTEXT (K8C)"
	VERSION = "v1.1.9"
)

Variables

This section is empty.

Functions

func BoolToString

func BoolToString(value corev1.ConditionStatus) string

func ByteCountSI

func ByteCountSI(b int64) string

func CalculateReadiness

func CalculateReadiness(pod *corev1.Pod) (int, int)

func ChangeKubeconfigContext

func ChangeKubeconfigContext(kubeconfigPath string, contextName string) error

func DescribeNode

func DescribeNode(node *corev1.Node)

func DescribeNodeTable

func DescribeNodeTable(node *corev1.Node)

func DescribePods

func DescribePods(pod *corev1.Pod)

func DescribePodsDetail

func DescribePodsDetail(pod *corev1.Pod)

func GetClientSet

func GetClientSet(kubeconfig string) (*kubernetes.Clientset, error)

func GetCommands

func GetCommands() []*cobra.Command

func GetContainerImages

func GetContainerImages(pod *corev1.Pod) []string

func GetContainerStatus

func GetContainerStatus(pod *corev1.Pod, containerName string) *corev1.ContainerStatus

func GetCurrentContext

func GetCurrentContext(config *clientcmdapi.Config) (string, error)

func GetFreePort

func GetFreePort() (int, error)

func GetLabels

func GetLabels(pod *corev1.Pod) []string

func GetOwnerKindAndName

func GetOwnerKindAndName(pod *corev1.Pod) (string, string)

func GetPod

func GetPod(namespace string, name string) (*corev1.Pod, error)

func HumanReadableDuration

func HumanReadableDuration(duration time.Duration) string

func InitConfig

func InitConfig() error

func ListContexts

func ListContexts(kc *KubeConfig) error

func MergeConfigs

func MergeConfigs(configs []*clientcmdapi.Config) (*clientcmdapi.Config, error)

func SelectedConfig

func SelectedConfig(contextNames []string, config *clientcmdapi.Config) error

func ShowContext

func ShowContext(kc *KubeConfig) error

func ShowDeploymentByFilter

func ShowDeploymentByFilter(deployments *v1.DeploymentList)

func ShowDetailList

func ShowDetailList(config *clientcmdapi.Config) error

func ShowEndpointByFilter

func ShowEndpointByFilter(endpoints *corev1.EndpointsList)

func ShowNamespaceByFilter

func ShowNamespaceByFilter(namespaces *corev1.NamespaceList)

func ShowPodsByFilter

func ShowPodsByFilter(pods *corev1.PodList)

func ShowServiceByFilter

func ShowServiceByFilter(services *corev1.ServiceList)

Types

type KubeConfig

type KubeConfig struct {
	Files     []string
	Merged    *clientcmdapi.Config
	Overwrite bool
}

func (*KubeConfig) Load

func (kc *KubeConfig) Load() error

func (*KubeConfig) SaveToFile

func (kc *KubeConfig) SaveToFile(file string) error

Jump to

Keyboard shortcuts

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