k8s

package
v0.0.0-...-bb2f907 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAllClusterWatchers

func CloseAllClusterWatchers()

CloseAllClusterWatchers close all channels

func HandleStatusUpdate

func HandleStatusUpdate(ctx context.Context, clusterId string, id string, v *v1alpha1.ResourceBundleState)

HandleStatusUpdate for an application in a cluster

func StopClusterWatcher

func StopClusterWatcher(clusterId string)

StopClusterWatcher stop watching a cluster

Types

type K8sProvider

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

Connection is for a cluster

func NewK8sProvider

func NewK8sProvider(ctx context.Context, cid, app, cluster, level, namespace string) (*K8sProvider, error)

func (*K8sProvider) Apply

func (p *K8sProvider) Apply(ctx context.Context, name string, ref interface{}, content []byte) (interface{}, error)

Apply resource to the cluster

func (*K8sProvider) ApplyConfig

func (p *K8sProvider) ApplyConfig(ctx context.Context, config interface{}) error

For K8s this function is not required to do any operation at this time

func (*K8sProvider) ApplyStatusCR

func (p *K8sProvider) ApplyStatusCR(ctx context.Context, name string, content []byte) error

ApplyStatusCR applies status CR

func (*K8sProvider) CleanClientProvider

func (p *K8sProvider) CleanClientProvider() error

If file exists delete it

func (*K8sProvider) Commit

func (p *K8sProvider) Commit(ctx context.Context, ref interface{}) error

Commit resources to the cluster Not required in K8s case

func (*K8sProvider) Create

func (p *K8sProvider) Create(name string, ref interface{}, content []byte) (interface{}, error)

Creates a new resource if the not already existing

func (*K8sProvider) Delete

func (p *K8sProvider) Delete(name string, ref interface{}, content []byte) (interface{}, error)

Delete resource from the cluster

func (*K8sProvider) DeleteConfig

func (p *K8sProvider) DeleteConfig(ctx context.Context, config interface{}) error

func (*K8sProvider) DeleteStatusCR

func (p *K8sProvider) DeleteStatusCR(ctx context.Context, name string, content []byte) error

DeleteStatusCR deletes status CR

func (*K8sProvider) Get

func (p *K8sProvider) Get(ctx context.Context, name string, gvkRes []byte) ([]byte, error)

Get resource from the cluster

func (*K8sProvider) IsReachable

func (p *K8sProvider) IsReachable() error

IsReachable cluster reachablity test

func (*K8sProvider) StartClusterWatcher

func (c *K8sProvider) StartClusterWatcher(ctx context.Context) error

StartClusterWatcher watches for CR configBytes - Kubectl file data

func (*K8sProvider) TagResource

func (m *K8sProvider) TagResource(res []byte, label map[string]string) ([]byte, error)

Jump to

Keyboard shortcuts

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