config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Ingress controller depends.

Index

Constants

View Source
const (
	// IstioConfigName is the name of the configmap containing all
	// customizations for istio related features.
	IstioConfigName = "config-istio"
)

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, c *Config) context.Context

ToContext adds config to given context.

Types

type Config

type Config struct {
	Istio   *Istio
	Network *network.Config
}

Config of Istio. +k8s:deepcopy-gen=false

func FromContext

func FromContext(ctx context.Context) *Config

FromContext fetch config from context.

type Gateway

type Gateway struct {
	Namespace  string
	Name       string
	ServiceURL string
}

Gateway specifies the name of the Gateway and the K8s Service backing it.

func (*Gateway) DeepCopy

func (in *Gateway) DeepCopy() *Gateway

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway.

func (*Gateway) DeepCopyInto

func (in *Gateway) DeepCopyInto(out *Gateway)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Gateway) QualifiedName added in v0.8.0

func (g Gateway) QualifiedName() string

QualifiedName returns gateway name in '{namespace}/{name}' format.

type Istio

type Istio struct {
	// IngressGateway specifies the gateway urls for public Ingress.
	IngressGateways []Gateway

	// LocalGateway specifies the gateway urls for public & private Ingress.
	LocalGateways []Gateway
}

Istio contains istio related configuration defined in the istio config map.

func NewIstioFromConfigMap

func NewIstioFromConfigMap(configMap *corev1.ConfigMap) (*Istio, error)

NewIstioFromConfigMap creates an Istio config from the supplied ConfigMap

func (*Istio) DeepCopy

func (in *Istio) DeepCopy() *Istio

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Istio.

func (*Istio) DeepCopyInto

func (in *Istio) DeepCopyInto(out *Istio)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Store

type Store struct {
	*configmap.UntypedStore
}

Store is configmap.UntypedStore based config store. +k8s:deepcopy-gen=false

func NewStore

func NewStore(logger configmap.Logger, onAfterStore ...func(name string, value interface{})) *Store

NewStore creates a configmap.UntypedStore based config store.

logger must be non-nil implementation of configmap.Logger (commonly used loggers conform)

onAfterStore is a variadic list of callbacks to run after the ConfigMap has been processed and stored.

See also: configmap.NewUntypedStore().

func (*Store) Load

func (s *Store) Load() *Config

Load fetches config from Store.

func (*Store) ToContext

func (s *Store) ToContext(ctx context.Context) context.Context

ToContext adds Store contents to given context.

Jump to

Keyboard shortcuts

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