config

package
v0.0.1-alpha12 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RuntimeConfig
	KubernetesVersion string           `json:"kubernetesVersion,omitempty"`
	RancherVersion    string           `json:"rancherVersion,omitempty"`
	Server            string           `json:"server,omitempty"`
	Discovery         *DiscoveryConfig `json:"discovery,omitempty"`

	RancherValues    map[string]interface{}    `json:"rancherValues,omitempty"`
	PreInstructions  []applyinator.Instruction `json:"preInstructions,omitempty"`
	PostInstructions []applyinator.Instruction `json:"postInstructions,omitempty"`
	// Deprecated, use Resources instead
	BootstrapResources []v1.GenericMap `json:"bootstrapResources,omitempty"`
	Resources          []v1.GenericMap `json:"resources,omitempty"`

	RuntimeInstallerImage string               `json:"runtimeInstallerImage,omitempty"`
	RancherInstallerImage string               `json:"rancherInstallerImage,omitempty"`
	SystemDefaultRegistry string               `json:"systemDefaultRegistry,omitempty"`
	Registries            *registries.Registry `json:"registries,omitempty"`
}

func Load

func Load(path string) (result Config, err error)

type DiscoveryConfig

type DiscoveryConfig struct {
	Params          map[string]string `json:"params,omitempty"`
	ExpectedServers int               `json:"expectedServers,omitempty"`
	// ServerCacheDuration will remember discovered servers for this amount of time.  This
	// helps with some discovery protocols like mDNS that can be unreliable
	ServerCacheDuration string `json:"serverCacheDuration,omitempty"`
}

type Runtime

type Runtime string
var (
	RuntimeRKE2    Runtime = "rke2"
	RuntimeK3S     Runtime = "k3s"
	RuntimeUnknown Runtime = "unknown"
)

func GetRuntime

func GetRuntime(kubernetesVersion string) Runtime

type RuntimeConfig

type RuntimeConfig struct {
	Role            string                 `json:"role,omitempty"`
	SANS            []string               `json:"tlsSans,omitempty"`
	NodeName        string                 `json:"nodeName,omitempty"`
	Address         string                 `json:"address,omitempty"`
	InternalAddress string                 `json:"internalAddress,omitempty"`
	Taints          []string               `json:"taints,omitempty"`
	Labels          []string               `json:"labels,omitempty"`
	Token           string                 `json:"token,omitempty"`
	ConfigValues    map[string]interface{} `json:"extraConfig,omitempty"`
}

Jump to

Keyboard shortcuts

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