k8s

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MPL-2.0 Imports: 86 Imported by: 0

Documentation

Overview

Package k8s provides controllers which manage Kubernetes resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKubeletConfiguration

func NewKubeletConfiguration(cfgSpec *k8s.KubeletConfigSpec) (*kubeletconfig.KubeletConfiguration, error)

NewKubeletConfiguration builds kubelet configuration with defaults and overrides from extraConfig.

Types

type AddressFilterController

type AddressFilterController struct{}

AddressFilterController creates NodeAddressFilters based on machine configuration.

func (*AddressFilterController) Inputs

func (ctrl *AddressFilterController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*AddressFilterController) Name

func (ctrl *AddressFilterController) Name() string

Name implements controller.Controller interface.

func (*AddressFilterController) Outputs

func (ctrl *AddressFilterController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*AddressFilterController) Run

Run implements controller.Controller interface.

type ControlPlaneController

type ControlPlaneController struct{}

ControlPlaneController manages Kubernetes control plane resources based on configuration.

func (*ControlPlaneController) Inputs

func (ctrl *ControlPlaneController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ControlPlaneController) Name

func (ctrl *ControlPlaneController) Name() string

Name implements controller.Controller interface.

func (*ControlPlaneController) Outputs

func (ctrl *ControlPlaneController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ControlPlaneController) Run

Run implements controller.Controller interface.

type ControlPlaneStaticPodController

type ControlPlaneStaticPodController struct{}

ControlPlaneStaticPodController manages k8s.StaticPod based on control plane configuration.

func (*ControlPlaneStaticPodController) Inputs

Inputs implements controller.Controller interface.

func (*ControlPlaneStaticPodController) Name

Name implements controller.Controller interface.

func (*ControlPlaneStaticPodController) Outputs

Outputs implements controller.Controller interface.

func (*ControlPlaneStaticPodController) Run

Run implements controller.Controller interface.

type EndpointController

type EndpointController struct{}

EndpointController looks up control plane endpoints.

func (*EndpointController) Inputs

func (ctrl *EndpointController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*EndpointController) Name

func (ctrl *EndpointController) Name() string

Name implements controller.Controller interface.

func (*EndpointController) Outputs

func (ctrl *EndpointController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*EndpointController) Run

