Documentation ¶
Overview ¶
Package configurator is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetBoolValueForKey(configMap *v1.ConfigMap, key string) (bool, error)
- func GetIntValueForKey(configMap *v1.ConfigMap, key string) (int, error)
- func GetStringValueForKey(configMap *v1.ConfigMap, key string) (string, error)
- func NewValidatingWebhook(kubeClient kubernetes.Interface, certManager certificate.Manager, ...) error
- type Client
- func (c *Client) GetConfigMap() ([]byte, error)
- func (c *Client) GetEnvoyLogLevel() string
- func (c *Client) GetOSMNamespace() string
- func (c *Client) GetOutboundIPRangeExclusionList() []string
- func (c *Client) GetServiceCertValidityPeriod() time.Duration
- func (c *Client) GetTracingEndpoint() string
- func (c *Client) GetTracingHost() string
- func (c *Client) GetTracingPort() uint32
- func (c *Client) IsDebugServerEnabled() bool
- func (c *Client) IsEgressEnabled() bool
- func (c *Client) IsPermissiveTrafficPolicyMode() bool
- func (c *Client) IsPrometheusScrapingEnabled() bool
- func (c *Client) IsTracingEnabled() bool
- func (c *Client) UseHTTPSIngress() bool
- type Configurator
- type MockConfigurator
- func (m *MockConfigurator) EXPECT() *MockConfiguratorMockRecorder
- func (m *MockConfigurator) GetConfigMap() ([]byte, error)
- func (m *MockConfigurator) GetEnvoyLogLevel() string
- func (m *MockConfigurator) GetOSMNamespace() string
- func (m *MockConfigurator) GetOutboundIPRangeExclusionList() []string
- func (m *MockConfigurator) GetServiceCertValidityPeriod() time.Duration
- func (m *MockConfigurator) GetTracingEndpoint() string
- func (m *MockConfigurator) GetTracingHost() string
- func (m *MockConfigurator) GetTracingPort() uint32
- func (m *MockConfigurator) IsDebugServerEnabled() bool
- func (m *MockConfigurator) IsEgressEnabled() bool
- func (m *MockConfigurator) IsPermissiveTrafficPolicyMode() bool
- func (m *MockConfigurator) IsPrometheusScrapingEnabled() bool
- func (m *MockConfigurator) IsTracingEnabled() bool
- func (m *MockConfigurator) UseHTTPSIngress() bool
- type MockConfiguratorMockRecorder
- func (mr *MockConfiguratorMockRecorder) GetConfigMap() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetEnvoyLogLevel() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetOSMNamespace() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetOutboundIPRangeExclusionList() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetServiceCertValidityPeriod() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetTracingEndpoint() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetTracingHost() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) GetTracingPort() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) IsDebugServerEnabled() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) IsEgressEnabled() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) IsPermissiveTrafficPolicyMode() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) IsPrometheusScrapingEnabled() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) IsTracingEnabled() *gomock.Call
- func (mr *MockConfiguratorMockRecorder) UseHTTPSIngress() *gomock.Call
Constants ¶
const (
// PermissiveTrafficPolicyModeKey is the key name used for permissive mode in the ConfigMap
PermissiveTrafficPolicyModeKey = "permissive_traffic_policy_mode"
)
const (
// ValidatingWebhookName is the name of the validating webhook used for validating osm-config
ValidatingWebhookName = "osm-config-webhook.k8s.io"
)
Variables ¶
var ( // ValidEnvoyLogLevels is a list of envoy log levels ValidEnvoyLogLevels = []string{"trace", "debug", "info", "warning", "warn", "error", "critical", "off"} )
Functions ¶
func GetBoolValueForKey ¶ added in v0.6.0
GetBoolValueForKey returns the boolean value for a key and an error in case of errors
func GetIntValueForKey ¶ added in v0.6.0
GetIntValueForKey returns the integer value for a key and an error in case of errors
func GetStringValueForKey ¶ added in v0.6.0
GetStringValueForKey returns the string value for a key and an error in case of errors
func NewValidatingWebhook ¶ added in v0.7.0
func NewValidatingWebhook(kubeClient kubernetes.Interface, certManager certificate.Manager, osmNamespace, webhookConfigName string, stop <-chan struct{}) error
NewValidatingWebhook starts a new web server handling requests from the ValidatingWebhookConfiguration
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the k8s client struct for the OSM Config.
func (*Client) GetConfigMap ¶
GetConfigMap returns the ConfigMap in pretty JSON.
func (*Client) GetEnvoyLogLevel ¶ added in v0.3.0
GetEnvoyLogLevel returns the envoy log level
func (*Client) GetOSMNamespace ¶
GetOSMNamespace returns the namespace in which the OSM controller pod resides.
func (*Client) GetOutboundIPRangeExclusionList ¶ added in v0.7.0
GetOutboundIPRangeExclusionList returns the list of IP ranges of the form x.x.x.x/y to exclude from outbound sidecar interception
func (*Client) GetServiceCertValidityPeriod ¶ added in v0.4.2
GetServiceCertValidityPeriod returns the validity duration for service certificates, and a default in case of invalid duration
func (*Client) GetTracingEndpoint ¶ added in v0.4.0
GetTracingEndpoint returns the listener's collector endpoint
func (*Client) GetTracingHost ¶ added in v0.4.0
GetTracingHost is the host to which we send tracing spans
func (*Client) GetTracingPort ¶ added in v0.4.0
GetTracingPort returns the tracing listener port
func (*Client) IsDebugServerEnabled ¶ added in v0.4.2
IsDebugServerEnabled determines whether osm debug HTTP server is enabled
func (*Client) IsEgressEnabled ¶
IsEgressEnabled determines whether egress is globally enabled in the mesh or not.
func (*Client) IsPermissiveTrafficPolicyMode ¶
IsPermissiveTrafficPolicyMode tells us whether the OSM Control Plane is in permissive mode, where all existing traffic is allowed to flow as it is, or it is in SMI Spec mode, in which only traffic between source/destinations referenced in SMI policies is allowed.
func (*Client) IsPrometheusScrapingEnabled ¶
IsPrometheusScrapingEnabled determines whether Prometheus is enabled for scraping metrics
func (*Client) IsTracingEnabled ¶ added in v0.4.0
IsTracingEnabled returns whether tracing is enabled
func (*Client) UseHTTPSIngress ¶
UseHTTPSIngress determines whether traffic between ingress and backend pods should use HTTPS protocol
type Configurator ¶
type Configurator interface { // GetOSMNamespace returns the namespace in which OSM controller pod resides GetOSMNamespace() string // GetConfigMap returns the ConfigMap in pretty JSON (human readable) GetConfigMap() ([]byte, error) // IsPermissiveTrafficPolicyMode determines whether we are in "allow-all" mode or SMI policy (block by default) mode IsPermissiveTrafficPolicyMode() bool // IsEgressEnabled determines whether egress is globally enabled in the mesh or not IsEgressEnabled() bool // IsDebugServerEnabled determines whether osm debug HTTP server is enabled IsDebugServerEnabled() bool // IsPrometheusScrapingEnabled determines whether Prometheus is enabled for scraping metrics IsPrometheusScrapingEnabled() bool // IsTracingEnabled returns whether tracing is enabled IsTracingEnabled() bool // GetTracingHost is the host to which we send tracing spans GetTracingHost() string // GetTracingPort returns the tracing listener port GetTracingPort() uint32 // GetTracingEndpoint returns the collector endpoint GetTracingEndpoint() string // UseHTTPSIngress determines whether protocol used for traffic from ingress to backend pods should be HTTPS. UseHTTPSIngress() bool // GetEnvoyLogLevel returns the envoy log level GetEnvoyLogLevel() string // GetServiceCertValidityPeriod returns the validity duration for service certificates GetServiceCertValidityPeriod() time.Duration // GetOutboundIPRangeExclusionList returns the list of IP ranges of the form x.x.x.x/y to exclude from outbound sidecar interception GetOutboundIPRangeExclusionList() []string }
Configurator is the controller interface for K8s namespaces
func NewConfigurator ¶
func NewConfigurator(kubeClient kubernetes.Interface, stop <-chan struct{}, osmNamespace, osmConfigMapName string) Configurator
NewConfigurator implements configurator.Configurator and creates the Kubernetes client to manage namespaces.
type MockConfigurator ¶ added in v0.4.0
type MockConfigurator struct {
// contains filtered or unexported fields
}
MockConfigurator is a mock of Configurator interface
func NewMockConfigurator ¶ added in v0.4.0
func NewMockConfigurator(ctrl *gomock.Controller) *MockConfigurator
NewMockConfigurator creates a new mock instance
func (*MockConfigurator) EXPECT ¶ added in v0.4.0
func (m *MockConfigurator) EXPECT() *MockConfiguratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockConfigurator) GetConfigMap ¶ added in v0.4.0
func (m *MockConfigurator) GetConfigMap() ([]byte, error)
GetConfigMap mocks base method
func (*MockConfigurator) GetEnvoyLogLevel ¶ added in v0.4.0
func (m *MockConfigurator) GetEnvoyLogLevel() string
GetEnvoyLogLevel mocks base method
func (*MockConfigurator) GetOSMNamespace ¶ added in v0.4.0
func (m *MockConfigurator) GetOSMNamespace() string
GetOSMNamespace mocks base method
func (*MockConfigurator) GetOutboundIPRangeExclusionList ¶ added in v0.7.0
func (m *MockConfigurator) GetOutboundIPRangeExclusionList() []string
GetOutboundIPRangeExclusionList mocks base method
func (*MockConfigurator) GetServiceCertValidityPeriod ¶ added in v0.4.2
func (m *MockConfigurator) GetServiceCertValidityPeriod() time.Duration
GetServiceCertValidityPeriod mocks base method
func (*MockConfigurator) GetTracingEndpoint ¶ added in v0.4.0
func (m *MockConfigurator) GetTracingEndpoint() string
GetTracingEndpoint mocks base method
func (*MockConfigurator) GetTracingHost ¶ added in v0.4.0
func (m *MockConfigurator) GetTracingHost() string
GetTracingHost mocks base method
func (*MockConfigurator) GetTracingPort ¶ added in v0.4.0
func (m *MockConfigurator) GetTracingPort() uint32
GetTracingPort mocks base method
func (*MockConfigurator) IsDebugServerEnabled ¶ added in v0.4.2
func (m *MockConfigurator) IsDebugServerEnabled() bool
IsDebugServerEnabled mocks base method
func (*MockConfigurator) IsEgressEnabled ¶ added in v0.4.0
func (m *MockConfigurator) IsEgressEnabled() bool
IsEgressEnabled mocks base method
func (*MockConfigurator) IsPermissiveTrafficPolicyMode ¶ added in v0.4.0
func (m *MockConfigurator) IsPermissiveTrafficPolicyMode() bool
IsPermissiveTrafficPolicyMode mocks base method
func (*MockConfigurator) IsPrometheusScrapingEnabled ¶ added in v0.4.0
func (m *MockConfigurator) IsPrometheusScrapingEnabled() bool
IsPrometheusScrapingEnabled mocks base method
func (*MockConfigurator) IsTracingEnabled ¶ added in v0.4.0
func (m *MockConfigurator) IsTracingEnabled() bool
IsTracingEnabled mocks base method
func (*MockConfigurator) UseHTTPSIngress ¶ added in v0.4.0
func (m *MockConfigurator) UseHTTPSIngress() bool
UseHTTPSIngress mocks base method
type MockConfiguratorMockRecorder ¶ added in v0.4.0
type MockConfiguratorMockRecorder struct {
// contains filtered or unexported fields
}
MockConfiguratorMockRecorder is the mock recorder for MockConfigurator
func (*MockConfiguratorMockRecorder) GetConfigMap ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetConfigMap() *gomock.Call
GetConfigMap indicates an expected call of GetConfigMap
func (*MockConfiguratorMockRecorder) GetEnvoyLogLevel ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetEnvoyLogLevel() *gomock.Call
GetEnvoyLogLevel indicates an expected call of GetEnvoyLogLevel
func (*MockConfiguratorMockRecorder) GetOSMNamespace ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetOSMNamespace() *gomock.Call
GetOSMNamespace indicates an expected call of GetOSMNamespace
func (*MockConfiguratorMockRecorder) GetOutboundIPRangeExclusionList ¶ added in v0.7.0
func (mr *MockConfiguratorMockRecorder) GetOutboundIPRangeExclusionList() *gomock.Call
GetOutboundIPRangeExclusionList indicates an expected call of GetOutboundIPRangeExclusionList
func (*MockConfiguratorMockRecorder) GetServiceCertValidityPeriod ¶ added in v0.4.2
func (mr *MockConfiguratorMockRecorder) GetServiceCertValidityPeriod() *gomock.Call
GetServiceCertValidityPeriod indicates an expected call of GetServiceCertValidityPeriod
func (*MockConfiguratorMockRecorder) GetTracingEndpoint ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetTracingEndpoint() *gomock.Call
GetTracingEndpoint indicates an expected call of GetTracingEndpoint
func (*MockConfiguratorMockRecorder) GetTracingHost ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetTracingHost() *gomock.Call
GetTracingHost indicates an expected call of GetTracingHost
func (*MockConfiguratorMockRecorder) GetTracingPort ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) GetTracingPort() *gomock.Call
GetTracingPort indicates an expected call of GetTracingPort
func (*MockConfiguratorMockRecorder) IsDebugServerEnabled ¶ added in v0.4.2
func (mr *MockConfiguratorMockRecorder) IsDebugServerEnabled() *gomock.Call
IsDebugServerEnabled indicates an expected call of IsDebugServerEnabled
func (*MockConfiguratorMockRecorder) IsEgressEnabled ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) IsEgressEnabled() *gomock.Call
IsEgressEnabled indicates an expected call of IsEgressEnabled
func (*MockConfiguratorMockRecorder) IsPermissiveTrafficPolicyMode ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) IsPermissiveTrafficPolicyMode() *gomock.Call
IsPermissiveTrafficPolicyMode indicates an expected call of IsPermissiveTrafficPolicyMode
func (*MockConfiguratorMockRecorder) IsPrometheusScrapingEnabled ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) IsPrometheusScrapingEnabled() *gomock.Call
IsPrometheusScrapingEnabled indicates an expected call of IsPrometheusScrapingEnabled
func (*MockConfiguratorMockRecorder) IsTracingEnabled ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) IsTracingEnabled() *gomock.Call
IsTracingEnabled indicates an expected call of IsTracingEnabled
func (*MockConfiguratorMockRecorder) UseHTTPSIngress ¶ added in v0.4.0
func (mr *MockConfiguratorMockRecorder) UseHTTPSIngress() *gomock.Call
UseHTTPSIngress indicates an expected call of UseHTTPSIngress