Documentation
¶
Index ¶
- Variables
- func DetectClusterType(config KubeConfig, apiResources []string) types.ClusterType
- func GetAutoDetectedClusterType() types.ClusterType
- func GetCurrentContext() string
- func GetStackroxRepositoryTag(log *logger.Logger) (string, error)
- func Initialize(log *logger.Logger) error
- func IsInStackroxRepository(log *logger.Logger) bool
- type KubeCluster
- type KubeConfig
Constants ¶
This section is empty.
Variables ¶
var ( RunningInRoxieContainer bool RunningInteractively bool )
Functions ¶
func DetectClusterType ¶
func DetectClusterType(config KubeConfig, apiResources []string) types.ClusterType
DetectClusterType implements the cluster type detection logic This function is pure and testable - it doesn't invoke kubectl itself
func GetAutoDetectedClusterType ¶ added in v0.4.1
func GetAutoDetectedClusterType() types.ClusterType
GetAutoDetectedClusterType returns the current cluster type, initializing if needed
func GetCurrentContext ¶
func GetCurrentContext() string
GetCurrentContext returns the current kubectl context, initializing if needed
func Initialize ¶
Initialize performs environment initialization and sets the global variables. Retries on failure to handle race conditions during container startup, which I have observed in relation with podman :U mounts: the container was starting before the gcloud config was writable by the container user, hence GKE authentication failed immediately.
func IsInStackroxRepository ¶
Types ¶
type KubeCluster ¶
KubeCluster represents a cluster in the kubectl configuration
type KubeConfig ¶
type KubeConfig struct {
CurrentContext string
Clusters []KubeCluster
}
KubeConfig represents a simplified kubectl configuration