Documentation
¶
Index ¶
- func CreateLoopbackService(k8sclient *kubernetes.Clientset, domain string) error
- func GetConfig(kubeconfigPath string, context string) (*rest.Config, error)
- func IsClusterAvailableCheck(clusterConfig *ClusterConfig) error
- func KubeconfigPath(override string, fallback string) string
- type ClusterConfig
- type KindApiServer
- type KindBootstrapInput
- type KindClusterConfig
- func (o *KindClusterConfig) ClusterExists() (bool, error)
- func (o *KindClusterConfig) ClusterStatus() error
- func (o *KindClusterConfig) CreateCluster(input *KindBootstrapInput, image string, onPhase func(string), verbose bool) error
- func (o *KindClusterConfig) DeleteCluster() error
- func (o *KindClusterConfig) StartCluster() error
- func (o *KindClusterConfig) StopCluster() error
- type KindNetworking
- type KindNode
- type KindNodeTaint
- type KindVolumeMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLoopbackService ¶
func CreateLoopbackService(k8sclient *kubernetes.Clientset, domain string) error
func IsClusterAvailableCheck ¶
func IsClusterAvailableCheck(clusterConfig *ClusterConfig) error
func KubeconfigPath ¶
Types ¶
type ClusterConfig ¶
func NewClusterConfig ¶
func NewClusterConfig(kubeconfig string, context string) *ClusterConfig
func NewClusterConfigIfAvailable ¶
func NewClusterConfigIfAvailable(kubeconfig string, context string) (*ClusterConfig, error)
func (*ClusterConfig) GetClient ¶
func (o *ClusterConfig) GetClient() (*kubernetes.Clientset, error)
func (*ClusterConfig) GetDiscoveryClient ¶
func (o *ClusterConfig) GetDiscoveryClient() (*discovery.DiscoveryClient, error)
func (*ClusterConfig) GetDynamicClient ¶
func (o *ClusterConfig) GetDynamicClient() (dynamic.Interface, error)
type KindApiServer ¶
type KindBootstrapInput ¶
type KindBootstrapInput struct {
ListenAddress string
ApiServer KindApiServer
Networking KindNetworking
VolumeMounts []KindVolumeMount
// Nodes, when non-empty, fully describes the cluster's nodes (the
// template renders a node per entry). Empty keeps the default single
// control-plane node.
Nodes []KindNode
}
KindBootstrapInput is the focused payload the kind-cluster template reads from. Decouples cluster-bootstrap rendering from any specific CLI config kind: 'local cluster create' builds one from EducatesLocalConfig; future scenario kinds (GKE/EKS — though they would not use kind) or test fixtures build it directly.
type KindClusterConfig ¶
type KindClusterConfig struct {
Config ClusterConfig
// contains filtered or unexported fields
}
func NewKindClusterConfig ¶
func NewKindClusterConfig(kubeconfig string) *KindClusterConfig
func (*KindClusterConfig) ClusterExists ¶
func (o *KindClusterConfig) ClusterExists() (bool, error)
ClusterExists reports whether the 'educates' kind cluster currently exists. err is set only when the underlying list call failed; the existence outcome itself is not an error — callers decide whether "exists" or "does not exist" is acceptable for the operation they're performing (CreateCluster wants !exists; Delete/Start/Stop/Status want exists).
func (*KindClusterConfig) ClusterStatus ¶
func (o *KindClusterConfig) ClusterStatus() error
func (*KindClusterConfig) CreateCluster ¶
func (o *KindClusterConfig) CreateCluster(input *KindBootstrapInput, image string, onPhase func(string), verbose bool) error
CreateCluster boots the 'educates' kind cluster. By default kind's own status spinner and end-of-create salutation/usage footer are suppressed: each kind phase is forwarded to onPhase (so the caller can render it on one line), and the footer chatter is turned off. When verbose is true kind's full logger is used instead (spinner + detail on stderr) and onPhase is ignored.
func (*KindClusterConfig) DeleteCluster ¶
func (o *KindClusterConfig) DeleteCluster() error
func (*KindClusterConfig) StartCluster ¶
func (o *KindClusterConfig) StartCluster() error
func (*KindClusterConfig) StopCluster ¶
func (o *KindClusterConfig) StopCluster() error
type KindNetworking ¶
type KindNode ¶
type KindNode struct {
Role string
Labels map[string]string
Taints []KindNodeTaint
}
KindNode is one node in a multi-node kind cluster. Labels become Kubernetes node labels; Taints are registered on worker nodes at join time. The control-plane node additionally carries the ingress-ready label and the host port mappings / volume mounts.
type KindNodeTaint ¶
type KindVolumeMount ¶
type KindVolumeMount struct {
HostPath string
ContainerPath string
// HasReadOnly + ReadOnly map to kind's extraMounts[].readOnly.
// The pair models a nullable bool without requiring text/template
// pointer dereference: HasReadOnly=false leaves the field unset
// (kind defaults to read-write); HasReadOnly=true emits the
// explicit ReadOnly value into the template.
HasReadOnly bool
ReadOnly bool
}