Documentation
¶
Index ¶
- Constants
- func CheckReconfigureUpdateProgress(pods []corev1.Pod, configKey, version string) int32
- func GcConfigRevision(configObj *corev1.ConfigMap)
- func GetClientFactory() createReconfigureClient
- func GetComponentPods(params reconfigureContext) ([]corev1.Pod, error)
- func GetCurrentRevision(annotations map[string]string) string
- type AutoReloadPolicy
- type ComponentDrivenParameterReconciler
- type ComponentParameterReconciler
- type ConfigurationRevision
- type ExecStatus
- type GetPodsFunc
- type OnlineUpdatePodFunc
- type ParameterDrivenConfigRenderReconciler
- type ParameterReconciler
- type ParameterTemplateExtensionReconciler
- type ParametersDefinitionReconciler
- type ReconcileContext
- type ReconfigureReconciler
- type ReloadAction
- type RestartComponent
- type RestartContainerFunc
- type ReturnedStatus
- type RollingUpgradeFuncs
- type Task
- type TaskContext
Constants ¶
const (
ConfigReconcileInterval = time.Second * 1
)
Variables ¶
This section is empty.
Functions ¶
func CheckReconfigureUpdateProgress ¶
CheckReconfigureUpdateProgress checks pods of the component is ready.
func GcConfigRevision ¶
func GetClientFactory ¶
func GetClientFactory() createReconfigureClient
GetClientFactory support ut mock
func GetComponentPods ¶
GetComponentPods gets all pods of the component.
func GetCurrentRevision ¶
Types ¶
type AutoReloadPolicy ¶
type AutoReloadPolicy struct{}
func (AutoReloadPolicy) GetPolicyName ¶
func (receiver AutoReloadPolicy) GetPolicyName() string
func (AutoReloadPolicy) Upgrade ¶
func (receiver AutoReloadPolicy) Upgrade(params reconfigureContext) (ReturnedStatus, error)
type ComponentDrivenParameterReconciler ¶
type ComponentDrivenParameterReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ComponentDrivenParameterReconciler reconciles a Parameter object
func (*ComponentDrivenParameterReconciler) Reconcile ¶
func (r *ComponentDrivenParameterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ComponentDrivenParameterReconciler) SetupWithManager ¶
func (r *ComponentDrivenParameterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentParameterReconciler ¶
type ComponentParameterReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ComponentParameterReconciler reconciles a ComponentParameter object
func (*ComponentParameterReconciler) Reconcile ¶
func (r *ComponentParameterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ComponentParameterReconciler) SetupWithManager ¶
func (r *ComponentParameterReconciler) SetupWithManager(mgr ctrl.Manager, multiClusterMgr multicluster.Manager) error
SetupWithManager sets up the controller with the Manager.
type ConfigurationRevision ¶
type ConfigurationRevision struct { Revision int64 StrRevision string Phase parametersv1alpha1.ParameterPhase Result intctrlutil.Result }
func GcRevision ¶
func GcRevision(annotations map[string]string) []ConfigurationRevision
func GetLastRevision ¶
func GetLastRevision(annotations map[string]string, revision int64) (ConfigurationRevision, bool)
func RetrieveRevision ¶
func RetrieveRevision(annotations map[string]string) []ConfigurationRevision
type ExecStatus ¶
type ExecStatus string
ExecStatus defines running result for Reconfiguring policy (fsm). ESNone describes policy has finished and quit. ESRetry describes fsm is running. ESFailed describes fsm is failed and exited. ESNotSupport describes fsm does not support the feature. ESFailedAndRetry describes fsm is failed in current state, but can be retried. +enum
const ( ESNone ExecStatus = "None" ESRetry ExecStatus = "Retry" ESFailed ExecStatus = "Failed" ESNotSupport ExecStatus = "NotSupport" ESFailedAndRetry ExecStatus = "FailedAndRetry" )
type GetPodsFunc ¶
type OnlineUpdatePodFunc ¶
type ParameterDrivenConfigRenderReconciler ¶
type ParameterDrivenConfigRenderReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ParameterDrivenConfigRenderReconciler reconciles a ParamConfigRenderer object
func (*ParameterDrivenConfigRenderReconciler) Reconcile ¶
func (r *ParameterDrivenConfigRenderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ParameterDrivenConfigRenderReconciler) SetupWithManager ¶
func (r *ParameterDrivenConfigRenderReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ParameterReconciler ¶
type ParameterReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ParameterReconciler reconciles a Parameter object
func (*ParameterReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ParameterReconciler) SetupWithManager ¶
func (r *ParameterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ParameterTemplateExtensionReconciler ¶
type ParameterTemplateExtensionReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ParameterTemplateExtensionReconciler reconciles a ParameterTemplateExtension object
func (*ParameterTemplateExtensionReconciler) Reconcile ¶
func (r *ParameterTemplateExtensionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ParameterTemplateExtension object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ParameterTemplateExtensionReconciler) SetupWithManager ¶
func (r *ParameterTemplateExtensionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ParametersDefinitionReconciler ¶
type ParametersDefinitionReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ParametersDefinitionReconciler reconciles a ParametersDefinition object
func (*ParametersDefinitionReconciler) Reconcile ¶
func (r *ParametersDefinitionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
func (*ParametersDefinitionReconciler) SetupWithManager ¶
func (r *ParametersDefinitionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReconcileContext ¶
type ReconcileContext struct { intctrlutil.RequestCtx configctrl.ResourceFetcher[ReconcileContext] Name string MatchingLabels client.MatchingLabels ConfigMap *corev1.ConfigMap BuiltinComponent *component.SynthesizedComponent Containers []string InstanceSetList []workloads.InstanceSet ConfigRender *parametersv1alpha1.ParamConfigRenderer ParametersDefs map[string]*parametersv1alpha1.ParametersDefinition }
func (*ReconcileContext) GetRelatedObjects ¶
func (c *ReconcileContext) GetRelatedObjects() error
func (*ReconcileContext) ParametersDefinitions ¶
func (c *ReconcileContext) ParametersDefinitions() *ReconcileContext
func (*ReconcileContext) SynthesizedComponent ¶
func (c *ReconcileContext) SynthesizedComponent() *ReconcileContext
func (*ReconcileContext) Workload ¶
func (c *ReconcileContext) Workload() *ReconcileContext
type ReconfigureReconciler ¶
type ReconfigureReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
ReconfigureReconciler reconciles a ReconfigureRequest object
func (*ReconfigureReconciler) Reconcile ¶
func (r *ReconfigureReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ReconfigureRequest object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile
func (*ReconfigureReconciler) SetupWithManager ¶
func (r *ReconfigureReconciler) SetupWithManager(mgr ctrl.Manager, multiClusterMgr multicluster.Manager) error
SetupWithManager sets up the controller with the Manager.
type ReloadAction ¶
type ReloadAction interface { ExecReload() (ReturnedStatus, error) ReloadType() string }
type RestartComponent ¶
type RestartContainerFunc ¶
type ReturnedStatus ¶
type ReturnedStatus struct { Status ExecStatus SucceedCount int32 ExpectedCount int32 }
type RollingUpgradeFuncs ¶
type RollingUpgradeFuncs struct { GetPodsFunc GetPodsFunc RestartContainerFunc RestartContainerFunc OnlineUpdatePodFunc OnlineUpdatePodFunc RestartComponent RestartComponent }
func GetInstanceSetRollingUpgradeFuncs ¶
func GetInstanceSetRollingUpgradeFuncs() RollingUpgradeFuncs
type Task ¶
type Task struct { configctrl.ResourceFetcher[Task] Status *parametersv1alpha1.ConfigTemplateItemDetailStatus Name string Do func(resource *Task, taskCtx *TaskContext, revision string) error }
func NewTask ¶
func NewTask(item parametersv1alpha1.ConfigTemplateItemDetail, status *parametersv1alpha1.ConfigTemplateItemDetailStatus) Task
type TaskContext ¶
type TaskContext struct {
// contains filtered or unexported fields
}
func NewTaskContext ¶
func NewTaskContext(ctx context.Context, cli client.Client, componentParameter *parametersv1alpha1.ComponentParameter, fetchTask *Task) (*TaskContext, error)
Source Files
¶
- combine_upgrade_policy.go
- componentdrivenparameter_controller.go
- componentparameter_controller.go
- config_annotation.go
- config_reconcile_wrapper.go
- config_related_helper.go
- config_util.go
- parallel_upgrade_policy.go
- paramconfigrenderer_controller.go
- parameter_controller.go
- parameter_util.go
- parametersdefinition_controller.go
- parametertemplateextension_controller.go
- policy_util.go
- reconcile_task.go
- reconfigure_controller.go
- reconfigure_policy.go
- relatedresource.go
- restart_policy.go
- revision.go
- rolling_upgrade_policy.go
- sync_upgrade_policy.go
- types.go
- utils.go