namespace

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MonitorLabel is the annotation label used to indicate whether a namespace should be monitored by OSM.
	MonitorLabel = "openservicemesh.io/monitored-by"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a struct for all components necessary to connect to and maintain state of a Kubernetes cluster.

func (Client) IsMonitoredNamespace

func (c Client) IsMonitoredNamespace(namespace string) bool

IsMonitoredNamespace returns a boolean indicating if the namespace is among the list of monitored namespaces

type Controller

type Controller interface {
	IsMonitoredNamespace(string) bool
}

Controller is the controller interface for K8s namespaces

func NewNamespaceController

func NewNamespaceController(kubeClient kubernetes.Interface, meshName string, stop chan struct{}) Controller

NewNamespaceController implements namespace.Controller and creates the Kubernetes client to manage namespaces.

type FakeNamespaceController

type FakeNamespaceController struct {
	Controller
	// contains filtered or unexported fields
}

FakeNamespaceController is a fake namespace.Controller used for testing

func NewFakeNamespaceController

func NewFakeNamespaceController(monitoredNamespaces []string) FakeNamespaceController

NewFakeNamespaceController creates a fake namespace.Controler object for testing

func (FakeNamespaceController) IsMonitoredNamespace

func (f FakeNamespaceController) IsMonitoredNamespace(namespace string) bool

IsMonitoredNamespace returns if the namespace is monitored

Jump to

Keyboard shortcuts

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