addon

package
v1.3.0-rc.0...-a07df58 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LabelKeyPrefix = "annotations/"
)

Variables

This section is empty.

Functions

func Create

func Remove

func SetAddonLabelsAndAnnotations

func SetAddonLabelsAndAnnotations(service apistructs.Service, labels, annotations map[string]string)

func Update

Types

type AddonOperator

type AddonOperator interface {
	// Determine whether this cluster supports addon operator
	IsSupported() bool
	// Verify the legality of sg converted from diceyml
	Validate(*apistructs.ServiceGroup) error
	// Convert sg to cr. Because of the different definitions of cr, use interface() here
	Convert(*apistructs.ServiceGroup) interface{}
	// the cr converted by Convert in k8s deploying
	Create(interface{}) error
	// Check running status
	Inspect(*apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)

	Remove(*apistructs.ServiceGroup) error

	Update(interface{}) error
}

type DaemonsetUtil

type DaemonsetUtil interface {
	Create(*appsv1.DaemonSet) error
	Update(*appsv1.DaemonSet) error
	Delete(namespace, name string) error
	Get(namespace, name string) (*appsv1.DaemonSet, error)
	List(namespace string, labelSelector map[string]string) (*appsv1.DaemonSetList, error)
}

type DeploymentUtil

type DeploymentUtil interface {
	Patch(namespace, deployName, containerName string, snippet v1.Container) error
	Create(*appsv1.Deployment) error
	Get(namespace, name string) (*appsv1.Deployment, error)
	List(namespace string, labelSelector map[string]string) (*appsv1.DeploymentList, error)
	Delete(namespace, name string) error
}

type HealthcheckUtil

type HealthcheckUtil interface {
	NewHealthcheckProbe(*apistructs.Service) *corev1.Probe
}

type ImageSecretUtil

type ImageSecretUtil interface {
	//The secret used to pull the mirror under the default namespace is copied to the current ns,
	// Then add this secret to the default sa of this ns
	NewImageSecret(ns string) error
}

type K8SUtil

type K8SUtil interface {
	GetK8SAddr() string
}

type NamespaceUtil

type NamespaceUtil interface {
	Exists(ns string) error
	Create(ns string, labels map[string]string) error
	Delete(ns string, force ...bool) error
}

type OvercommitUtil

type OvercommitUtil interface {
	CPUOvercommit(limit float64) float64
	MemoryOvercommit(limit int) int
}

type PVCUtil

type PVCUtil interface {
	Create(pvc *corev1.PersistentVolumeClaim) error
}

type SecretUtil

type SecretUtil interface {
	Get(ns, name string) (*corev1.Secret, error)
	Create(*corev1.Secret) error
	CreateIfNotExist(secret *corev1.Secret) error
}

type ServiceUtil

type ServiceUtil interface {
	List(namespace string, selectors map[string]string) (corev1.ServiceList, error)
	Create(service *corev1.Service) error
	Get(namespace, name string) (*corev1.Service, error)
	Put(service *corev1.Service) error
	Delete(namespace, name string) error
}

type StatefulsetUtil

type StatefulsetUtil interface {
	Create(*appsv1.StatefulSet) error
	Delete(namespace, name string) error
	Get(namespace, name string) (*appsv1.StatefulSet, error)
	List(namespace string) (appsv1.StatefulSetList, error)
}

Directories

Path Synopsis
v1
Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.erda.cloud
Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.erda.cloud
v1
Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.erda.cloud
Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.erda.cloud
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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