config

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MPL-2.0 Imports: 5 Imported by: 11

Documentation

Overview

Package config provides methods to generate and consume Talos configuration.

Index

Constants

This section is empty.

Variables

View Source
var (
	TalosVersionCurrent = (*VersionContract)(nil)
	TalosVersion1_7     = &VersionContract{1, 7}
	TalosVersion1_6     = &VersionContract{1, 6}
	TalosVersion1_5     = &VersionContract{1, 5}
	TalosVersion1_4     = &VersionContract{1, 4}
	TalosVersion1_3     = &VersionContract{1, 3}
	TalosVersion1_2     = &VersionContract{1, 2}
	TalosVersion1_1     = &VersionContract{1, 1}
	TalosVersion1_0     = &VersionContract{1, 0}
	TalosVersion0_14    = &VersionContract{0, 14}
	TalosVersion0_13    = &VersionContract{0, 13}
	TalosVersion0_12    = &VersionContract{0, 12}
	TalosVersion0_11    = &VersionContract{0, 11}
	TalosVersion0_10    = &VersionContract{0, 10}
	TalosVersion0_9     = &VersionContract{0, 9}
	TalosVersion0_8     = &VersionContract{0, 8}
)

Well-known Talos version contracts.

Functions

This section is empty.

Types

type Config added in v1.5.0

type Config = config.Config

Config defines the interface to access contents of the machine configuration.

type Container added in v1.5.0

type Container interface {
	Encoder
	Validator

	Readonly() bool

	// RawV1Alpha1 returns internal config representation.
	RawV1Alpha1() *v1alpha1.Config

	// Documents returns a list of config documents.
	//
	// Documents should be not be modified.
	Documents() []config.Document
}

Container provides the interface to access configuration documents.

Container might contain multiple config documents, supporting encoding/decoding, validation, and other operations.

type Encoder added in v1.5.0

type Encoder = config.Encoder

Encoder provides the interface to encode configuration documents.

type Provider

type Provider interface {
	Config
	Container

	// Clone returns a copy of the Provider.
	Clone() Provider

	// PatchV1Alpha1 patches the container's v1alpha1.Config while preserving other config documents.
	PatchV1Alpha1(patcher func(*v1alpha1.Config) error) (Provider, error)

	// RedactSecrets returns a copy of the Provider with all secrets replaced with the given string.
	RedactSecrets(string) Provider

	// CompleteForBoot return true if the machine config is enough to proceed with the boot process.
	CompleteForBoot() bool
}

Provider defines the configuration consumption interface combining access and encoding/decoding.

type Validator added in v1.5.0

type Validator = config.Validator

Validator provides the interface to validate configuration.

type VersionContract

type VersionContract struct {
	Major int
	Minor int
}

VersionContract describes Talos version to generate config for.

Config generation only supports backwards compatibility (e.g. Talos 0.9 can generate configs for Talos 0.9 and 0.8). Matching version of the machinery package is required to generate configs for the current version of Talos.

Nil value of *VersionContract always describes current version of Talos.

func ParseContractFromVersion

func ParseContractFromVersion(version string) (*VersionContract, error)

ParseContractFromVersion parses Talos version into VersionContract.

func (*VersionContract) APIServerAuditPolicySupported

func (contract *VersionContract) APIServerAuditPolicySupported() bool

APIServerAuditPolicySupported returns true if kube-apiserver custom audit policy is supported.

func (*VersionContract) ApidExtKeyUsageCheckEnabled

func (contract *VersionContract) ApidExtKeyUsageCheckEnabled() bool

ApidExtKeyUsageCheckEnabled returns true if apid should check ext key usage of client certificates.

func (*VersionContract) ClusterDiscoveryEnabled

func (contract *VersionContract) ClusterDiscoveryEnabled() bool

ClusterDiscoveryEnabled returns true if cluster discovery should be enabled by default.

func (*VersionContract) DiskQuotaSupportEnabled added in v1.5.0

func (contract *VersionContract) DiskQuotaSupportEnabled() bool

DiskQuotaSupportEnabled returns true if XFS filesystems should enable project quota.

func (*VersionContract) Greater

func (contract *VersionContract) Greater(other *VersionContract) bool

Greater compares contract to another contract.

func (*VersionContract) HostDNSEnabled added in v1.7.0

func (contract *VersionContract) HostDNSEnabled() bool

HostDNSEnabled returns true if host dns router should be enabled by default.

func (*VersionContract) KubePrismEnabled added in v1.6.0

func (contract *VersionContract) KubePrismEnabled() bool

KubePrismEnabled returns true if KubePrism should be enabled by default.

func (*VersionContract) KubeletDefaultRuntimeSeccompProfileEnabled

func (contract *VersionContract) KubeletDefaultRuntimeSeccompProfileEnabled() bool

KubeletDefaultRuntimeSeccompProfileEnabled returns true if kubelet seccomp profile should be enabled by default.

func (*VersionContract) KubeletManifestsDirectoryDisabled

func (contract *VersionContract) KubeletManifestsDirectoryDisabled() bool

KubeletManifestsDirectoryDisabled returns true if the manifests directory flag is supported.

func (*VersionContract) KubernetesAllowSchedulingOnControlPlanes

