cluster

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package cluster owns routing for the cluster top-level command.

Package cluster implements cluster operations for the cluster CLI command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(runtime *core.Runtime) *cobra.Command

New returns the cluster command.

func NewWithManager

func NewWithManager(mgr *ClusterManager) *cobra.Command

NewWithManager returns the cluster command using the provided manager.

Types

type ClusterManager

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

ClusterManager handles cluster operations with injected dependencies.

func DefaultClusterManager

func DefaultClusterManager(logger *zap.Logger) *ClusterManager

DefaultClusterManager returns a ClusterManager using default clients.

func NewClusterManager

func NewClusterManager(kubectl *core.KubectlClient, exec core.Executor, logger *zap.Logger) *ClusterManager

NewClusterManager creates a ClusterManager with the given dependencies.

func (*ClusterManager) CheckClusterStatus

func (m *ClusterManager) CheckClusterStatus() error

CheckClusterStatus checks and displays cluster status.

func (*ClusterManager) ConfigureCluster

func (m *ClusterManager) ConfigureCluster(opts IngressOptions) error

ConfigureCluster configures cluster settings like ingress.

func (*ClusterManager) ConfigureClusterWithValues

func (m *ClusterManager) ConfigureClusterWithValues(mode, manifest string, force bool) error

ConfigureClusterWithValues adapts exported flag values into the internal ingress options shape.

func (*ClusterManager) ConfigureKubeconfig

func (m *ClusterManager) ConfigureKubeconfig(kubeconfig, context string) error

ConfigureKubeconfig sets KUBECONFIG and optionally switches context.

func (*ClusterManager) ConfigureKubeconfigFromProvider

func (m *ClusterManager) ConfigureKubeconfigFromProvider(provider, region, clusterName, resourceGroup, project, zone, kubeconfig string) error

ConfigureKubeconfigFromProvider updates kubeconfig using a cloud provider CLI.

func (*ClusterManager) EnsureNamespace

func (m *ClusterManager) EnsureNamespace(name string) error

EnsureNamespace applies/creates a namespace idempotently.

func (*ClusterManager) InitCluster

func (m *ClusterManager) InitCluster(kubeconfig, context string) error

InitCluster initializes cluster configuration.

func (*ClusterManager) KubectlRunner

func (m *ClusterManager) KubectlRunner() core.KubectlRunner

KubectlRunner exposes the shared kubectl runner for foldered command routing.

func (*ClusterManager) Logger

func (m *ClusterManager) Logger() *zap.Logger

Logger exposes the shared logger for foldered command routing.

func (*ClusterManager) ProvisionCluster

func (m *ClusterManager) ProvisionCluster(provider, region string, nodeCount int, clusterName string, dryRun bool) error

ProvisionCluster provisions a new Kubernetes cluster. When dryRun is true, it prints the configuration and command that would run without creating any cluster or calling out to cloud APIs.

type IngressOptions

type IngressOptions struct {
	Mode     string
	Manifest string
	Force    bool
}

IngressOptions captures ingress install settings used by both cluster configuration and the setup command.

Directories

Path Synopsis
Package doctor implements cluster readiness diagnostics for the cluster CLI.
Package doctor implements cluster readiness diagnostics for the cluster CLI.

Jump to

Keyboard shortcuts

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