providerconfig

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider string
const (
	CloudProviderAWS          CloudProvider = "aws"
	CloudProviderAzure        CloudProvider = "azure"
	CloudProviderDigitalocean CloudProvider = "digitalocean"
	CloudProviderOpenstack    CloudProvider = "openstack"
	CloudProviderGoogle       CloudProvider = "gce"
	CloudProviderPacket       CloudProvider = "packet"
	CloudProviderHetzner      CloudProvider = "hetzner"
	CloudProviderLinode       CloudProvider = "linode"
	CloudProviderVsphere      CloudProvider = "vsphere"
	CloudProviderFake         CloudProvider = "fake"
	CloudProviderKubeVirt     CloudProvider = "kubevirt"
)

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 added in v0.2.0

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

func (ConfigVarBool) MarshalJSON added in v0.4.0

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 added in v0.2.0

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

type ConfigVarResolver added in v0.2.0

type ConfigVarResolver struct {
	// contains filtered or unexported fields
}

func NewConfigVarResolver added in v0.2.0

func NewConfigVarResolver(ctx context.Context, client ctrlruntimeclient.Client) *ConfigVarResolver

func (*ConfigVarResolver) GetConfigVarBoolValue added in v0.2.0

func (cvr *ConfigVarResolver) GetConfigVarBoolValue(configVar ConfigVarBool) (bool, error)

func (*ConfigVarResolver) GetConfigVarBoolValueOrEnv added in v0.7.12

func (cvr *ConfigVarResolver) GetConfigVarBoolValueOrEnv(configVar ConfigVarBool, envVarName string) (bool, error)

func (*ConfigVarResolver) GetConfigVarStringValue added in v0.2.0

func (cvr *ConfigVarResolver) GetConfigVarStringValue(configVar ConfigVarString) (string, error)

func (*ConfigVarResolver) GetConfigVarStringValueOrEnv added in v0.3.0

func (cvr *ConfigVarResolver) GetConfigVarStringValueOrEnv(configVar ConfigVarString, envVarName string) (string, error)

GetConfigVarStringValueOrEnv tries to get the value from ConfigVarString, when it fails, it falls back to getting the value from an environment variable specified by envVarName parameter

type ConfigVarString added in v0.2.0

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

func (ConfigVarString) MarshalJSON added in v0.4.0

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

MarshalJSON converts a configVarString to its JSON form, ompitting 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 added in v0.2.0

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

type DNSConfig added in v0.7.12

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

DNSConfig contains a machine's DNS configuration

type GlobalConfigMapKeySelector added in v0.2.0

type GlobalConfigMapKeySelector GlobalObjectKeySelector

type GlobalObjectKeySelector added in v1.5.0

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

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

type GlobalSecretKeySelector added in v0.2.0

type GlobalSecretKeySelector GlobalObjectKeySelector

type NetworkConfig added in v0.7.12

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
const (
	OperatingSystemCoreos OperatingSystem = "coreos"
	OperatingSystemUbuntu OperatingSystem = "ubuntu"
	OperatingSystemCentOS OperatingSystem = "centos"
)

Jump to

Keyboard shortcuts

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