anthos

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnthosGit

type AnthosGit struct {
	Repo        string `json:"repo"`
	Revision    string `json:"revision"`
	Branch      string `json:"branch"`
	Dir         string `json:"dir"`
	Auth        string `json:"auth"`
	NoSSLVerify bool   `json:"noSSLVerify"`
}

type AnthosProvider

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

Connection is for a cluster

func NewAnthosProvider

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

func (*AnthosProvider) Apply

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

Apply resource to the cluster

func (*AnthosProvider) ApplyConfig

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

func (*AnthosProvider) ApplyStatusCR

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

ApplyStatusCR applies status CR

func (*AnthosProvider) CleanClientProvider

func (p *AnthosProvider) CleanClientProvider() error

func (*AnthosProvider) Commit

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

Commit resources to the cluster

func (*AnthosProvider) Create

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

Creates a new resource if not already existing

func (*AnthosProvider) Delete

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

Delete resource from the cluster

func (*AnthosProvider) DeleteConfig

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

func (*AnthosProvider) DeleteStatusCR

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

DeleteStatusCR deletes status CR

func (*AnthosProvider) Get

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

Get resource from the cluster

func (*AnthosProvider) GetDeployedPath

func (p *AnthosProvider) GetDeployedPath(t string) string

Function to get path of "deployed" tracking file path params : string return : string

func (*AnthosProvider) GetPath

func (p *AnthosProvider) GetPath(t string) string

Function to get path of files stored in git params : string return : string

func (*AnthosProvider) IsReachable

func (p *AnthosProvider) IsReachable() error

IsReachable cluster reachablity test

func (*AnthosProvider) StartClusterWatcher

func (p *AnthosProvider) StartClusterWatcher(ctx context.Context) error

StartClusterWatcher watches for CR changes in git location

func (*AnthosProvider) TagResource

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

type MetaDatas

type MetaDatas struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
}

type Resource

type Resource struct {
	ApiVersion    string    `json:"apiVersion"`
	Kind          string    `json:"kind"`
	MetaData      MetaDatas `json:"metadata"`
	Specification Specs     `json:"spec,omitempty"`
}

type ResourceBundleStateV2

type ResourceBundleStateV2 struct {
	APIVersion json.RawMessage `json:"apiVersion,inline"`
	Kind       json.RawMessage `json:"kind,inline"`
	Meta       json.RawMessage `json:"metadata,omitempty"`
	Spec       json.RawMessage `json:"spec,omitempty"`
	Status     json.RawMessage `json:"status,omitempty"`
}

version of ResourceBundleState from monitor that allows emptying the Status field (Anthos compatibility)

type Specs

type Specs struct {
	Git AnthosGit `json:"git,omitempty"` // for Anthos RepoSync
}

Jump to

Keyboard shortcuts

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