config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigName = "rio-config"

	ConfigController = ControllerConfig{}
)

Functions

func SetConfig

func SetConfig(cm *v1.ConfigMap, config Config) (*v1.ConfigMap, error)

Types

type Address

type Address struct {
	IP       string `json:"ip,omitempty"`
	Hostname string `json:"hostname,omitempty"`
}

type Config

type Config struct {
	Features    map[string]FeatureConfig `json:"features,omitempty"`
	LetsEncrypt LetsEncrypt              `json:"letsEncrypt,omitempty"`
	RdnsURL     string                   `json:"rdnsUrl,omitempty"`
	Gateway     Gateway                  `json:"gateway,omitempty"`
}

func FromConfigMap

func FromConfigMap(cm *v1.ConfigMap) (result Config, err error)

func GetConfig added in v0.7.0

func GetConfig(namespace string, client corev1.ConfigMapClient) (Config, error)

type ControllerConfig

type ControllerConfig struct {
	RunAPIValidatorWebhook bool
	WebhookPort            string
	WebhookHost            string
	IPAddresses            string
	Features               string
	MeshMode               string
	Gateway                Gateway
}

type FeatureConfig

type FeatureConfig struct {
	Enabled     *bool             `json:"enabled,omitempty"`
	Description string            `json:"description,omitempty"`
	Options     map[string]string `json:"options,omitempty"`
}

type Gateway

type Gateway struct {
	StaticAddresses  []adminv1.Address `json:"staticAddresses,omitempty"`
	ServiceName      string            `json:"serviceName,omitempty"`
	ServiceNamespace string            `json:"serviceNamespace,omitempty"`

	IngressName      string `json:"ingressName,omitempty"`
	IngressNamespace string `json:"ingressNamespace,omitempty"`
}

type LetsEncrypt

type LetsEncrypt struct {
	Account   string `json:"account,omitempty"`
	Email     string `json:"email,omitempty"`
	ServerURL string `json:"serverURL,omitempty"`
}

Jump to

Keyboard shortcuts

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