cluster

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AffiliateType = resource.Type("Affiliates.cluster.talos.dev")

AffiliateType is type of Affiliate resource.

View Source
const ConfigID = resource.ID("cluster")

ConfigID the singleton config resource ID.

View Source
const ConfigType = resource.Type("DiscoveryConfigs.cluster.talos.dev")

ConfigType is type of Config resource.

View Source
const IdentityType = resource.Type("Identities.cluster.talos.dev")

IdentityType is type of Identity resource.

View Source
const LocalIdentity = resource.ID("local")

LocalIdentity is the resource ID for the local node identity.

View Source
const MemberType = resource.Type("Members.cluster.talos.dev")

MemberType is type of Member resource.

View Source
const NamespaceName resource.Namespace = "cluster"

NamespaceName contains resources related to cluster as a whole.

View Source
const RawNamespaceName resource.Namespace = "cluster-raw"

RawNamespaceName contains raw resources which haven't gone through the merge phase yet.

Variables

This section is empty.

Functions

This section is empty.

Types

type Affiliate

Affiliate resource holds information about cluster affiliate: it is discovered potential cluster member and/or KubeSpan peer.

Controller builds local Affiliate structure for the node itself, other Affiliates are pulled from the registry during the discovery process.

func NewAffiliate

func NewAffiliate(namespace resource.Namespace, id resource.ID) *Affiliate

NewAffiliate initializes the Affiliate resource.

type AffiliateRD added in v1.1.0

type AffiliateRD struct{}

AffiliateRD provides auxiliary methods for Affiliate.

func (AffiliateRD) ResourceDefinition added in v1.1.0

ResourceDefinition implements typed.ResourceDefinition interface.

type AffiliateSpec

type AffiliateSpec struct {
	NodeID          string                `yaml:"nodeId" protobuf:"1"`
	Addresses       []netaddr.IP          `yaml:"addresses" protobuf:"2"`
	Hostname        string                `yaml:"hostname" protobuf:"3"`
	Nodename        string                `yaml:"nodename,omitempty" protobuf:"4"`
	OperatingSystem string                `yaml:"operatingSystem" protobuf:"5"`
	MachineType     machine.Type          `yaml:"machineType" protobuf:"6"`
	KubeSpan        KubeSpanAffiliateSpec `yaml:"kubespan,omitempty" protobuf:"7"`
}

AffiliateSpec describes Affiliate state.

func (AffiliateSpec) DeepCopy added in v1.1.0

func (o AffiliateSpec) DeepCopy() AffiliateSpec

DeepCopy generates a deep copy of AffiliateSpec.

func (*AffiliateSpec) Merge

func (spec *AffiliateSpec) Merge(other *AffiliateSpec)

Merge two AffiliateSpecs.

type Config

type Config = typed.Resource[ConfigSpec, ConfigRD]

Config resource holds KubeSpan configuration.

func NewConfig

func NewConfig(namespace resource.Namespace, id resource.ID) *Config

NewConfig initializes a Config resource.

type ConfigRD added in v1.1.0

type ConfigRD struct{}

ConfigRD provides auxiliary methods for Config.

func (ConfigRD) ResourceDefinition added in v1.1.0

ResourceDefinition implements typed.ResourceDefinition interface.

type ConfigSpec

type ConfigSpec struct {
	DiscoveryEnabled          bool   `yaml:"discoveryEnabled" protobuf:"1"`
	RegistryKubernetesEnabled bool   `yaml:"registryKubernetesEnabled" protobuf:"2"`
	RegistryServiceEnabled    bool   `yaml:"registryServiceEnabled" protobuf:"3"`
	ServiceEndpoint           string `yaml:"serviceEndpoint" protobuf:"4"`
	ServiceEndpointInsecure   bool   `yaml:"serviceEndpointInsecure,omitempty" protobuf:"5"`
	ServiceEncryptionKey      []byte `yaml:"serviceEncryptionKey" protobuf:"6"`
	ServiceClusterID          string `yaml:"serviceClusterID" protobuf:"7"`
}

ConfigSpec describes KubeSpan configuration.

func (ConfigSpec) DeepCopy added in v1.1.0

func (o ConfigSpec) DeepCopy() ConfigSpec

DeepCopy generates a deep copy of ConfigSpec.

type Identity

Identity resource holds node identity (as a member of the cluster).

func NewIdentity

func NewIdentity(namespace resource.Namespace, id resource.ID) *Identity

NewIdentity initializes a Identity resource.

type IdentityRD added in v1.1.0

type IdentityRD struct{}

IdentityRD provides auxiliary methods for Identity.

func (IdentityRD) ResourceDefinition added in v1.1.0

ResourceDefinition implements typed.ResourceDefinition interface.

type IdentitySpec

type IdentitySpec struct {
	// NodeID is a random value which is persisted across reboots,
	// but it gets reset on wipe.
	NodeID string `yaml:"nodeId" protobuf:"1"`
}

IdentitySpec describes status of rendered secrets.

Note: IdentitySpec is persisted on disk in the STATE partition, so YAML serialization should be kept backwards compatible.

func (IdentitySpec) DeepCopy added in v1.1.0

func (o IdentitySpec) DeepCopy() IdentitySpec

DeepCopy generates a deep copy of IdentitySpec.

type KubeSpanAffiliateSpec

type KubeSpanAffiliateSpec struct {
	PublicKey           string             `yaml:"publicKey" protobuf:"1"`
	Address             netaddr.IP         `yaml:"address" protobuf:"2"`
	AdditionalAddresses []netaddr.IPPrefix `yaml:"additionalAddresses" protobuf:"3"`
	Endpoints           []netaddr.IPPort   `yaml:"endpoints" protobuf:"4"`
}

KubeSpanAffiliateSpec describes additional information specific for the KubeSpan.

type Member

type Member = typed.Resource[MemberSpec, MemberRD]

Member resource contains information about discovered cluster members.

Members are usually derived from Affiliates.

func NewMember

func NewMember(namespace resource.Namespace, id resource.ID) *Member

NewMember initializes a Member resource.

type MemberRD added in v1.1.0

type MemberRD struct{}

MemberRD provides auxiliary methods for Member.

func (MemberRD) ResourceDefinition added in v1.1.0

ResourceDefinition implements typed.ResourceDefinition interface.

type MemberSpec

type MemberSpec struct {
	NodeID          string       `yaml:"nodeId" protobuf:"1"`
	Addresses       []netaddr.IP `yaml:"addresses" protobuf:"2"`
	Hostname        string       `yaml:"hostname" protobuf:"3"`
	MachineType     machine.Type `yaml:"machineType" protobuf:"4"`
	OperatingSystem string       `yaml:"operatingSystem" protobuf:"5"`
}

MemberSpec describes Member state.

func (MemberSpec) DeepCopy added in v1.1.0

func (o MemberSpec) DeepCopy() MemberSpec

DeepCopy generates a deep copy of MemberSpec.

Jump to

Keyboard shortcuts

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