func (ctrl *EndpointController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type ExtraManifestController

type ExtraManifestController struct{}

ExtraManifestController renders manifests based on templates and config/secrets.

func (*ExtraManifestController) Inputs

func (ctrl *ExtraManifestController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ExtraManifestController) Name

func (ctrl *ExtraManifestController) Name() string

Name implements controller.Controller interface.

func (*ExtraManifestController) Outputs

func (ctrl *ExtraManifestController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ExtraManifestController) Run

Run implements controller.Controller interface.

type KubeletConfigController

type KubeletConfigController struct{}

KubeletConfigController renders manifests based on templates and config/secrets.

func (*KubeletConfigController) Inputs

func (ctrl *KubeletConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KubeletConfigController) Name

func (ctrl *KubeletConfigController) Name() string

Name implements controller.Controller interface.

func (*KubeletConfigController) Outputs

func (ctrl *KubeletConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KubeletConfigController) Run

Run implements controller.Controller interface.

type KubeletServiceController

type KubeletServiceController struct {
	V1Alpha1Services ServiceManager
	V1Alpha1Mode     runtimetalos.Mode
}

KubeletServiceController renders kubelet configuration files and controls kubelet service lifecycle.

func (*KubeletServiceController) Inputs

func (ctrl *KubeletServiceController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KubeletServiceController) Name

func (ctrl *KubeletServiceController) Name() string

Name implements controller.Controller interface.

func (*KubeletServiceController) Outputs

func (ctrl *KubeletServiceController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KubeletServiceController) Run

Run implements controller.Controller interface.

type KubeletSpecController

type KubeletSpecController struct {
	V1Alpha1Mode v1alpha1runtime.Mode
}

KubeletSpecController renders manifests based on templates and config/secrets.

func (*KubeletSpecController) Inputs

func (ctrl *KubeletSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KubeletSpecController) Name

func (ctrl *KubeletSpecController) Name() string

Name implements controller.Controller interface.

func (*KubeletSpecController) Outputs

func (ctrl *KubeletSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KubeletSpecController) Run

Run implements controller.Controller interface.

type KubeletStaticPodController

type KubeletStaticPodController struct{}

KubeletStaticPodController renders static pod definitions and manages k8s.StaticPodStatus.

func (*KubeletStaticPodController) Inputs

func (ctrl *KubeletStaticPodController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KubeletStaticPodController) Name

func (ctrl *KubeletStaticPodController) Name() string

Name implements controller.Controller interface.

func (*KubeletStaticPodController) Outputs

func (ctrl *KubeletStaticPodController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KubeletStaticPodController) Run

Run implements controller.Controller interface.

type ManifestApplyController

type ManifestApplyController struct{}

ManifestApplyController applies manifests via control plane endpoint.

func (*ManifestApplyController) Inputs

func (ctrl *ManifestApplyController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ManifestApplyController) Name

func (ctrl *ManifestApplyController) Name() string

Name implements controller.Controller interface.

func (*ManifestApplyController) Outputs

func (ctrl *ManifestApplyController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ManifestApplyController) Run

Run implements controller.Controller interface.

type ManifestController

type ManifestController struct{}

ManifestController renders manifests based on templates and config/secrets.

func (*ManifestController) Inputs

func (ctrl *ManifestController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ManifestController) Name

func (ctrl *ManifestController) Name() string

Name implements controller.Controller interface.

func (*ManifestController) Outputs

func (ctrl *ManifestController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ManifestController) Run

func (ctrl *ManifestController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type NodeIPConfigController

type NodeIPConfigController struct{}

NodeIPConfigController renders manifests based on templates and config/secrets.

func (*NodeIPConfigController) Inputs

func (ctrl *NodeIPConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodeIPConfigController) Name

func (ctrl *NodeIPConfigController) Name() string

Name implements controller.Controller interface.

func (*NodeIPConfigController) Outputs

func (ctrl *NodeIPConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodeIPConfigController) Run

Run implements controller.Controller interface.

type NodeIPController

type NodeIPController struct{}

NodeIPController renders manifests based on templates and config/secrets.

func (*NodeIPController) Inputs

func (ctrl *NodeIPController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodeIPController) Name

func (ctrl *NodeIPController) Name() string

Name implements controller.Controller interface.

func (*NodeIPController) Outputs

func (ctrl *NodeIPController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodeIPController) Run

func (ctrl *NodeIPController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type NodeLabelSpecController

type NodeLabelSpecController struct{}

NodeLabelSpecController manages k8s.NodeLabelsConfig based on configuration.

func (*NodeLabelSpecController) Inputs

func (ctrl *NodeLabelSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodeLabelSpecController) Name

func (ctrl *NodeLabelSpecController) Name() string

Name implements controller.Controller interface.

func (*NodeLabelSpecController) Outputs

func (ctrl *NodeLabelSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodeLabelSpecController) Run

Run implements controller.Controller interface.

type NodeLabelsApplyController

type NodeLabelsApplyController struct{}

NodeLabelsApplyController watches k8s.NodeLabelSpec's and applies them to the k8s Node object.

func (*NodeLabelsApplyController) ApplyLabels

func (ctrl *NodeLabelsApplyController) ApplyLabels(logger *zap.Logger, node *v1.Node, ownedLabels map[string]struct{}, nodeLabelSpecs map[string]string)

ApplyLabels performs the inner loop of the node label reconciliation.

This method is exported for testing purposes.

func (*NodeLabelsApplyController) Inputs

func (ctrl *NodeLabelsApplyController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodeLabelsApplyController) Name

func (ctrl *NodeLabelsApplyController) Name() string

Name implements controller.Controller interface.

func (*NodeLabelsApplyController) Outputs

func (ctrl *NodeLabelsApplyController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodeLabelsApplyController) Run

Run implements controller.Controller interface.

type NodenameController

type NodenameController struct{}

NodenameController renders manifests based on templates and config/secrets.

func (*NodenameController) Inputs

func (ctrl *NodenameController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodenameController) Name

func (ctrl *NodenameController) Name() string

Name implements controller.Controller interface.

func (*NodenameController) Outputs

func (ctrl *NodenameController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodenameController) Run

func (ctrl *NodenameController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type RenderConfigsStaticPodController

type RenderConfigsStaticPodController struct{}

RenderConfigsStaticPodController manages k8s.ConfigsReady and renders configs for the control plane.

func (*RenderConfigsStaticPodController) Inputs

Inputs implements controller.Controller interface.

func (*RenderConfigsStaticPodController) Name

Name implements controller.Controller interface.

func (*RenderConfigsStaticPodController) Outputs

Outputs implements controller.Controller interface.

func (*RenderConfigsStaticPodController) Run

Run implements controller.Controller interface.

type RenderSecretsStaticPodController

type RenderSecretsStaticPodController struct{}

RenderSecretsStaticPodController manages k8s.SecretsReady and renders secrets from secrets.Kubernetes.

func (*RenderSecretsStaticPodController) Inputs

Inputs implements controller.Controller interface.

func (*RenderSecretsStaticPodController) Name

Name implements controller.Controller interface.

func (*RenderSecretsStaticPodController) Outputs

Outputs implements controller.Controller interface.

func (*RenderSecretsStaticPodController) Run

Run implements controller.Controller interface.

type ServiceManager

type ServiceManager interface {
	IsRunning(id string) (system.Service, bool, error)
	Load(services ...system.Service) []string
	Stop(ctx context.Context, serviceIDs ...string) (err error)
	Start(serviceIDs ...string) error
}

ServiceManager is the interface to the v1alpha1 services subsystems.

type StaticEndpointController added in v1.3.2

type StaticEndpointController struct{}

StaticEndpointController injects endpoints based on machine configuration.

func (*StaticEndpointController) Inputs added in v1.3.2

func (ctrl *StaticEndpointController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*StaticEndpointController) Name added in v1.3.2

func (ctrl *StaticEndpointController) Name() string

Name implements controller.Controller interface.

func (*StaticEndpointController) Outputs added in v1.3.2

func (ctrl *StaticEndpointController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*StaticEndpointController) Run added in v1.3.2

Run implements controller.Controller interface.

type StaticPodConfigController

type StaticPodConfigController struct{}

StaticPodConfigController manages k8s.StaticPod based on machine configuration.

func (*StaticPodConfigController) Inputs

func (ctrl *StaticPodConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*StaticPodConfigController) Name

func (ctrl *StaticPodConfigController) Name() string

Name implements controller.Controller interface.

func (*StaticPodConfigController) Outputs

func (ctrl *StaticPodConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*StaticPodConfigController) Run

Run implements controller.Controller interface.

type StaticPodServerController

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

StaticPodServerController renders all static pod definitions as a PodList and serves it as YAML via HTTP.

func (*StaticPodServerController) Inputs

func (ctrl *StaticPodServerController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*StaticPodServerController) Name

func (ctrl *StaticPodServerController) Name() string

Name implements controller.Controller interface.

func (*StaticPodServerController) Outputs

func (ctrl *StaticPodServerController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*StaticPodServerController) Run

Run implements controller.Controller interface.

type TalosServiceAccount

type TalosServiceAccount struct {
	Group            string
	Version          string
	Kind             string
	ResourceSingular string
	ResourcePlural   string
	ShortName        string
}

TalosServiceAccount is a struct used by the template engine which contains the needed variables to be able to construct the Talos Service Account CRD.

Jump to

Keyboard shortcuts

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