gmapi

package
v0.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gmapi executes greymatter CLI commands to configure mesh behavior in Control and Catalog APIs in each install namespace for each mesh. It enables Mesh CR specifications to define how a mesh should be configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAll

func ApplyAll(client *Client, objects []json.RawMessage, kinds []string)

func UnApplyAll

func UnApplyAll(client *Client, objects []json.RawMessage, kinds []string)

Types

type CLI

type CLI struct {
	*sync.RWMutex

	// List of sidecars in the mesh (including core components)
	// currently only used for populating Spire subjects for Redis ingress
	SidecarList []string
	// contains filtered or unexported fields
}

CLI exposes methods for configuring clients that execute greymatter CLI commands.

func New

func New(ctx context.Context, operatorCUE *cuemodule.OperatorCUE) (*CLI, error)

New returns a new *CLI instance. It receives a context for cleaning up goroutines started by the *CLI.

func (*CLI) ConfigureMeshClient

func (c *CLI) ConfigureMeshClient(mesh *v1alpha1.Mesh)

ConfigureMeshClient initializes or updates a Client with flags specifying connection options for reaching Control and Catalog for the given Mesh CR.

func (*CLI) ConfigureSidecar

func (c *CLI) ConfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, metadata metav1.ObjectMeta)

ConfigureSidecar applies fabric objects that add a workload to the mesh specified given the workload's annotations and a list of its corev1.Containers.

func (*CLI) RemoveMeshClient

func (c *CLI) RemoveMeshClient()

RemoveMeshClient cleans up a Client's goroutines before removing it from the *CLI.

func (*CLI) UnconfigureSidecar

func (c *CLI) UnconfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, metadata metav1.ObjectMeta)

UnconfigureSidecar removes fabric objects, disconnecting the workload from the mesh specified

type Client

type Client struct {
	ControlCmds chan Cmd
	CatalogCmds chan Cmd
	// contains filtered or unexported fields
}

type Cmd

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

func MkApply

func MkApply(kind string, data json.RawMessage) Cmd

Jump to

Keyboard shortcuts

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