config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// NetworkConfigName is the name of the configmap containing all
	// customizations for networking features.
	NetworkConfigName = "config-network"

	// IstioOutboundIPRangesKey is the name of the configuration entry
	// that specifies Istio outbound ip ranges.
	IstioOutboundIPRangesKey = "istio.sidecar.includeOutboundIPRanges"
)
View Source
const (
	ControllerConfigName = "config-controller"
)
View Source
const (
	ObservabilityConfigName = "config-observability"
)

Variables

This section is empty.

Functions

func ToContext

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

Types

type Config

type Config struct {
	Controller    *Controller
	Network       *Network
	Observability *Observability
	Logging       *pkglogging.Config
	Autoscaler    *autoscaler.Config
}

+k8s:deepcopy-gen=false

func FromContext

func FromContext(ctx context.Context) *Config

type Controller

type Controller struct {
	// QueueSidecarImage is the name of the image used for the queue sidecar
	// injected into the revision pod
	QueueSidecarImage string

	// Repositories for which tag to digest resolving should be skipped
	RegistriesSkippingTagResolving map[string]struct{}
}

Controller includes the configurations for the controller.

func NewControllerConfigFromConfigMap

func NewControllerConfigFromConfigMap(config *corev1.ConfigMap) (*Controller, error)

NewControllerConfigFromConfigMap creates a Controller from the supplied configMap

func NewControllerConfigFromMap

func NewControllerConfigFromMap(configMap map[string]string) (*Controller, error)

NewControllerConfigFromMap creates a Controller from the supplied Map

func (*Controller) DeepCopy

func (in *Controller) DeepCopy() *Controller

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

func (*Controller) DeepCopyInto

func (in *Controller) DeepCopyInto(out *Controller)

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

type Network

type Network struct {
	// IstioOutboundIPRange specifies the IP ranges to intercept
	// by Istio sidecar.
	IstioOutboundIPRanges string
}

Network contains the networking configuration defined in the network config map.

func NewNetworkFromConfigMap

func NewNetworkFromConfigMap(configMap *corev1.ConfigMap) (*Network, error)

NewNetworkFromConfigMap creates a Network from the supplied ConfigMap

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

type Observability

type Observability struct {
	// EnableVarLogCollection dedicates whether to set up a fluentd sidecar to
	// collect logs under /var/log/.
	EnableVarLogCollection bool

	// TODO(#818): Use the fluentd deamon set to collect /var/log.
	// FluentdSidecarImage is the name of the image used for the fluentd sidecar
	// injected into the revision pod. It is used only when enableVarLogCollection
	// is true.
	FluentdSidecarImage string

	// FluentdSidecarOutputConfig is the config for fluentd sidecar to specify
	// logging output destination.
	FluentdSidecarOutputConfig string

	// LoggingURLTemplate is a string containing the logging url template where
	// the variable REVISION_UID will be replaced with the created revision's UID.
	LoggingURLTemplate string
}

Observability contains the configuration defined in the observability ConfigMap.

func NewObservabilityFromConfigMap

func NewObservabilityFromConfigMap(configMap *corev1.ConfigMap) (*Observability, error)

NewObservabilityFromConfigMap creates a Observability from the supplied ConfigMap

func (*Observability) DeepCopy

func (in *Observability) DeepCopy() *Observability

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

func (*Observability) DeepCopyInto

func (in *Observability) DeepCopyInto(out *Observability)

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

type Store

type Store struct {
	*configmap.UntypedStore
}

+k8s:deepcopy-gen=false

func NewStore

func NewStore(logger configmap.Logger) *Store

func (*Store) Load

func (s *Store) Load() *Config

func (*Store) ToContext

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

Jump to

Keyboard shortcuts

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