Documentation ¶
Overview ¶
Package control is the package to perform the real update actions for K8S objects through APIServer; all clientSet actions should be arranged here to provide a unified behavior for dry-run and testing.
Index ¶
- type CNCControl
- type CNRControl
- type CNRControlImpl
- func (c *CNRControlImpl) CreateCNR(ctx context.Context, cnr *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
- func (c *CNRControlImpl) DeleteCNR(ctx context.Context, cnrName string) error
- func (c *CNRControlImpl) PatchCNRSpecAndMetadata(ctx context.Context, cnrName string, ...) (*v1alpha1.CustomNodeResource, error)
- func (c *CNRControlImpl) PatchCNRStatus(ctx context.Context, cnrName string, ...) (*v1alpha1.CustomNodeResource, error)
- type DummyCNCControl
- func (d DummyCNCControl) CreateCNC(_ context.Context, cnc *v1alpha1.CustomNodeConfig, _ metav1.CreateOptions) (*v1alpha1.CustomNodeConfig, error)
- func (d DummyCNCControl) DeleteCNC(_ context.Context, _ string, _ metav1.DeleteOptions) error
- func (d DummyCNCControl) PatchCNC(_ context.Context, _ string, _, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
- func (d DummyCNCControl) PatchCNCStatus(_ context.Context, _ string, _, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
- type DummyCNRControl
- func (d DummyCNRControl) CreateCNR(_ context.Context, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
- func (d DummyCNRControl) DeleteCNR(_ context.Context, _ string) error
- func (d DummyCNRControl) PatchCNRSpecAndMetadata(_ context.Context, _ string, _, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
- func (d DummyCNRControl) PatchCNRStatus(_ context.Context, _ string, _, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
- type DummyKCCControl
- func (d DummyKCCControl) UpdateKCC(_ context.Context, kcc *v1alpha1.KatalystCustomConfig, _ metav1.UpdateOptions) (*v1alpha1.KatalystCustomConfig, error)
- func (d DummyKCCControl) UpdateKCCStatus(_ context.Context, kcc *v1alpha1.KatalystCustomConfig, _ metav1.UpdateOptions) (*v1alpha1.KatalystCustomConfig, error)
- type DummyNPDControl
- func (d *DummyNPDControl) CreateNPD(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, ...) (*v1alpha1.NodeProfileDescriptor, error)
- func (d *DummyNPDControl) DeleteNPD(ctx context.Context, npdName string, opts metav1.DeleteOptions) error
- func (d *DummyNPDControl) UpdateNPDStatus(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, ...) (*v1alpha1.NodeProfileDescriptor, error)
- type DummyNocUpdater
- type DummyNodeUpdater
- type DummyPodEjector
- type DummyPodUpdater
- func (d *DummyPodUpdater) PatchPod(_ context.Context, _, _ *core.Pod) error
- func (d *DummyPodUpdater) PatchPodStatus(_ context.Context, _, _ *core.Pod) error
- func (d *DummyPodUpdater) UpdatePod(_ context.Context, _ *core.Pod, _ metav1.UpdateOptions) (*core.Pod, error)
- func (d *DummyPodUpdater) UpdatePodStatus(_ context.Context, _ *core.Pod, _ metav1.UpdateOptions) (*core.Pod, error)
- type DummyResourceRecommendUpdater
- func (d *DummyResourceRecommendUpdater) CreateResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ v1.CreateOptions) (*apis.ResourceRecommend, error)
- func (d *DummyResourceRecommendUpdater) PatchResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ *apis.ResourceRecommend) error
- func (d *DummyResourceRecommendUpdater) UpdateResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ v1.UpdateOptions) (*apis.ResourceRecommend, error)
- type DummySPDControl
- func (d *DummySPDControl) CreateSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.CreateOptions) (*apis.ServiceProfileDescriptor, error)
- func (d *DummySPDControl) DeleteSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.DeleteOptions) error
- func (d *DummySPDControl) PatchSPD(_ context.Context, _, _ *apis.ServiceProfileDescriptor) (*apis.ServiceProfileDescriptor, error)
- func (d *DummySPDControl) UpdateSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
- func (d *DummySPDControl) UpdateSPDStatus(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
- type DummyUnstructuredControl
- func (d DummyUnstructuredControl) CreateUnstructured(_ context.Context, _ metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (d DummyUnstructuredControl) DeleteUnstructured(_ context.Context, _ metav1.GroupVersionResource, _ *unstructured.Unstructured, ...) error
- func (d DummyUnstructuredControl) GetUnstructured(_ context.Context, _ metav1.GroupVersionResource, _, _ string, ...) (*unstructured.Unstructured, error)
- func (d DummyUnstructuredControl) PatchUnstructured(_ context.Context, _ metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (d DummyUnstructuredControl) PatchUnstructuredStatus(_ context.Context, _ metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (d DummyUnstructuredControl) UpdateUnstructured(_ context.Context, _ metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (d DummyUnstructuredControl) UpdateUnstructuredStatus(_ context.Context, _ metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- type DummyVPARecommendationUpdater
- func (d *DummyVPARecommendationUpdater) CreateVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- func (d *DummyVPARecommendationUpdater) DeleteVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, ...) error
- func (d *DummyVPARecommendationUpdater) PatchVPARecommendation(ctx context.Context, ...) error
- func (d *DummyVPARecommendationUpdater) PatchVPARecommendationStatus(ctx context.Context, ...) error
- func (d *DummyVPARecommendationUpdater) UpdateVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- func (d *DummyVPARecommendationUpdater) UpdateVPARecommendationStatus(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- type DummyVPAUpdater
- func (d *DummyVPAUpdater) PatchVPA(_ context.Context, _, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error)
- func (d *DummyVPAUpdater) PatchVPAStatus(_ context.Context, _, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error)
- func (d *DummyVPAUpdater) UpdateVPA(_ context.Context, _ *apis.KatalystVerticalPodAutoscaler, ...) (*apis.KatalystVerticalPodAutoscaler, error)
- func (d *DummyVPAUpdater) UpdateVPAStatus(_ context.Context, _ *apis.KatalystVerticalPodAutoscaler, ...) (*apis.KatalystVerticalPodAutoscaler, error)
- type HPAManageImpl
- type HPAManager
- type IHPAUpdateImpl
- func (i *IHPAUpdateImpl) Update(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, ...) (*apis.IntelligentHorizontalPodAutoscaler, error)
- func (i *IHPAUpdateImpl) UpdateStatus(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, ...) (*apis.IntelligentHorizontalPodAutoscaler, error)
- type IHPAUpdater
- type KCCControl
- type NPDControlImp
- func (n *NPDControlImp) CreateNPD(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, ...) (*v1alpha1.NodeProfileDescriptor, error)
- func (n *NPDControlImp) DeleteNPD(ctx context.Context, npdName string, opts metav1.DeleteOptions) error
- func (n *NPDControlImp) UpdateNPDStatus(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, ...) (*v1alpha1.NodeProfileDescriptor, error)
- type NocUpdater
- type NodeProfileControl
- type NodeUpdater
- type PodEjector
- type PodUpdater
- type RealCNCControl
- func (r *RealCNCControl) CreateCNC(ctx context.Context, cnc *v1alpha1.CustomNodeConfig, opts metav1.CreateOptions) (*v1alpha1.CustomNodeConfig, error)
- func (r *RealCNCControl) DeleteCNC(ctx context.Context, cncName string, opts metav1.DeleteOptions) error
- func (r *RealCNCControl) PatchCNC(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
- func (r *RealCNCControl) PatchCNCStatus(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
- type RealKCCControl
- type RealNocUpdater
- type RealNodeUpdater
- func (r *RealNodeUpdater) PatchNode(ctx context.Context, oldNode, newNode *core.Node) error
- func (r *RealNodeUpdater) PatchNodeStatus(ctx context.Context, oldNode, newNode *core.Node) error
- func (r *RealNodeUpdater) UpdateNode(ctx context.Context, node *core.Node, opts metav1.UpdateOptions) (*core.Node, error)
- type RealPodEjector
- type RealPodEjectorWithMetric
- type RealPodUpdater
- func (r *RealPodUpdater) PatchPod(ctx context.Context, oldPod, newPod *core.Pod) error
- func (r *RealPodUpdater) PatchPodStatus(_ context.Context, oldPod, newPod *core.Pod) error
- func (r *RealPodUpdater) UpdatePod(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error)
- func (r *RealPodUpdater) UpdatePodStatus(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error)
- type RealPodUpdaterWithMetric
- type RealResourceRecommendUpdater
- func (r *RealResourceRecommendUpdater) CreateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.CreateOptions) (*apis.ResourceRecommend, error)
- func (r *RealResourceRecommendUpdater) PatchResourceRecommend(ctx context.Context, oldRec *apis.ResourceRecommend, ...) error
- func (r *RealResourceRecommendUpdater) UpdateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.UpdateOptions) (*apis.ResourceRecommend, error)
- type RealUnstructuredControl
- func (r *RealUnstructuredControl) CreateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (r *RealUnstructuredControl) DeleteUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, ...) error
- func (r *RealUnstructuredControl) GetUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, namespace, name string, ...) (*unstructured.Unstructured, error)
- func (r *RealUnstructuredControl) PatchUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (r *RealUnstructuredControl) PatchUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (r *RealUnstructuredControl) UpdateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- func (r *RealUnstructuredControl) UpdateUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, ...) (*unstructured.Unstructured, error)
- type RealVPARecommendationUpdater
- func (r *RealVPARecommendationUpdater) CreateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- func (r *RealVPARecommendationUpdater) DeleteVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, ...) error
- func (r *RealVPARecommendationUpdater) PatchVPARecommendation(ctx context.Context, ...) error
- func (r *RealVPARecommendationUpdater) PatchVPARecommendationStatus(ctx context.Context, ...) error
- func (r *RealVPARecommendationUpdater) UpdateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- func (r *RealVPARecommendationUpdater) UpdateVPARecommendationStatus(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, ...) (*apis.VerticalPodAutoscalerRecommendation, error)
- type RealVPARecommendationUpdaterWithMetric
- type RealVPAUpdater
- func (r *RealVPAUpdater) PatchVPA(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error)
- func (r *RealVPAUpdater) PatchVPAStatus(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error)
- func (r *RealVPAUpdater) UpdateVPA(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, ...) (*apis.KatalystVerticalPodAutoscaler, error)
- func (r *RealVPAUpdater) UpdateVPAStatus(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, ...) (*apis.KatalystVerticalPodAutoscaler, error)
- type RealVPAUpdaterWithMetric
- type ResourceRecommendUpdater
- type SPDControlImp
- func (r *SPDControlImp) CreateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, ...) (*apis.ServiceProfileDescriptor, error)
- func (r *SPDControlImp) DeleteSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, ...) error
- func (r *SPDControlImp) PatchSPD(ctx context.Context, oldSPD, newSPD *apis.ServiceProfileDescriptor) (*apis.ServiceProfileDescriptor, error)
- func (r *SPDControlImp) UpdateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, ...) (*apis.ServiceProfileDescriptor, error)
- func (r *SPDControlImp) UpdateSPDStatus(ctx context.Context, spd *apis.ServiceProfileDescriptor, ...) (*apis.ServiceProfileDescriptor, error)
- type ServiceProfileControl
- type UnstructuredControl
- type VPARecommendationUpdater
- type VPAUpdater
- type VirtualWorkloadManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNCControl ¶
type CNCControl interface { // CreateCNC is used to create new CNC obj CreateCNC(ctx context.Context, cnc *v1alpha1.CustomNodeConfig, opts metav1.CreateOptions) (*v1alpha1.CustomNodeConfig, error) // DeleteCNC is used to delete CNC obj DeleteCNC(ctx context.Context, cncName string, opts metav1.DeleteOptions) error // PatchCNC is used to update the changes for CNC spec and metadata contents PatchCNC(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error) // PatchCNCStatus is used to update the changes for CNC status contents PatchCNCStatus(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error) }
CNCControl is used to update CustomNodeConfig todo: use patch instead of update to avoid conflict
type CNRControl ¶
type CNRControl interface { // CreateCNR creates CNR from APIServer CreateCNR(ctx context.Context, cnr *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error) // DeleteCNR deletes CNR from APIServer DeleteCNR(ctx context.Context, cnrName string) error // PatchCNRSpecAndMetadata is used to update the changes for CNR Spec contents PatchCNRSpecAndMetadata(ctx context.Context, cnrName string, oldCNR, newCNR *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error) // PatchCNRStatus is used to update the changes for CNR Status contents PatchCNRStatus(ctx context.Context, cnrName string, oldCNR, newCNR *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error) }
CNRControl is used to update CNR
type CNRControlImpl ¶
type CNRControlImpl struct {
// contains filtered or unexported fields
}
func NewCNRControlImpl ¶
func NewCNRControlImpl(client clientset.Interface) *CNRControlImpl
func (*CNRControlImpl) CreateCNR ¶
func (c *CNRControlImpl) CreateCNR(ctx context.Context, cnr *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
func (*CNRControlImpl) DeleteCNR ¶
func (c *CNRControlImpl) DeleteCNR(ctx context.Context, cnrName string) error
func (*CNRControlImpl) PatchCNRSpecAndMetadata ¶
func (c *CNRControlImpl) PatchCNRSpecAndMetadata(ctx context.Context, cnrName string, oldCNR, newCNR *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
func (*CNRControlImpl) PatchCNRStatus ¶
func (c *CNRControlImpl) PatchCNRStatus(ctx context.Context, cnrName string, oldCNR, newCNR *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
type DummyCNCControl ¶
type DummyCNCControl struct{}
func (DummyCNCControl) CreateCNC ¶
func (d DummyCNCControl) CreateCNC(_ context.Context, cnc *v1alpha1.CustomNodeConfig, _ metav1.CreateOptions, ) (*v1alpha1.CustomNodeConfig, error)
func (DummyCNCControl) DeleteCNC ¶
func (d DummyCNCControl) DeleteCNC(_ context.Context, _ string, _ metav1.DeleteOptions, ) error
func (DummyCNCControl) PatchCNC ¶
func (d DummyCNCControl) PatchCNC(_ context.Context, _ string, _, newCNC *v1alpha1.CustomNodeConfig, ) (*v1alpha1.CustomNodeConfig, error)
func (DummyCNCControl) PatchCNCStatus ¶
func (d DummyCNCControl) PatchCNCStatus(_ context.Context, _ string, _, newCNC *v1alpha1.CustomNodeConfig, ) (*v1alpha1.CustomNodeConfig, error)
type DummyCNRControl ¶
type DummyCNRControl struct{}
func (DummyCNRControl) CreateCNR ¶
func (d DummyCNRControl) CreateCNR(_ context.Context, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
func (DummyCNRControl) DeleteCNR ¶
func (d DummyCNRControl) DeleteCNR(_ context.Context, _ string) error
func (DummyCNRControl) PatchCNRSpecAndMetadata ¶
func (d DummyCNRControl) PatchCNRSpecAndMetadata(_ context.Context, _ string, _, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
func (DummyCNRControl) PatchCNRStatus ¶
func (d DummyCNRControl) PatchCNRStatus(_ context.Context, _ string, _, _ *v1alpha1.CustomNodeResource) (*v1alpha1.CustomNodeResource, error)
type DummyKCCControl ¶
type DummyKCCControl struct{}
func (DummyKCCControl) UpdateKCC ¶
func (d DummyKCCControl) UpdateKCC(_ context.Context, kcc *v1alpha1.KatalystCustomConfig, _ metav1.UpdateOptions, ) (*v1alpha1.KatalystCustomConfig, error)
func (DummyKCCControl) UpdateKCCStatus ¶
func (d DummyKCCControl) UpdateKCCStatus(_ context.Context, kcc *v1alpha1.KatalystCustomConfig, _ metav1.UpdateOptions, ) (*v1alpha1.KatalystCustomConfig, error)
type DummyNPDControl ¶ added in v0.5.10
type DummyNPDControl struct{}
func (*DummyNPDControl) CreateNPD ¶ added in v0.5.10
func (d *DummyNPDControl) CreateNPD(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.CreateOptions) (*v1alpha1.NodeProfileDescriptor, error)
func (*DummyNPDControl) DeleteNPD ¶ added in v0.5.10
func (d *DummyNPDControl) DeleteNPD(ctx context.Context, npdName string, opts metav1.DeleteOptions) error
func (*DummyNPDControl) UpdateNPDStatus ¶ added in v0.5.10
func (d *DummyNPDControl) UpdateNPDStatus(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.UpdateOptions) (*v1alpha1.NodeProfileDescriptor, error)
type DummyNocUpdater ¶ added in v0.4.0
type DummyNocUpdater struct{}
func (*DummyNocUpdater) PatchNocStatus ¶ added in v0.4.0
func (d *DummyNocUpdater) PatchNocStatus(_ context.Context, _, newNoc *v1alpha1.NodeOvercommitConfig) (*v1alpha1.NodeOvercommitConfig, error)
type DummyNodeUpdater ¶ added in v0.4.0
type DummyNodeUpdater struct{}
func (*DummyNodeUpdater) PatchNodeStatus ¶ added in v0.4.0
func (*DummyNodeUpdater) UpdateNode ¶ added in v0.4.0
func (d *DummyNodeUpdater) UpdateNode(_ context.Context, _ *core.Node, _ metav1.UpdateOptions) (*core.Node, error)
type DummyPodEjector ¶
type DummyPodEjector struct{}
func (DummyPodEjector) DeletePod ¶
func (d DummyPodEjector) DeletePod(_ context.Context, _, _ string, _ metav1.DeleteOptions) error
type DummyPodUpdater ¶
type DummyPodUpdater struct{}
func (*DummyPodUpdater) PatchPodStatus ¶
func (*DummyPodUpdater) UpdatePod ¶
func (d *DummyPodUpdater) UpdatePod(_ context.Context, _ *core.Pod, _ metav1.UpdateOptions) (*core.Pod, error)
func (*DummyPodUpdater) UpdatePodStatus ¶
func (d *DummyPodUpdater) UpdatePodStatus(_ context.Context, _ *core.Pod, _ metav1.UpdateOptions) (*core.Pod, error)
type DummyResourceRecommendUpdater ¶ added in v0.5.12
type DummyResourceRecommendUpdater struct{}
func (*DummyResourceRecommendUpdater) CreateResourceRecommend ¶ added in v0.5.12
func (d *DummyResourceRecommendUpdater) CreateResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ v1.CreateOptions, ) (*apis.ResourceRecommend, error)
func (*DummyResourceRecommendUpdater) PatchResourceRecommend ¶ added in v0.5.12
func (d *DummyResourceRecommendUpdater) PatchResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ *apis.ResourceRecommend, ) error
func (*DummyResourceRecommendUpdater) UpdateResourceRecommend ¶ added in v0.5.12
func (d *DummyResourceRecommendUpdater) UpdateResourceRecommend(_ context.Context, _ *apis.ResourceRecommend, _ v1.UpdateOptions, ) (*apis.ResourceRecommend, error)
type DummySPDControl ¶
type DummySPDControl struct{}
func (*DummySPDControl) CreateSPD ¶
func (d *DummySPDControl) CreateSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.CreateOptions) (*apis.ServiceProfileDescriptor, error)
func (*DummySPDControl) DeleteSPD ¶
func (d *DummySPDControl) DeleteSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.DeleteOptions) error
func (*DummySPDControl) PatchSPD ¶ added in v0.4.0
func (d *DummySPDControl) PatchSPD(_ context.Context, _, _ *apis.ServiceProfileDescriptor) (*apis.ServiceProfileDescriptor, error)
func (*DummySPDControl) UpdateSPD ¶
func (d *DummySPDControl) UpdateSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
func (*DummySPDControl) UpdateSPDStatus ¶
func (d *DummySPDControl) UpdateSPDStatus(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
type DummyUnstructuredControl ¶
type DummyUnstructuredControl struct{}
func (DummyUnstructuredControl) CreateUnstructured ¶
func (d DummyUnstructuredControl) CreateUnstructured(_ context.Context, _ metav1.GroupVersionResource, obj *unstructured.Unstructured, _ metav1.CreateOptions, ) (*unstructured.Unstructured, error)
func (DummyUnstructuredControl) DeleteUnstructured ¶
func (d DummyUnstructuredControl) DeleteUnstructured(_ context.Context, _ metav1.GroupVersionResource, _ *unstructured.Unstructured, _ metav1.DeleteOptions, ) error
func (DummyUnstructuredControl) GetUnstructured ¶
func (d DummyUnstructuredControl) GetUnstructured(_ context.Context, _ metav1.GroupVersionResource, _, _ string, _ metav1.GetOptions, ) (*unstructured.Unstructured, error)
func (DummyUnstructuredControl) PatchUnstructured ¶
func (d DummyUnstructuredControl) PatchUnstructured(_ context.Context, _ metav1.GroupVersionResource, _, newObj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
func (DummyUnstructuredControl) PatchUnstructuredStatus ¶
func (d DummyUnstructuredControl) PatchUnstructuredStatus(_ context.Context, _ metav1.GroupVersionResource, _, newObj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
func (DummyUnstructuredControl) UpdateUnstructured ¶
func (d DummyUnstructuredControl) UpdateUnstructured(_ context.Context, _ metav1.GroupVersionResource, obj *unstructured.Unstructured, _ metav1.UpdateOptions, ) (*unstructured.Unstructured, error)
func (DummyUnstructuredControl) UpdateUnstructuredStatus ¶
func (d DummyUnstructuredControl) UpdateUnstructuredStatus(_ context.Context, _ metav1.GroupVersionResource, obj *unstructured.Unstructured, _ metav1.UpdateOptions, ) (*unstructured.Unstructured, error)
type DummyVPARecommendationUpdater ¶
type DummyVPARecommendationUpdater struct{}
func (*DummyVPARecommendationUpdater) CreateVPARecommendation ¶
func (d *DummyVPARecommendationUpdater) CreateVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, _ metav1.CreateOptions) (*apis.VerticalPodAutoscalerRecommendation, error)
func (*DummyVPARecommendationUpdater) DeleteVPARecommendation ¶
func (d *DummyVPARecommendationUpdater) DeleteVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, _ metav1.DeleteOptions) error
func (*DummyVPARecommendationUpdater) PatchVPARecommendation ¶
func (d *DummyVPARecommendationUpdater) PatchVPARecommendation(ctx context.Context, oldVparec, newVparec *apis.VerticalPodAutoscalerRecommendation) error
func (*DummyVPARecommendationUpdater) PatchVPARecommendationStatus ¶
func (d *DummyVPARecommendationUpdater) PatchVPARecommendationStatus(ctx context.Context, oldVparec, newVparec *apis.VerticalPodAutoscalerRecommendation) error
func (*DummyVPARecommendationUpdater) UpdateVPARecommendation ¶
func (d *DummyVPARecommendationUpdater) UpdateVPARecommendation(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, _ metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error)
func (*DummyVPARecommendationUpdater) UpdateVPARecommendationStatus ¶
func (d *DummyVPARecommendationUpdater) UpdateVPARecommendationStatus(_ context.Context, _ *apis.VerticalPodAutoscalerRecommendation, _ metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error)
type DummyVPAUpdater ¶
type DummyVPAUpdater struct{}
func (*DummyVPAUpdater) PatchVPA ¶
func (d *DummyVPAUpdater) PatchVPA(_ context.Context, _, newVPA *apis.KatalystVerticalPodAutoscaler, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*DummyVPAUpdater) PatchVPAStatus ¶
func (d *DummyVPAUpdater) PatchVPAStatus(_ context.Context, _, newVPA *apis.KatalystVerticalPodAutoscaler, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*DummyVPAUpdater) UpdateVPA ¶
func (d *DummyVPAUpdater) UpdateVPA(_ context.Context, _ *apis.KatalystVerticalPodAutoscaler, _ metav1.UpdateOptions, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*DummyVPAUpdater) UpdateVPAStatus ¶
func (d *DummyVPAUpdater) UpdateVPAStatus(_ context.Context, _ *apis.KatalystVerticalPodAutoscaler, _ metav1.UpdateOptions, ) (*apis.KatalystVerticalPodAutoscaler, error)
type HPAManageImpl ¶ added in v0.5.6
type HPAManageImpl struct {
// contains filtered or unexported fields
}
func (*HPAManageImpl) Create ¶ added in v0.5.6
func (h *HPAManageImpl) Create(ctx context.Context, new *autoscaling.HorizontalPodAutoscaler, opts metav1.CreateOptions, ) (*autoscaling.HorizontalPodAutoscaler, error)
func (*HPAManageImpl) Patch ¶ added in v0.5.6
func (h *HPAManageImpl) Patch(ctx context.Context, old, new *autoscaling.HorizontalPodAutoscaler, opts metav1.PatchOptions, ) (*autoscaling.HorizontalPodAutoscaler, error)
type HPAManager ¶ added in v0.5.6
type HPAManager interface { Create(ctx context.Context, new *autoscaling.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*autoscaling.HorizontalPodAutoscaler, error) Patch(ctx context.Context, old, new *autoscaling.HorizontalPodAutoscaler, opts metav1.PatchOptions) (*autoscaling.HorizontalPodAutoscaler, error) }
func NewHPAManager ¶ added in v0.5.6
func NewHPAManager(client kubernetes.Interface) HPAManager
type IHPAUpdateImpl ¶ added in v0.5.6
type IHPAUpdateImpl struct {
// contains filtered or unexported fields
}
func (*IHPAUpdateImpl) Update ¶ added in v0.5.6
func (i *IHPAUpdateImpl) Update(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, opts metav1.UpdateOptions) (*apis.IntelligentHorizontalPodAutoscaler, error)
func (*IHPAUpdateImpl) UpdateStatus ¶ added in v0.5.6
func (i *IHPAUpdateImpl) UpdateStatus(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, opts metav1.UpdateOptions) (*apis.IntelligentHorizontalPodAutoscaler, error)
type IHPAUpdater ¶ added in v0.5.6
type IHPAUpdater interface { Update(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, opts metav1.UpdateOptions) (*apis.IntelligentHorizontalPodAutoscaler, error) UpdateStatus(ctx context.Context, ihpa *apis.IntelligentHorizontalPodAutoscaler, opts metav1.UpdateOptions) (*apis.IntelligentHorizontalPodAutoscaler, error) }
func NewIHPAUpdater ¶ added in v0.5.6
func NewIHPAUpdater(client clientset.Interface) IHPAUpdater
type KCCControl ¶
type KCCControl interface { // UpdateKCC is used to update the changes for KCC spec and metadata contents UpdateKCC(ctx context.Context, kcc *v1alpha1.KatalystCustomConfig, opts metav1.UpdateOptions) (*v1alpha1.KatalystCustomConfig, error) // UpdateKCCStatus is used to update the change for KCC status UpdateKCCStatus(ctx context.Context, kcc *v1alpha1.KatalystCustomConfig, opts metav1.UpdateOptions) (*v1alpha1.KatalystCustomConfig, error) }
KCCControl is used to update KatalystCustomConfig todo: use patch instead of update to avoid conflict
type NPDControlImp ¶ added in v0.5.10
type NPDControlImp struct {
// contains filtered or unexported fields
}
func NewNPDControlImp ¶ added in v0.5.10
func NewNPDControlImp(client clientset.Interface) *NPDControlImp
func (*NPDControlImp) CreateNPD ¶ added in v0.5.10
func (n *NPDControlImp) CreateNPD(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.CreateOptions) (*v1alpha1.NodeProfileDescriptor, error)
func (*NPDControlImp) DeleteNPD ¶ added in v0.5.10
func (n *NPDControlImp) DeleteNPD(ctx context.Context, npdName string, opts metav1.DeleteOptions) error
func (*NPDControlImp) UpdateNPDStatus ¶ added in v0.5.10
func (n *NPDControlImp) UpdateNPDStatus(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.UpdateOptions) (*v1alpha1.NodeProfileDescriptor, error)
type NocUpdater ¶ added in v0.4.0
type NocUpdater interface {
PatchNocStatus(ctx context.Context, oldNoc, newNoc *v1alpha1.NodeOvercommitConfig) (*v1alpha1.NodeOvercommitConfig, error)
}
func NewRealNocUpdater ¶ added in v0.4.0
func NewRealNocUpdater(client clientset.Interface) NocUpdater
type NodeProfileControl ¶ added in v0.5.10
type NodeProfileControl interface { CreateNPD(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.CreateOptions) (*v1alpha1.NodeProfileDescriptor, error) UpdateNPDStatus(ctx context.Context, npd *v1alpha1.NodeProfileDescriptor, opts metav1.UpdateOptions) (*v1alpha1.NodeProfileDescriptor, error) DeleteNPD(ctx context.Context, npdName string, opts metav1.DeleteOptions) error }
type NodeUpdater ¶ added in v0.4.0
type NodeUpdater interface { PatchNode(ctx context.Context, oldNode, newNode *core.Node) error PatchNodeStatus(ctx context.Context, oldNode, newNode *core.Node) error UpdateNode(ctx context.Context, node *core.Node, opts metav1.UpdateOptions) (*core.Node, error) }
NodeUpdater is used to update Node
type PodEjector ¶
type PodEjector interface { DeletePod(ctx context.Context, namespace, name string, opts metav1.DeleteOptions) error EvictPod(ctx context.Context, eviction *policy.Eviction) error }
PodEjector is used to evict Pods
type PodUpdater ¶
type PodUpdater interface { UpdatePod(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error) UpdatePodStatus(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error) PatchPod(ctx context.Context, oldPod, newPod *core.Pod) error PatchPodStatus(ctx context.Context, oldPod, newPod *core.Pod) error }
PodUpdater is used to update Pod
type RealCNCControl ¶
type RealCNCControl struct {
// contains filtered or unexported fields
}
func NewRealCNCControl ¶
func NewRealCNCControl(client clientset.Interface) *RealCNCControl
func (*RealCNCControl) CreateCNC ¶
func (r *RealCNCControl) CreateCNC(ctx context.Context, cnc *v1alpha1.CustomNodeConfig, opts metav1.CreateOptions) (*v1alpha1.CustomNodeConfig, error)
func (*RealCNCControl) DeleteCNC ¶
func (r *RealCNCControl) DeleteCNC(ctx context.Context, cncName string, opts metav1.DeleteOptions) error
func (*RealCNCControl) PatchCNC ¶
func (r *RealCNCControl) PatchCNC(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
func (*RealCNCControl) PatchCNCStatus ¶
func (r *RealCNCControl) PatchCNCStatus(ctx context.Context, cncName string, oldCNC, newCNC *v1alpha1.CustomNodeConfig) (*v1alpha1.CustomNodeConfig, error)
type RealKCCControl ¶
type RealKCCControl struct {
// contains filtered or unexported fields
}
func NewRealKCCControl ¶
func NewRealKCCControl(client clientset.Interface) *RealKCCControl
func (*RealKCCControl) UpdateKCC ¶
func (r *RealKCCControl) UpdateKCC(ctx context.Context, kcc *v1alpha1.KatalystCustomConfig, opts metav1.UpdateOptions, ) (*v1alpha1.KatalystCustomConfig, error)
func (*RealKCCControl) UpdateKCCStatus ¶
func (r *RealKCCControl) UpdateKCCStatus(ctx context.Context, kcc *v1alpha1.KatalystCustomConfig, opts metav1.UpdateOptions, ) (*v1alpha1.KatalystCustomConfig, error)
type RealNocUpdater ¶ added in v0.4.0
type RealNocUpdater struct {
// contains filtered or unexported fields
}
func (*RealNocUpdater) PatchNocStatus ¶ added in v0.4.0
func (r *RealNocUpdater) PatchNocStatus(ctx context.Context, oldNoc, newNoc *v1alpha1.NodeOvercommitConfig) (*v1alpha1.NodeOvercommitConfig, error)
type RealNodeUpdater ¶ added in v0.4.0
type RealNodeUpdater struct {
// contains filtered or unexported fields
}
func NewRealNodeUpdater ¶ added in v0.4.0
func NewRealNodeUpdater(client kubernetes.Interface) *RealNodeUpdater
func (*RealNodeUpdater) PatchNodeStatus ¶ added in v0.4.0
func (*RealNodeUpdater) UpdateNode ¶ added in v0.4.0
func (r *RealNodeUpdater) UpdateNode(ctx context.Context, node *core.Node, opts metav1.UpdateOptions) (*core.Node, error)
type RealPodEjector ¶
type RealPodEjector struct {
// contains filtered or unexported fields
}
func NewRealPodEjector ¶
func NewRealPodEjector(client kubernetes.Interface) *RealPodEjector
func (*RealPodEjector) DeletePod ¶
func (d *RealPodEjector) DeletePod(ctx context.Context, namespace, name string, opts metav1.DeleteOptions) error
type RealPodEjectorWithMetric ¶
type RealPodEjectorWithMetric struct { RealPodUpdater // contains filtered or unexported fields }
RealPodEjectorWithMetric todo: implement with emitting metrics on updating
type RealPodUpdater ¶
type RealPodUpdater struct {
// contains filtered or unexported fields
}
func NewRealPodUpdater ¶
func NewRealPodUpdater(client kubernetes.Interface) *RealPodUpdater
func (*RealPodUpdater) PatchPodStatus ¶
func (*RealPodUpdater) UpdatePod ¶
func (r *RealPodUpdater) UpdatePod(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error)
func (*RealPodUpdater) UpdatePodStatus ¶
func (r *RealPodUpdater) UpdatePodStatus(ctx context.Context, pod *core.Pod, opts metav1.UpdateOptions) (*core.Pod, error)
type RealPodUpdaterWithMetric ¶
type RealPodUpdaterWithMetric struct { RealPodUpdater // contains filtered or unexported fields }
RealPodUpdaterWithMetric todo: implement with emitting metrics on updating
type RealResourceRecommendUpdater ¶ added in v0.5.12
type RealResourceRecommendUpdater struct {
// contains filtered or unexported fields
}
func NewRealResourceRecommendUpdater ¶ added in v0.5.12
func NewRealResourceRecommendUpdater(client clientset.Interface) *RealResourceRecommendUpdater
func (*RealResourceRecommendUpdater) CreateResourceRecommend ¶ added in v0.5.12
func (r *RealResourceRecommendUpdater) CreateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.CreateOptions) (*apis.ResourceRecommend, error)
func (*RealResourceRecommendUpdater) PatchResourceRecommend ¶ added in v0.5.12
func (r *RealResourceRecommendUpdater) PatchResourceRecommend(ctx context.Context, oldRec *apis.ResourceRecommend, newRec *apis.ResourceRecommend, ) error
func (*RealResourceRecommendUpdater) UpdateResourceRecommend ¶ added in v0.5.12
func (r *RealResourceRecommendUpdater) UpdateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.UpdateOptions, ) (*apis.ResourceRecommend, error)
type RealUnstructuredControl ¶
type RealUnstructuredControl struct {
// contains filtered or unexported fields
}
func NewRealUnstructuredControl ¶
func NewRealUnstructuredControl(client dynamic.Interface) *RealUnstructuredControl
func (*RealUnstructuredControl) CreateUnstructured ¶
func (r *RealUnstructuredControl) CreateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.CreateOptions, ) (*unstructured.Unstructured, error)
func (*RealUnstructuredControl) DeleteUnstructured ¶
func (r *RealUnstructuredControl) DeleteUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.DeleteOptions) error
func (*RealUnstructuredControl) GetUnstructured ¶
func (r *RealUnstructuredControl) GetUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, namespace, name string, opts metav1.GetOptions, ) (*unstructured.Unstructured, error)
func (*RealUnstructuredControl) PatchUnstructured ¶
func (r *RealUnstructuredControl) PatchUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, oldObj, newObj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
func (*RealUnstructuredControl) PatchUnstructuredStatus ¶
func (r *RealUnstructuredControl) PatchUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, oldObj, newObj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
func (*RealUnstructuredControl) UpdateUnstructured ¶
func (r *RealUnstructuredControl) UpdateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.UpdateOptions, ) (*unstructured.Unstructured, error)
func (*RealUnstructuredControl) UpdateUnstructuredStatus ¶
func (r *RealUnstructuredControl) UpdateUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.UpdateOptions, ) (*unstructured.Unstructured, error)
type RealVPARecommendationUpdater ¶
type RealVPARecommendationUpdater struct {
// contains filtered or unexported fields
}
func NewRealVPARecommendationUpdater ¶
func NewRealVPARecommendationUpdater(client clientset.Interface) *RealVPARecommendationUpdater
func (*RealVPARecommendationUpdater) CreateVPARecommendation ¶
func (r *RealVPARecommendationUpdater) CreateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.CreateOptions, ) (*apis.VerticalPodAutoscalerRecommendation, error)
func (*RealVPARecommendationUpdater) DeleteVPARecommendation ¶
func (r *RealVPARecommendationUpdater) DeleteVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.DeleteOptions) error
func (*RealVPARecommendationUpdater) PatchVPARecommendation ¶
func (r *RealVPARecommendationUpdater) PatchVPARecommendation(ctx context.Context, oldVpaRec, newVpaRec *apis.VerticalPodAutoscalerRecommendation) error
func (*RealVPARecommendationUpdater) PatchVPARecommendationStatus ¶
func (r *RealVPARecommendationUpdater) PatchVPARecommendationStatus(ctx context.Context, oldVpaRec, newVpaRec *apis.VerticalPodAutoscalerRecommendation) error
func (*RealVPARecommendationUpdater) UpdateVPARecommendation ¶
func (r *RealVPARecommendationUpdater) UpdateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error)
func (*RealVPARecommendationUpdater) UpdateVPARecommendationStatus ¶
func (r *RealVPARecommendationUpdater) UpdateVPARecommendationStatus(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error)
type RealVPARecommendationUpdaterWithMetric ¶
type RealVPARecommendationUpdaterWithMetric struct { RealVPARecommendationUpdater // contains filtered or unexported fields }
RealVPARecommendationUpdaterWithMetric todo: implement with emitting metrics on updating
type RealVPAUpdater ¶
type RealVPAUpdater struct {
// contains filtered or unexported fields
}
func (*RealVPAUpdater) PatchVPA ¶
func (r *RealVPAUpdater) PatchVPA(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*RealVPAUpdater) PatchVPAStatus ¶
func (r *RealVPAUpdater) PatchVPAStatus(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*RealVPAUpdater) UpdateVPA ¶
func (r *RealVPAUpdater) UpdateVPA(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, opts metav1.UpdateOptions, ) (*apis.KatalystVerticalPodAutoscaler, error)
func (*RealVPAUpdater) UpdateVPAStatus ¶
func (r *RealVPAUpdater) UpdateVPAStatus(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, opts metav1.UpdateOptions, ) (*apis.KatalystVerticalPodAutoscaler, error)
type RealVPAUpdaterWithMetric ¶
type RealVPAUpdaterWithMetric struct { RealVPAUpdater // contains filtered or unexported fields }
RealVPAUpdaterWithMetric todo: implement with emitting metrics on updating
type ResourceRecommendUpdater ¶ added in v0.5.12
type ResourceRecommendUpdater interface { UpdateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.UpdateOptions) (*apis.ResourceRecommend, error) PatchResourceRecommend(ctx context.Context, oldRec *apis.ResourceRecommend, newRec *apis.ResourceRecommend) error CreateResourceRecommend(ctx context.Context, rec *apis.ResourceRecommend, opts v1.CreateOptions) (*apis.ResourceRecommend, error) }
ResourceRecommendUpdater is used to update ResourceRecommend CR
type SPDControlImp ¶
type SPDControlImp struct {
// contains filtered or unexported fields
}
func NewSPDControlImp ¶
func NewSPDControlImp(client clientset.Interface) *SPDControlImp
func (*SPDControlImp) CreateSPD ¶
func (r *SPDControlImp) CreateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.CreateOptions) (*apis.ServiceProfileDescriptor, error)
func (*SPDControlImp) DeleteSPD ¶
func (r *SPDControlImp) DeleteSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.DeleteOptions) error
func (*SPDControlImp) PatchSPD ¶ added in v0.4.0
func (r *SPDControlImp) PatchSPD(ctx context.Context, oldSPD, newSPD *apis.ServiceProfileDescriptor) (*apis.ServiceProfileDescriptor, error)
func (*SPDControlImp) UpdateSPD ¶
func (r *SPDControlImp) UpdateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
func (*SPDControlImp) UpdateSPDStatus ¶
func (r *SPDControlImp) UpdateSPDStatus(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error)
type ServiceProfileControl ¶
type ServiceProfileControl interface { CreateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.CreateOptions) (*apis.ServiceProfileDescriptor, error) UpdateSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error) UpdateSPDStatus(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.UpdateOptions) (*apis.ServiceProfileDescriptor, error) PatchSPD(ctx context.Context, oldSPD, newSPD *apis.ServiceProfileDescriptor) (*apis.ServiceProfileDescriptor, error) DeleteSPD(ctx context.Context, spd *apis.ServiceProfileDescriptor, opts metav1.DeleteOptions) error }
ServiceProfileControl is used to update ServiceProfileDescriptor CR todo: use patch instead of update to avoid conflict
type UnstructuredControl ¶
type UnstructuredControl interface { // CreateUnstructured is used to create unstructured obj CreateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.CreateOptions) (*unstructured.Unstructured, error) // GetUnstructured is used to get unstructured obj GetUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, namespace, name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) // PatchUnstructured is to patch unstructured object spec and metadata PatchUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, oldObj, newObj *unstructured.Unstructured) (*unstructured.Unstructured, error) // UpdateUnstructured is used to update unstructured obj spec and metadata UpdateUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) // UpdateUnstructuredStatus is used to update unstructured obj status UpdateUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) // PatchUnstructuredStatus is to patch unstructured object status PatchUnstructuredStatus(ctx context.Context, gvr metav1.GroupVersionResource, oldObj, newObj *unstructured.Unstructured) (*unstructured.Unstructured, error) // DeleteUnstructured is used to delete unstructured obj DeleteUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, obj *unstructured.Unstructured, opts metav1.DeleteOptions) error }
UnstructuredControl is used to update Unstructured obj todo: use patch instead of update to avoid conflict
type VPARecommendationUpdater ¶
type VPARecommendationUpdater interface { UpdateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error) UpdateVPARecommendationStatus(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.UpdateOptions) (*apis.VerticalPodAutoscalerRecommendation, error) PatchVPARecommendation(ctx context.Context, oldVpaRec, newVpaRec *apis.VerticalPodAutoscalerRecommendation) error PatchVPARecommendationStatus(ctx context.Context, oldVpaRec, newVpaRec *apis.VerticalPodAutoscalerRecommendation) error CreateVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.CreateOptions) (*apis.VerticalPodAutoscalerRecommendation, error) DeleteVPARecommendation(ctx context.Context, vpaRec *apis.VerticalPodAutoscalerRecommendation, opts metav1.DeleteOptions) error }
VPARecommendationUpdater is used to update VPARecommendation CR
type VPAUpdater ¶
type VPAUpdater interface { UpdateVPA(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, opts metav1.UpdateOptions) (*apis.KatalystVerticalPodAutoscaler, error) UpdateVPAStatus(ctx context.Context, vpa *apis.KatalystVerticalPodAutoscaler, opts metav1.UpdateOptions) (*apis.KatalystVerticalPodAutoscaler, error) PatchVPA(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error) PatchVPAStatus(ctx context.Context, oldVPA, newVPA *apis.KatalystVerticalPodAutoscaler) (*apis.KatalystVerticalPodAutoscaler, error) }
VPAUpdater is used to update VPA CR todo: use patch instead of update to avoid conflict
func NewRealVPAUpdater ¶
func NewRealVPAUpdater(client clientset.Interface) VPAUpdater
type VirtualWorkloadManager ¶ added in v0.5.6
type VirtualWorkloadManager interface { Create(ctx context.Context, vw *apis.VirtualWorkload, opts metav1.CreateOptions) (*apis.VirtualWorkload, error) Update(ctx context.Context, vw *apis.VirtualWorkload, opts metav1.UpdateOptions) (*apis.VirtualWorkload, error) UpdateStatus(ctx context.Context, vw *apis.VirtualWorkload, opts metav1.UpdateOptions) (*apis.VirtualWorkload, error) }
func NewVirtualWorkloadManager ¶ added in v0.5.6
func NewVirtualWorkloadManager(client clientset.Interface) VirtualWorkloadManager