types

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 8 Imported by: 259

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOSNotSupported = errors.New("os not supported")

	// AllOperatingSystems is a slice containing all supported operating system identifiers.
	AllOperatingSystems = []OperatingSystem{
		OperatingSystemUbuntu,
		OperatingSystemCentOS,
		OperatingSystemSLES,
		OperatingSystemRHEL,
		OperatingSystemFlatcar,
	}

	// AllCloudProviders is a slice containing all supported cloud providers.
	AllCloudProviders = []CloudProvider{
		CloudProviderAWS,
		CloudProviderAzure,
		CloudProviderDigitalocean,
		CloudProviderGoogle,
		CloudProviderHetzner,
		CloudProviderKubeVirt,
		CloudProviderLinode,
		CloudProviderOpenstack,
		CloudProviderPacket,
		CloudProviderVsphere,
		CloudProviderFake,
		CloudProviderAlibaba,
		CloudProviderAnexia,
		CloudProviderScaleway,
		CloudProviderBaremetal,
	}
)

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider string
const (
	CloudProviderAWS          CloudProvider = "aws"
	CloudProviderAzure        CloudProvider = "azure"
	CloudProviderDigitalocean CloudProvider = "digitalocean"
	CloudProviderGoogle       CloudProvider = "gce"
	CloudProviderHetzner      CloudProvider = "hetzner"
	CloudProviderKubeVirt     CloudProvider = "kubevirt"
	CloudProviderLinode       CloudProvider = "linode"
	CloudProviderOpenstack    CloudProvider = "openstack"
	CloudProviderPacket       CloudProvider = "packet"
	CloudProviderVsphere      CloudProvider = "vsphere"
	CloudProviderFake         CloudProvider = "fake"
	CloudProviderAlibaba      CloudProvider = "alibaba"
	CloudProviderAnexia       CloudProvider = "anexia"
	CloudProviderScaleway     CloudProvider = "scaleway"
	CloudProviderBaremetal    CloudProvider = "baremetal"
)

type Config

type Config struct {
	SSHPublicKeys []string `json:"sshPublicKeys"`

	CloudProvider     CloudProvider        `json:"cloudProvider"`
	CloudProviderSpec runtime.RawExtension `json:"cloudProviderSpec"`

	OperatingSystem     OperatingSystem      `json:"operatingSystem"`
	OperatingSystemSpec runtime.RawExtension `json:"operatingSystemSpec"`

	// +optional
	Network *NetworkConfig `json:"network,omitempty"`

	// +optional
	OverwriteCloudConfig *string `json:"overwriteCloudConfig,omitempty"`
}

func GetConfig

func GetConfig(r clusterv1alpha1.ProviderSpec) (*Config, error)

type ConfigVarBool

type ConfigVarBool struct {
	Value           bool                       `json:"value,omitempty"`
	SecretKeyRef    GlobalSecretKeySelector    `json:"secretKeyRef,omitempty"`
	ConfigMapKeyRef GlobalConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}

func (ConfigVarBool) MarshalJSON

func (configVarBool ConfigVarBool) MarshalJSON() ([]byte, error)

MarshalJSON encodes the configVarBool, omitting empty strings This is done to not have the json object cluttered with empty strings This will eventually hopefully be resolved within golang itself https://github.com/golang/go/issues/11939

func (*ConfigVarBool) UnmarshalJSON

func (configVarBool *ConfigVarBool) UnmarshalJSON(b []byte) error

type ConfigVarString

type ConfigVarString struct {
	Value           string                     `json:"value,omitempty"`
	SecretKeyRef    GlobalSecretKeySelector    `json:"secretKeyRef,omitempty"`
	ConfigMapKeyRef GlobalConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}

func (ConfigVarString) MarshalJSON

func (configVarString ConfigVarString) MarshalJSON() ([]byte, error)

MarshalJSON converts a configVarString to its JSON form, omitting empty strings. This is done to not have the json object cluttered with empty strings This will eventually hopefully be resolved within golang itself https://github.com/golang/go/issues/11939

func (*ConfigVarString) UnmarshalJSON

func (configVarString *ConfigVarString) UnmarshalJSON(b []byte) error

type DNSConfig

type DNSConfig struct {
	Servers []string `json:"servers"`
}

DNSConfig contains a machine's DNS configuration

type GlobalConfigMapKeySelector

type GlobalConfigMapKeySelector GlobalObjectKeySelector

type GlobalObjectKeySelector

type GlobalObjectKeySelector struct {
	corev1.ObjectReference `json:",inline"`
	Key                    string `json:"key,omitempty"`
}

GlobalObjectKeySelector is needed as we can not use v1.SecretKeySelector because it is not cross namespace

type GlobalSecretKeySelector

type GlobalSecretKeySelector GlobalObjectKeySelector

type NetworkConfig

type NetworkConfig struct {
	CIDR    string    `json:"cidr"`
	Gateway string    `json:"gateway"`
	DNS     DNSConfig `json:"dns"`
}

NetworkConfig contains a machine's static network configuration

type OperatingSystem

type OperatingSystem string

OperatingSystem defines the host operating system.

const (
	OperatingSystemUbuntu  OperatingSystem = "ubuntu"
	OperatingSystemCentOS  OperatingSystem = "centos"
	OperatingSystemSLES    OperatingSystem = "sles"
	OperatingSystemRHEL    OperatingSystem = "rhel"
	OperatingSystemFlatcar OperatingSystem = "flatcar"
)

Jump to

Keyboard shortcuts

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