Documentation ¶
Index ¶
- Variables
- func CheckFileExist(fileName string) bool
- func CreateKubeService(client kubernetes.Interface, namespace string, services ...*corev1.Service) error
- func Replicas(n int) []byte
- func WaitReady(store store.Storer, a *v1.AppService, timeout time.Duration, ...) (err error)
- func WaitStop(store store.Storer, a *v1.AppService, timeout time.Duration, ...) error
- func WaitUpgradeReady(store store.Storer, a *v1.AppService, timeout time.Duration, ...) (err error)
- type Controller
- type Manager
- func (m *Manager) GetControllerSize() int
- func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppService) error
- func (m *Manager) StartExportHelmChartController(appName, appVersion string, end bool, apps ...v1.AppService) error
- func (m *Manager) StartExportK8sYamlController(appName, appVersion string, end bool, apps ...v1.AppService) error
- func (m *Manager) Stop() error
- type TypeController
- type WutongExport
Constants ¶
This section is empty.
Variables ¶
var ( //APIVersionSecret - APIVersionSecret = "v1" //APIVersionConfigMap - APIVersionConfigMap = "v1" //APIVersionPersistentVolumeClaim - APIVersionPersistentVolumeClaim = "v1" //APIVersionStatefulSet - APIVersionStatefulSet = "apps/v1" //APIVersionDeployment - APIVersionDeployment = "apps/v1" //APIVersionJob - APIVersionJob = "batch/v1" //APIVersionCronJob - APIVersionCronJob = "batch/v1" //APIVersionBetaCronJob - APIVersionBetaCronJob = "batch/v1beta1" //APIVersionService - APIVersionService = "v1" //APIVersionV1Ingress - APIVersionV1Ingress = "networking.k8s.io/v1" //APIVersionV1beta1Ingress - APIVersionV1beta1Ingress = "networking.k8s.io/v1beta1" //APIVersionHorizontalPodAutoscaler -q APIVersionHorizontalPodAutoscaler = "autoscaling/v2" //APIVersionGateway - APIVersionGateway = "gateway.networking.k8s.io/v1beta1" //APIVersionHTTPRoute - APIVersionHTTPRoute = "gateway.networking.k8s.io/v1beta1" )
var ErrPodStatus = errors.New("pod status error")
ErrPodStatus pod status error
var ErrWaitCancel = errors.New("wait cancel")
ErrWaitCancel wait cancel
var ErrWaitTimeOut = errors.New("wait time out")
ErrWaitTimeOut wait time out
Functions ¶
func CheckFileExist ¶ added in v1.1.0
CheckFileExist check whether the file exists
func CreateKubeService ¶
func CreateKubeService(client kubernetes.Interface, namespace string, services ...*corev1.Service) error
CreateKubeService create kube service
func WaitReady ¶
func WaitReady(store store.Storer, a *v1.AppService, timeout time.Duration, logger event.Logger, cancel chan struct{}) (err error)
WaitReady wait ready
Types ¶
type Controller ¶
type Controller interface { Begin() Stop() error }
Controller service operating controller interface
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager controller manager
func NewManager ¶
func NewManager(store store.Storer, client kubernetes.Interface, runtimeClient client.Client) *Manager
NewManager new manager
func (*Manager) GetControllerSize ¶
GetControllerSize get running controller number
func (*Manager) StartController ¶
func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppService) error
StartController create and start service controller
func (*Manager) StartExportHelmChartController ¶ added in v1.1.0
func (*Manager) StartExportK8sYamlController ¶ added in v1.1.0
type TypeController ¶
type TypeController string
TypeController controller type
var TypeApplyConfigController TypeController = "apply_config"
TypeApplyConfigController -
var TypeApplyRuleController TypeController = "apply_rule"
TypeApplyRuleController -
var TypeControllerExportHelmChart TypeController = "export_helm_chart"
TypeControllerExportHelmChart -
var TypeControllerExportK8sYaml TypeController = "export_k8s_yaml"
TypeControllerExportK8sYaml -
var TypeControllerRefreshHPA TypeController = "refreshhpa"
TypeControllerRefreshHPA -
var TypeRestartController TypeController = "restart"
TypeRestartController restart service type
var TypeScalingController TypeController = "scaling"
TypeScalingController start service type
var TypeStartController TypeController = "start"
TypeStartController start service type
var TypeStopController TypeController = "stop"
TypeStopController start service type
var TypeUpgradeController TypeController = "upgrade"
TypeUpgradeController start service type