config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ClusterName string

	// IngressClass is the ingress class that this controller will monitor for
	IngressClass string

	AnnotationPrefix       string
	ALBNamePrefix          string
	DefaultTags            map[string]string
	DefaultTargetType      string
	DefaultBackendProtocol string

	SyncRateLimit float32

	RestrictScheme          bool
	RestrictSchemeNamespace string

	// InternetFacingIngresses is an dynamic setting that can be updated by configMaps
	InternetFacingIngresses map[string][]string

	FeatureGate FeatureGate
}

Configuration contains all the settings required by an Ingress controller

func NewConfiguration

func NewConfiguration() Configuration

NewConfiguration constructs new Configuration obj.

func (*Configuration) BindDynamicSettings

func (cfg *Configuration) BindDynamicSettings(mgr manager.Manager, c controller.Controller, cloud aws.CloudAPI) error

TODO: I'd prefer to keep config an plain data structure, and move this logic into the object that manages configuration, like current "store" object. Will move this logic there once i clean up the store object. BindDynamicSettings will force initial load of these dynamic settings from configMaps, and setup watcher for configMap changes.

func (*Configuration) BindEnv

func (cfg *Configuration) BindEnv() error

func (*Configuration) BindFlags

func (cfg *Configuration) BindFlags(fs *pflag.FlagSet)

BindFlags will bind the commandline flags to fields in config

func (*Configuration) Validate

func (cfg *Configuration) Validate() error

type Feature

type Feature string
const (
	WAF Feature = "waf"
)

type FeatureGate

type FeatureGate interface {
	// Enabled returns whether a feature is enabled
	Enabled(feature Feature) bool

	// Enable will enable a feature
	Enable(feature Feature)

	// Disable will disable a feature
	Disable(feature Feature)

	// BindFlags bind featureGate flags
	BindFlags(fs *pflag.FlagSet)
}

func NewFeatureGate

func NewFeatureGate() FeatureGate

NewFeatureGate constructs new featureGate

Jump to

Keyboard shortcuts

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