Documentation ¶
Index ¶
- func CloseAllClusterWatchers()
- func HandleStatusUpdate(ctx context.Context, clusterId string, id string, ...)
- func StopClusterWatcher(clusterId string)
- type K8sProvider
- func (p *K8sProvider) Apply(ctx context.Context, name string, ref interface{}, content []byte) (interface{}, error)
- func (p *K8sProvider) ApplyConfig(ctx context.Context, config interface{}) error
- func (p *K8sProvider) ApplyStatusCR(ctx context.Context, name string, content []byte) error
- func (p *K8sProvider) CleanClientProvider() error
- func (p *K8sProvider) Commit(ctx context.Context, ref interface{}) error
- func (p *K8sProvider) Create(name string, ref interface{}, content []byte) (interface{}, error)
- func (p *K8sProvider) Delete(name string, ref interface{}, content []byte) (interface{}, error)
- func (p *K8sProvider) DeleteConfig(ctx context.Context, config interface{}) error
- func (p *K8sProvider) DeleteStatusCR(ctx context.Context, name string, content []byte) error
- func (p *K8sProvider) Get(ctx context.Context, name string, gvkRes []byte) ([]byte, error)
- func (p *K8sProvider) IsReachable() error
- func (c *K8sProvider) StartClusterWatcher(ctx context.Context) error
- func (m *K8sProvider) TagResource(res []byte, label map[string]string) ([]byte, error)
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 ¶
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 ¶
DeleteStatusCR deletes status CR
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 ¶
Click to show internal directories.
Click to hide internal directories.