k8

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Deployment = "Deployment"
	Pod        = "Pod"
	Service    = "Service"
	Endpoints  = "Endpoints"
	Ingress    = "Ingress"
)
View Source
const (
	AppKey = "flink-app"
)

Variables

This section is empty.

Functions

func GetAppLabel

func GetAppLabel(appName string) map[string]string

func GetDeploymentWithName

func GetDeploymentWithName(deployments []v1.Deployment, name string) *v1.Deployment

func IsK8sObjectDoesNotExist

func IsK8sObjectDoesNotExist(err error) bool

Types

type Cluster

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

func (*Cluster) CreateK8Object

func (k *Cluster) CreateK8Object(ctx context.Context, object runtime.Object) error

func (*Cluster) DeleteK8Object

func (k *Cluster) DeleteK8Object(ctx context.Context, object runtime.Object) error

func (*Cluster) GetDeploymentsWithLabel

func (k *Cluster) GetDeploymentsWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*v1.DeploymentList, error)

func (*Cluster) GetService

func (k *Cluster) GetService(ctx context.Context, namespace string, name string, version string) (*coreV1.Service, error)

func (*Cluster) GetServicesWithLabel added in v0.1.2

func (k *Cluster) GetServicesWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*coreV1.ServiceList, error)

func (*Cluster) UpdateK8Object

func (k *Cluster) UpdateK8Object(ctx context.Context, object runtime.Object) error

func (*Cluster) UpdateStatus added in v0.4.0

func (k *Cluster) UpdateStatus(ctx context.Context, object runtime.Object) error

type ClusterInterface

type ClusterInterface interface {
	// Tries to fetch the value from the controller runtime manager cache, if it does not exist, call API server
	GetDeploymentsWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*v1.DeploymentList, error)

	// Tries to fetch the value from the controller runtime manager cache, if it does not exist, call API server
	GetService(ctx context.Context, namespace string, name string, version string) (*coreV1.Service, error)
	GetServicesWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*coreV1.ServiceList, error)

	CreateK8Object(ctx context.Context, object runtime.Object) error
	UpdateK8Object(ctx context.Context, object runtime.Object) error
	DeleteK8Object(ctx context.Context, object runtime.Object) error

	UpdateStatus(ctx context.Context, object runtime.Object) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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