Documentation ¶
Index ¶
- type Client
- func (c *Client) GetAnnouncementsChannel() <-chan interface{}
- func (c *Client) GetConfigMap() ([]byte, error)
- func (c *Client) GetMeshCIDRRanges() []string
- func (c *Client) GetOSMNamespace() string
- func (c *Client) GetZipkinEndpoint() string
- func (c *Client) GetZipkinHost() string
- func (c *Client) GetZipkinPort() uint32
- func (c *Client) IsEgressEnabled() bool
- func (c *Client) IsPermissiveTrafficPolicyMode() bool
- func (c *Client) IsPrometheusScrapingEnabled() bool
- func (c *Client) IsZipkinTracingEnabled() bool
- func (c *Client) UseHTTPSIngress() bool
- type Configurator
- type FakeConfigurator
- func (f FakeConfigurator) GetAnnouncementsChannel() <-chan interface{}
- func (f FakeConfigurator) GetConfigMap() ([]byte, error)
- func (f FakeConfigurator) GetMeshCIDRRanges() []string
- func (f FakeConfigurator) GetOSMNamespace() string
- func (f FakeConfigurator) GetZipkinEndpoint() string
- func (f FakeConfigurator) GetZipkinHost() string
- func (f FakeConfigurator) GetZipkinPort() uint32
- func (f FakeConfigurator) IsEgressEnabled() bool
- func (f FakeConfigurator) IsPermissiveTrafficPolicyMode() bool
- func (f FakeConfigurator) IsPrometheusScrapingEnabled() bool
- func (f FakeConfigurator) IsZipkinTracingEnabled() bool
- func (f FakeConfigurator) UseHTTPSIngress() 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) GetMeshCIDRRanges ¶
GetMeshCIDRRanges returns a list of mesh CIDR ranges
func (*Client) GetOSMNamespace ¶
GetOSMNamespace returns the namespace in which the OSM controller pod resides.
func (*Client) GetZipkinEndpoint ¶ added in v0.1.0
GetZipkinEndpoint returns the Zipkin endpoint
func (*Client) GetZipkinHost ¶ added in v0.1.0
GetZipkinHost is the host to which we send Zipkin spans
func (*Client) GetZipkinPort ¶ added in v0.1.0
GetZipkinPort returns the Zipkin port
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
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 // IsPrometheusScrapingEnabled determines whether Prometheus is enabled for scraping metrics IsPrometheusScrapingEnabled() bool // IsZipkinTracingEnabled determines whether Zipkin tracing is enabled IsZipkinTracingEnabled() bool // GetZipkinHost is the host to which we send Zipkin spans GetZipkinHost() string // GetZipkinPort returns the Zipkin port GetZipkinPort() uint32 // GetZipkinEndpoint returns the Zipkin endpoint GetZipkinEndpoint() string // GetMeshCIDRRanges returns a list of mesh CIDR ranges GetMeshCIDRRanges() []string // UseHTTPSIngress determines whether protocol used for traffic from ingress to backend pods should be HTTPS. UseHTTPSIngress() 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
func NewFakeConfiguratorWithOptions ¶
func NewFakeConfiguratorWithOptions(f FakeConfigurator) Configurator
NewFakeConfiguratorWithOptions create a new fake Configurator
type FakeConfigurator ¶
type FakeConfigurator struct { OSMNamespace string PermissiveTrafficPolicyMode bool Egress bool PrometheusScraping bool ZipkinTracing bool MeshCIDRRanges []string HTTPSIngress 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) GetMeshCIDRRanges ¶
func (f FakeConfigurator) GetMeshCIDRRanges() []string
GetMeshCIDRRanges returns a list of mesh CIDR ranges
func (FakeConfigurator) GetOSMNamespace ¶
func (f FakeConfigurator) GetOSMNamespace() string
GetOSMNamespace returns the namespace in which the OSM controller pod resides.
func (FakeConfigurator) GetZipkinEndpoint ¶ added in v0.1.0
func (f FakeConfigurator) GetZipkinEndpoint() string
GetZipkinEndpoint returns the Zipkin endpoint
func (FakeConfigurator) GetZipkinHost ¶ added in v0.1.0
func (f FakeConfigurator) GetZipkinHost() string
GetZipkinHost is the host to which we send Zipkin spanspkg/envoy/cds/response.go
func (FakeConfigurator) GetZipkinPort ¶ added in v0.1.0
func (f FakeConfigurator) GetZipkinPort() uint32
GetZipkinPort returns the Zipkin port
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
func (FakeConfigurator) UseHTTPSIngress ¶
func (f FakeConfigurator) UseHTTPSIngress() bool
UseHTTPSIngress determines whether we use HTTPS for ingress to backend pods traffic