addon

package
v1.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Remove

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) 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)
}

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

Jump to

Keyboard shortcuts

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