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 ¶
- func ApplyAll(client *Client, objects []json.RawMessage, kinds []string)
- func ApplyCoreMeshConfigs(client *Client, operatorCUE *cuemodule.OperatorCUE)
- func DeleteAllByGMObjectRefs(client *Client, objectsToDelete []gitops.GMObjectRef)
- func UnApplyAll(client *Client, objects []json.RawMessage, kinds []string)
- type CLI
- type Client
- type Cmd
- type GreymatterCLI
- func (c *GreymatterCLI) ConfigureMeshClient(mesh *meshv1.Mesh, sync *gitops.Sync)
- func (c *GreymatterCLI) EnsureClient(in string)
- func (c *GreymatterCLI) GetClient() *Client
- func (c *GreymatterCLI) MaybeConfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
- func (c *GreymatterCLI) RemoveMeshClient()
- func (c *GreymatterCLI) UnconfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
- type MockCLI
- func (m *MockCLI) ConfigureMeshClient(mesh *meshv1.Mesh, sync *gitops.Sync)
- func (m *MockCLI) EnsureClient(in string)
- func (m *MockCLI) GetClient() *Client
- func (m *MockCLI) MaybeConfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
- func (m *MockCLI) RemoveMeshClient()
- func (m *MockCLI) UnconfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCoreMeshConfigs ¶
func ApplyCoreMeshConfigs(client *Client, operatorCUE *cuemodule.OperatorCUE)
ApplyCoreMeshConfigs extracts the greymatter manifests from the CUE and applies them to control-api
func DeleteAllByGMObjectRefs ¶ added in v0.10.0
func DeleteAllByGMObjectRefs(client *Client, objectsToDelete []gitops.GMObjectRef)
func UnApplyAll ¶
func UnApplyAll(client *Client, objects []json.RawMessage, kinds []string)
Types ¶
type CLI ¶
type CLI interface { GetClient() *Client ConfigureMeshClient(mesh *meshv1.Mesh, sync *gitops.Sync) RemoveMeshClient() MaybeConfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string) EnsureClient(in string) UnconfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string) }
CLI interface for configuring Grey Matter
type GreymatterCLI ¶ added in v0.11.0
type GreymatterCLI struct { *sync.RWMutex Client *Client // contains filtered or unexported fields }
GreymatterCLI exposes methods for configuring clients that execute greymatter CLI commands.
func (*GreymatterCLI) ConfigureMeshClient ¶ added in v0.11.0
func (c *GreymatterCLI) ConfigureMeshClient(mesh *meshv1.Mesh, sync *gitops.Sync)
ConfigureMeshClient initializes or updates a greymatter CLI client utilizing a base64 encoded config.toml file.
func (*GreymatterCLI) EnsureClient ¶ added in v0.11.0
func (c *GreymatterCLI) EnsureClient(in string)
func (*GreymatterCLI) GetClient ¶ added in v0.11.0
func (c *GreymatterCLI) GetClient() *Client
func (*GreymatterCLI) MaybeConfigureSidecar ¶ added in v0.11.0
func (c *GreymatterCLI) MaybeConfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
MaybeConfigureSidecar applies fabric objects that add a workload to the mesh specified given the workload's annotations and a list of its corev1.Containers.
func (*GreymatterCLI) RemoveMeshClient ¶ added in v0.11.0
func (c *GreymatterCLI) RemoveMeshClient()
RemoveMeshClient cleans up a Client's goroutines before removing it from the *CLI.
func (*GreymatterCLI) UnconfigureSidecar ¶ added in v0.11.0
func (c *GreymatterCLI) UnconfigureSidecar(operatorCUE *cuemodule.OperatorCUE, name string, annotations map[string]string)
UnconfigureSidecar removes fabric objects, disconnecting the workload from the mesh specified
type MockCLI ¶ added in v0.11.0
MockCLI implements CLI for testing purposes
func (*MockCLI) ConfigureMeshClient ¶ added in v0.11.0
func (*MockCLI) EnsureClient ¶ added in v0.11.0
func (*MockCLI) MaybeConfigureSidecar ¶ added in v0.11.0
func (*MockCLI) RemoveMeshClient ¶ added in v0.11.0
func (m *MockCLI) RemoveMeshClient()