Documentation ¶
Index ¶
- type Client
- func (c *Client) GetAnnouncementsChannel() <-chan interface{}
- func (c *Client) GetConfigMap() ([]byte, error)
- func (c *Client) GetOSMNamespace() string
- func (c *Client) IsEgressEnabled() bool
- func (c *Client) IsPermissiveTrafficPolicyMode() bool
- func (c *Client) IsPrometheusScrapingEnabled() bool
- func (c *Client) IsZipkinTracingEnabled() bool
- type Configurator
- type FakeConfigurator
- func (f FakeConfigurator) GetAnnouncementsChannel() <-chan interface{}
- func (f FakeConfigurator) GetConfigMap() ([]byte, error)
- func (f FakeConfigurator) GetOSMNamespace() string
- func (f FakeConfigurator) IsEgressEnabled() bool
- func (f FakeConfigurator) IsPermissiveTrafficPolicyMode() bool
- func (f FakeConfigurator) IsPrometheusScrapingEnabled() bool
- func (f FakeConfigurator) IsZipkinTracingEnabled() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the k8s client struct for the OSM Config.
func (*Client) GetAnnouncementsChannel ¶
func (c *Client) GetAnnouncementsChannel() <-chan interface{}
GetAnnouncementsChannel returns a channel, which is used to announce when changes have been made to the OSM ConfigMap.
func (*Client) GetConfigMap ¶
GetConfigMap returns the ConfigMap in pretty JSON.
func (*Client) GetOSMNamespace ¶
GetOSMNamespace returns the namespace in which the OSM controller pod resides.
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) IsZipkinTracingEnabled ¶
IsZipkinTracingEnabled determines whether Zipkin tracing is enabled
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 // IsPrometheusScrapingEnabled determines whether Prometheus is enabled for scraping metrics IsPrometheusScrapingEnabled() bool // IsZipkinTracingEnabled determines whether Zipkin tracing is enabled IsZipkinTracingEnabled() bool // GetAnnouncementsChannel returns a channel, which is used to announce when changes have been made to the OSM ConfigMap GetAnnouncementsChannel() <-chan interface{} }
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.
func NewFakeConfigurator ¶
func NewFakeConfigurator() Configurator
NewFakeConfigurator create a new fake Configurator
type FakeConfigurator ¶
type FakeConfigurator struct { OSMNamespace string PermissiveTrafficPolicyMode bool Egress bool PrometheusScraping bool ZipkinTracing bool }
FakeConfigurator is the fake type for the Configurator client
func (FakeConfigurator) GetAnnouncementsChannel ¶
func (f FakeConfigurator) GetAnnouncementsChannel() <-chan interface{}
GetAnnouncementsChannel returns a fake announcement channel
func (FakeConfigurator) GetConfigMap ¶
func (f FakeConfigurator) GetConfigMap() ([]byte, error)
GetConfigMap returns the data stored in the configMap
func (FakeConfigurator) GetOSMNamespace ¶
func (f FakeConfigurator) GetOSMNamespace() string
GetOSMNamespace returns the namespace in which the OSM controller pod resides.
func (FakeConfigurator) IsEgressEnabled ¶
func (f FakeConfigurator) IsEgressEnabled() bool
IsEgressEnabled determines whether egress is globally enabled in the mesh or not.
func (FakeConfigurator) IsPermissiveTrafficPolicyMode ¶
func (f FakeConfigurator) IsPermissiveTrafficPolicyMode() bool
IsPermissiveTrafficPolicyMode tells us whether the OSM Control Plane is in permissive mode
func (FakeConfigurator) IsPrometheusScrapingEnabled ¶
func (f FakeConfigurator) IsPrometheusScrapingEnabled() bool
IsPrometheusScrapingEnabled determines whether Prometheus is enabled for scraping metrics
func (FakeConfigurator) IsZipkinTracingEnabled ¶
func (f FakeConfigurator) IsZipkinTracingEnabled() bool
IsZipkinTracingEnabled determines whether Zipkin tracing is enabled