controller

package
v2.3.84+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExposeConfigURLProtocol                       = "expose.config.fabric8.io/url-protocol"
	ExposeConfigURLKeyAnnotation                  = "expose.config.fabric8.io/url-key"
	ExposeConfigHostKeyAnnotation                 = "expose.config.fabric8.io/host-key"
	ExposeConfigClusterPathKeyAnnotation          = "expose.config.fabric8.io/path-key"
	ExposeConfigClusterIPKeyAnnotation            = "expose.config.fabric8.io/clusterip-key"
	ExposeConfigClusterIPPortKeyAnnotation        = "expose.config.fabric8.io/clusterip-port-key"
	ExposeConfigClusterIPPortIfEmptyKeyAnnotation = "expose.config.fabric8.io/clusterip-port-if-empty-key"
	ExposeConfigApiServerKeyAnnotation            = "expose.config.fabric8.io/apiserver-key"
	ExposeConfigApiServerURLKeyAnnotation         = "expose.config.fabric8.io/apiserver-url-key"
	ExposeConfigConsoleURLKeyAnnotation           = "expose.config.fabric8.io/console-url-key"
	ExposeConfigApiServerProtocolKeyAnnotation    = "expose.config.fabric8.io/apiserver-protocol-key"
	ExposeConfigOAuthAuthorizeURLKeyAnnotation    = "expose.config.fabric8.io/oauth-authorize-url-key"

	ExposeConfigYamlAnnotation = "expose.config.fabric8.io/config-yaml"

	OAuthAuthorizeUrlEnvVar = "OAUTH_AUTHORIZE_URL"
)

Variables

View Source
var (
	DefaultConfig = Config{}
)

Functions

func GetServicePort

func GetServicePort(svc *api.Service) string

Types

type Config

type Config struct {
	Domain                string   `yaml:"domain,omitempty" json:"domain"`
	Exposer               string   `yaml:"exposer" json:"exposer"`
	PathMode              string   `yaml:"path-mode" json:"path_mode"`
	ApiServer             string   `yaml:"apiserver,omitempty" json:"api_server"`
	NodeIP                string   `yaml:"node-ip,omitempty" json:"node_ip"`
	RouteHost             string   `yaml:"route-host,omitempty" json:"route_host"`
	RouteUsePath          bool     `yaml:"route-use-path,omitempty" json:"route_use_path"`
	ConsoleURL            string   `yaml:"console-url,omitempty" json:"console_url"`
	AuthorizePath         string   `yaml:"authorize-path,omitempty" json:"authorize_path"`
	ApiServerProtocol     string   `yaml:"apiserver-protocol" json:"api_server_protocol"`
	WatchNamespaces       string   `yaml:"watch-namespaces" json:"watch_namespaces"`
	WatchCurrentNamespace bool     `yaml:"watch-current-namespace" json:"watch_current_namespace"`
	HTTP                  bool     `yaml:"http" json:"http"`
	TLSAcme               bool     `yaml:"tls-acme" json:"tls_acme"`
	UrlTemplate           string   `yaml:"urltemplate,omitempty" json:"url_template"`
	Services              []string `yaml:"services,omitempty" json:"services"`
	// contains filtered or unexported fields
}

func Load

func Load(s string) (*Config, error)

func LoadFile

func LoadFile(path string) (*Config, bool, error)

func MapToConfig

func MapToConfig(data map[string]string) (*Config, error)

MapToConfig converts the ConfigMap data to a Config object

func (Config) String

func (c Config) String() string

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

type ConfigYaml

type ConfigYaml struct {
	Key        string
	Expression string
	Prefix     string
	Suffix     string
}

func (*ConfigYaml) UpdateConfigMap

func (c *ConfigYaml) UpdateConfigMap(configMap *api.ConfigMap, values map[string]string) bool

type Controller

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

func NewController

func NewController(
	kubeClient *client.Client,
	restClientConfig *restclient.Config,
	encoder runtime.Encoder,
	resyncPeriod time.Duration, namespace string, config *Config) (*Controller, error)

func (*Controller) Hasrun

func (c *Controller) Hasrun() bool

func (*Controller) Run

func (c *Controller) Run()

Run starts the controller.

func (*Controller) Stop

func (c *Controller) Stop()

type OAuthServer

type OAuthServer struct {
	Issuer                string `json:"issuer,omitempty"`
	AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"`
	TokenEndpoint         string `json:"token_endpoint,omitempty"`
}

Jump to

Keyboard shortcuts

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