cmconfig

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnableASM                   bool
	ASMReady                    bool
	ASMServiceNEGSkipNamespaces []string
}

Config holds configmap based configurations.

func NewConfig

func NewConfig() Config

NewConfig returns a Config instances with default values.

func (*Config) Equals

func (c *Config) Equals(other *Config) bool

Equals returns true if c equals to other.

func (*Config) LoadValue

func (c *Config) LoadValue(m map[string]string) error

LoadValue loads configs from a map, it will ignore any unknow/unvalid field.

type ConfigMapConfigController

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

ConfigMapConfigController is the ConfigMap based config controller. If cmConfigModeEnabled set to true, it will load the config from configmap: configMapNamespace/configMapName and restart ingress controller if the config has any illegal changes. If cmConfigModeEnabled set to false, it will return the default values for the configs.

func NewConfigMapConfigController

func NewConfigMapConfigController(kubeClient kubernetes.Interface, recorder record.EventRecorder, configMapNamespace, configMapName string) *ConfigMapConfigController

NewConfigMapConfigController creates a new ConfigMapConfigController, it will load the config from the target configmap

func (*ConfigMapConfigController) DisableASM added in v1.9.0

func (c *ConfigMapConfigController) DisableASM()

DisableASM sets the internal ASM mode to off and update the ASMReady to False.

func (*ConfigMapConfigController) GetConfig

func (c *ConfigMapConfigController) GetConfig() Config

GetConfig returns the internal Config

func (*ConfigMapConfigController) RecordEvent

func (c *ConfigMapConfigController) RecordEvent(eventtype, reason, message string) bool

RecordEvent records a event to the ASMConfigmap

func (*ConfigMapConfigController) RegisterInformer

func (c *ConfigMapConfigController) RegisterInformer(configMapInformer cache.SharedIndexInformer, cancel func())

RegisterInformer register the configmap based config controller handler to the configMapInformer which will watch the target configmap and send stop message to the stopCh if any valid change detected.

func (*ConfigMapConfigController) SetASMReadyFalse added in v1.9.0

func (c *ConfigMapConfigController) SetASMReadyFalse()

SetASMReadyFalse update the ASMReady to False.

func (*ConfigMapConfigController) SetASMReadyTrue added in v1.9.0

func (c *ConfigMapConfigController) SetASMReadyTrue()

SetASMReadyTrue update the ASMReady to True.

Jump to

Keyboard shortcuts

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