Documentation ¶
Index ¶
- Constants
- func GetAppLabel(appName string) map[string]string
- func GetDeploymentWithName(deployments []v1.Deployment, name string) *v1.Deployment
- func IsK8sObjectDoesNotExist(err error) bool
- type Cluster
- func (k *Cluster) CreateK8Object(ctx context.Context, object runtime.Object) error
- func (k *Cluster) DeleteK8Object(ctx context.Context, object runtime.Object) error
- func (k *Cluster) GetDeploymentsWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*v1.DeploymentList, error)
- func (k *Cluster) GetService(ctx context.Context, namespace string, name string) (*coreV1.Service, error)
- func (k *Cluster) GetServicesWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*coreV1.ServiceList, error)
- func (k *Cluster) UpdateK8Object(ctx context.Context, object runtime.Object) error
- type ClusterInterface
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 GetDeploymentWithName ¶
func GetDeploymentWithName(deployments []v1.Deployment, name string) *v1.Deployment
func IsK8sObjectDoesNotExist ¶
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) CreateK8Object ¶
func (*Cluster) DeleteK8Object ¶
func (*Cluster) GetDeploymentsWithLabel ¶
func (*Cluster) GetService ¶
func (*Cluster) GetServicesWithLabel ¶ added in v0.1.2
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) (*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 }
func NewK8Cluster ¶
func NewK8Cluster(mgr manager.Manager, cfg config.RuntimeConfig) ClusterInterface
Click to show internal directories.
Click to hide internal directories.