Documentation
¶
Index ¶
- func Create(op AddonOperator, sg *apistructs.ServiceGroup) error
- func Inspect(op AddonOperator, sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
- func Remove(op AddonOperator, sg *apistructs.ServiceGroup) error
- func Update(op AddonOperator, sg *apistructs.ServiceGroup) error
- type AddonOperator
- type DaemonsetUtil
- type DeploymentUtil
- type HealthcheckUtil
- type ImageSecretUtil
- type K8SUtil
- type NamespaceUtil
- type OvercommitUtil
- type PVCUtil
- type SecretUtil
- type ServiceUtil
- type StatefulsetUtil
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(op AddonOperator, sg *apistructs.ServiceGroup) error
func Inspect ¶
func Inspect(op AddonOperator, sg *apistructs.ServiceGroup) (*apistructs.ServiceGroup, error)
func Remove ¶
func Remove(op AddonOperator, sg *apistructs.ServiceGroup) error
func Update ¶
func Update(op AddonOperator, sg *apistructs.ServiceGroup) error
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 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 NamespaceUtil ¶
type OvercommitUtil ¶
type PVCUtil ¶
type PVCUtil interface {
Create(pvc *corev1.PersistentVolumeClaim) error
}
type SecretUtil ¶
type ServiceUtil ¶
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)
}
Click to show internal directories.
Click to hide internal directories.