nodeservices

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodVersionAnnotation = "registry.deckhouse.io/config-version"
)

Variables

View Source
var (
	MasterNodeLabelSelector = &v1.LabelSelector{
		MatchLabels: map[string]string{
			"node-role.kubernetes.io/control-plane": "",
		},
	}
)

Functions

func KubernetsConfig

func KubernetsConfig(name string) []go_hook.KubernetesConfig

Types

type Inputs

type Inputs struct {
	Nodes map[string]Node
}

func InputsFromSnapshot

func InputsFromSnapshot(input *go_hook.HookInput, name string) (Inputs, error)

type LocalModeParams

type LocalModeParams struct {
	UserRW     users.User
	UserPuller users.User
	UserPusher users.User

	IngressClientCA *x509.Certificate
}

type Node

type Node struct {
	IP               string
	Ready            bool
	Pods             NodePods
	ConfigSecretHash string // For reconcile
}

type NodePods

type NodePods map[string]Pod

type NodeServicesConfig

type NodeServicesConfig struct {
	Version string              `json:"version"`
	Config  nodeservices.Config `json:"config"`
}

type Params

type Params struct {
	CA         pki.CertKey
	Token      pki.CertKey
	HTTPSecret string
	UserRO     users.User

	Proxy *ProxyModeParams
	Local *LocalModeParams
}

type Pod

type Pod struct {
	Ready   bool
	Version string
}

type ProcessResult

type ProcessResult map[string]ProcessResultNode

func (ProcessResult) GetConditionMessage

func (result ProcessResult) GetConditionMessage() string

func (ProcessResult) IsReady

func (result ProcessResult) IsReady() bool

type ProcessResultNode

type ProcessResultNode struct {
	Ready         bool
	PodReady      bool
	ConfigVersion string
	Address       string
}

type ProxyModeParams

type ProxyModeParams struct {
	Scheme     string
	ImagesRepo string
	UserName   string
	Password   string
	TTL        string

	UpstreamCA *x509.Certificate
}

type State

type State struct {
	Run   bool                          `json:"run,omitempty"`
	Nodes map[string]NodeServicesConfig `json:"nodes,omitempty"`
}

func (*State) Process

func (state *State) Process(log go_hook.Logger, params Params, inputs Inputs) (ProcessResult, error)

func (*State) Stop

func (state *State) Stop(inputs Inputs) ([]string, error)

Jump to

Keyboard shortcuts

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