kube

package
v1.219.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClusterConfig

func BuildClusterConfig(info *awsCloud.EKSClusterInfo, alias, identityName string) *clientcmdapi.Config

BuildClusterConfig creates a kubeconfig api.Config for a single EKS cluster.

func DefaultKubeconfigPath

func DefaultKubeconfigPath() (string, error)

DefaultKubeconfigPath returns the XDG-compliant default kubeconfig path. Returns ~/.config/atmos/kube/config.

Types

type KubeconfigManager

type KubeconfigManager struct {
	// contains filtered or unexported fields
}

KubeconfigManager manages kubeconfig files for EKS clusters.

func NewKubeconfigManager

func NewKubeconfigManager(customPath, modeStr string) (*KubeconfigManager, error)

NewKubeconfigManager creates a manager with the given path and permissions. If customPath is empty, uses XDG default (~/.config/atmos/kube/config). If modeStr is empty, defaults to "0600".

func (*KubeconfigManager) GetPath

func (m *KubeconfigManager) GetPath() string

GetPath returns the kubeconfig file path.

func (*KubeconfigManager) ListClusterARNs

func (m *KubeconfigManager) ListClusterARNs() ([]string, error)

ListClusterARNs returns all cluster ARN keys from the kubeconfig file. Returns nil if the file does not exist.

func (*KubeconfigManager) RemoveClusterConfig

func (m *KubeconfigManager) RemoveClusterConfig(clusterARN, contextName, userName string) error

RemoveClusterConfig removes a cluster, context, and user from the kubeconfig. Idempotent: returns nil if entries do not exist.

func (*KubeconfigManager) WriteClusterConfig

func (m *KubeconfigManager) WriteClusterConfig(info *awsCloud.EKSClusterInfo, alias, identityName, updateMode string) (bool, error)

WriteClusterConfig generates and writes kubeconfig for an EKS cluster. Returns changed=true when the on-disk file was modified, and changed=false when the existing kubeconfig already matches the desired state (no write performed). Callers can use this to suppress noisy success messages on repeated invocations that produce identical output.

Jump to

Keyboard shortcuts

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