providerconfig

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

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(kubeClient kubernetes.Interface) *ConfigVarResolver

func (*ConfigVarResolver) GetConfigVarBoolValue added in v0.2.0

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

func (*ConfigVarResolver) GetConfigVarBoolValueOrEnv added in v0.7.12

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

func (*ConfigVarResolver) GetConfigVarStringValue added in v0.2.0

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

func (*ConfigVarResolver) GetConfigVarStringValueOrEnv added in v0.3.0

func (configVarResolver *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 GlobaObjectKeySelector added in v0.2.0

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

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

type GlobalConfigMapKeySelector added in v0.2.0

type GlobalConfigMapKeySelector GlobaObjectKeySelector

type GlobalSecretKeySelector added in v0.2.0

type GlobalSecretKeySelector GlobaObjectKeySelector

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