Documentation
¶
Overview ¶
Copyright 2024 Defense Unicorns SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial Package k8s contains k8s client logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerCheck = func(k8sClient *Clients) error {
_, err := k8sClient.Clientset.ServerVersion()
return err
}
Functions ¶
func CurrentContext ¶ added in v0.9.0
CurrentContext returns the current context defined in the kubeconfig
func IsRunningInCluster ¶
IsRunningInCluster checks if the application is running in cluster
func ServeClusters ¶ added in v0.9.0
func ServeClusters(inCluster bool, currentContext string) http.HandlerFunc
Types ¶
type Clients ¶
type Clients struct {
Clientset *kubernetes.Clientset
MetricsClient *metricsv.Clientset
Config *rest.Config
}
Clients holds the various Kubernetes clients
type ClusterInfo ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.