func (contract *VersionContract) KubernetesAllowSchedulingOnControlPlanes() bool

KubernetesAllowSchedulingOnControlPlanes returns true if scheduling on control planes should be enabled by default.

func (*VersionContract) KubernetesAlternateImageRegistries

func (contract *VersionContract) KubernetesAlternateImageRegistries() bool

KubernetesAlternateImageRegistries returns true if alternate image registries should be enabled by default. https://github.com/kubernetes/kubernetes/pull/109938

func (*VersionContract) KubernetesDiscoveryBackendDisabled

func (contract *VersionContract) KubernetesDiscoveryBackendDisabled() bool

KubernetesDiscoveryBackendDisabled returns true if Kubernetes cluster discovery backend should be disabled by default.

func (*VersionContract) PodSecurityAdmissionEnabled

func (contract *VersionContract) PodSecurityAdmissionEnabled() bool

PodSecurityAdmissionEnabled returns true if pod security admission should be enabled by default.

func (*VersionContract) PodSecurityPolicyEnabled

func (contract *VersionContract) PodSecurityPolicyEnabled() bool

PodSecurityPolicyEnabled returns true if pod security policy should be enabled by default.

func (*VersionContract) SecretboxEncryptionSupported

func (contract *VersionContract) SecretboxEncryptionSupported() bool

SecretboxEncryptionSupported returns true if encryption with secretbox is supported.

func (*VersionContract) StableHostnameEnabled

func (contract *VersionContract) StableHostnameEnabled() bool

StableHostnameEnabled returns true if stable hostname generation should be enabled by default.

func (*VersionContract) String added in v1.6.0

func (contract *VersionContract) String() string

String returns string representation of the contract.

func (*VersionContract) SupportsAggregatorCA

func (contract *VersionContract) SupportsAggregatorCA() bool

SupportsAggregatorCA returns true if version of Talos supports AggregatorCA in the config.

func (*VersionContract) SupportsDynamicCertSANs

func (contract *VersionContract) SupportsDynamicCertSANs() bool

SupportsDynamicCertSANs returns true if version of Talos supports dynamic certificate generation with SANs provided from resources.

func (*VersionContract) SupportsECDSAKeys

func (contract *VersionContract) SupportsECDSAKeys() bool

SupportsECDSAKeys returns true if version of Talos supports ECDSA keys (vs. RSA keys).

func (*VersionContract) SupportsECDSASHA256

func (contract *VersionContract) SupportsECDSASHA256() bool

SupportsECDSASHA256 returns true if version of Talos supports ECDSA-SHA256 for Kubernetes certificates.

func (*VersionContract) SupportsRBACFeature

func (contract *VersionContract) SupportsRBACFeature() bool

SupportsRBACFeature returns true if version of Talos supports RBAC feature gate.

func (*VersionContract) SupportsServiceAccount

func (contract *VersionContract) SupportsServiceAccount() bool

SupportsServiceAccount returns true if version of Talos supports ServiceAccount in the config.

func (*VersionContract) UseRSAServiceAccountKey added in v1.7.0

func (contract *VersionContract) UseRSAServiceAccountKey() bool

UseRSAServiceAccountKey returns true if version of Talos should use RSA Service Account key for the kube-apiserver.

Directories

Path Synopsis
Package bundle provides a set of machine configuration files.
Package bundle provides a set of machine configuration files.
Package config provides interfaces to consume machine configuration values.
Package config provides interfaces to consume machine configuration values.
Package configloader provides methods to load Talos config.
Package configloader provides methods to load Talos config.
internal/decoder
Package decoder provides a YAML decoder for machine configuration documents.
Package decoder provides a YAML decoder for machine configuration documents.
Package configpatcher provides methods to patch Talos config.
Package configpatcher provides methods to patch Talos config.
Package container implements a wrapper which wraps all configuration documents into a single container.
Package container implements a wrapper which wraps all configuration documents into a single container.
Package generate provides Talos machine configuration generation and client config generation.
Package generate provides Talos machine configuration generation and client config generation.
secrets
Package secrets provides types and methods to handle base machine configuration secrets.
Package secrets provides types and methods to handle base machine configuration secrets.
internal
cis
registry
Package registry provides a registry for configuration documents.
Package registry provides a registry for configuration documents.
Package machine defines common machine type.
Package machine defines common machine type.
Package types imports all configuration document types to register them.
Package types imports all configuration document types to register them.
meta
Package meta provides common meta types for config documents.
Package meta provides common meta types for config documents.
network
Package network provides network machine configuration documents.
Package network provides network machine configuration documents.
runtime
Package runtime provides runtime machine configuration documents.
Package runtime provides runtime machine configuration documents.
runtime/extensions
Package extensions provides extensions config documents.
Package extensions provides extensions config documents.
siderolink
Package siderolink provides SideroLink machine configuration documents.
Package siderolink provides SideroLink machine configuration documents.
v1alpha1
Package v1alpha1 contains definition of the `v1alpha1` configuration document.
Package v1alpha1 contains definition of the `v1alpha1` configuration document.
Package validation provides validation options for the config Validate method.
Package validation provides validation options for the config Validate method.

Jump to

Keyboard shortcuts

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