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 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 DummySPDControl
- func (d *DummySPDControl) CreateSPD(ctx context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.CreateOptions) (*apis.ServiceProfileDescriptor, error)
- func (d *DummySPDControl) DeleteSPD(_ context.Context, _ *apis.ServiceProfileDescriptor, _ metav1.DeleteOptions) 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 KCCControl
- 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 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 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 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) 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
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 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 DummySPDControl ¶
type DummySPDControl struct{}
func (*DummySPDControl) CreateSPD ¶
func (d *DummySPDControl) CreateSPD(ctx 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) 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 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 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 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 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 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) 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) 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