handler

package
v1.4.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePausePatch added in v1.4.6

func CreatePausePatch() ([]byte, error)

func CreateResumePatch added in v1.4.6

func CreateResumePatch() ([]byte, error)

func CreateResumeTimer added in v1.4.6

func CreateResumeTimer(deployment *app.Deployment, clients kube.Clients, namespace string, pauseDuration time.Duration)

CreateResumeTimer creates a timer to resume the deployment after the specified duration

func GetArgoRolloutRollingUpgradeFuncs added in v0.0.83

func GetArgoRolloutRollingUpgradeFuncs() callbacks.RollingUpgradeFuncs

GetArgoRolloutRollingUpgradeFuncs returns all callback funcs for a rollout

func GetCronJobCreateJobFuncs added in v1.0.42

func GetCronJobCreateJobFuncs() callbacks.RollingUpgradeFuncs

GetDeploymentRollingUpgradeFuncs returns all callback funcs for a cronjob

func GetDaemonSetRollingUpgradeFuncs added in v0.0.22

func GetDaemonSetRollingUpgradeFuncs() callbacks.RollingUpgradeFuncs

GetDaemonSetRollingUpgradeFuncs returns all callback funcs for a daemonset

func GetDeploymentRollingUpgradeFuncs added in v0.0.22

func GetDeploymentRollingUpgradeFuncs() callbacks.RollingUpgradeFuncs

GetDeploymentRollingUpgradeFuncs returns all callback funcs for a deployment

func GetJobCreateJobFuncs added in v1.3.0

func GetJobCreateJobFuncs() callbacks.RollingUpgradeFuncs

GetDeploymentRollingUpgradeFuncs returns all callback funcs for a cronjob

func GetPauseStartTime added in v1.4.6

func GetPauseStartTime(deployment *app.Deployment) (*time.Time, error)

Returns the time, the deployment was paused by reloader, nil otherwise

func GetStatefulSetRollingUpgradeFuncs added in v0.0.22

func GetStatefulSetRollingUpgradeFuncs() callbacks.RollingUpgradeFuncs

GetStatefulSetRollingUpgradeFuncs returns all callback funcs for a statefulSet

func HandleMissingTimer added in v1.4.6

func HandleMissingTimer(deployment *app.Deployment, pauseDuration time.Duration, clients kube.Clients, namespace string)

Handles the case where missing timers for deployments that have been paused by reloader. Could occur after new leader election or reloader restart

func IsPaused added in v1.4.6

func IsPaused(deployment *app.Deployment) bool

Checks if a deployment is currently paused

func IsPausedByReloader added in v1.4.6

func IsPausedByReloader(deployment *app.Deployment) bool

Deployment paused by reloader ?

func ParsePauseDuration added in v1.4.6

func ParsePauseDuration(pauseIntervalValue string) (time.Duration, error)

ParsePauseDuration parses the pause interval value and returns a time.Duration

func PauseDeployment added in v1.4.6

func PauseDeployment(deployment *app.Deployment, clients kube.Clients, namespace, pauseIntervalValue string) (*app.Deployment, error)

Pauses a deployment for a specified duration and creates a timer to resume it after the specified duration

func PerformAction added in v1.0.116

func PerformAction(clients kube.Clients, config common.Config, upgradeFuncs callbacks.RollingUpgradeFuncs, collectors metrics.Collectors, recorder record.EventRecorder, strategy invokeStrategy) error

PerformAction invokes the deployment if there is any change in configmap or secret data

func ResumeDeployment added in v1.4.6

func ResumeDeployment(deployment *app.Deployment, namespace string, clients kube.Clients)

ResumeDeployment resumes a deployment that has been paused by reloader

Types

type InvokeStrategyResult added in v1.4.3

type InvokeStrategyResult struct {
	Result constants.Result
	Patch  *Patch
}

type Patch added in v1.4.3

type Patch struct {
	Type  patchtypes.PatchType
	Bytes []byte
}

type ResourceCreatedHandler

type ResourceCreatedHandler struct {
	Resource   interface{}
	Collectors metrics.Collectors
	Recorder   record.EventRecorder
}

ResourceCreatedHandler contains new objects

func (ResourceCreatedHandler) GetConfig added in v0.0.22

func (r ResourceCreatedHandler) GetConfig() (common.Config, string)

GetConfig gets configurations containing SHA, annotations, namespace and resource name

func (ResourceCreatedHandler) Handle

func (r ResourceCreatedHandler) Handle() error

Handle processes the newly created resource

type ResourceDeleteHandler added in v1.0.116

type ResourceDeleteHandler struct {
	Resource   interface{}
	Collectors metrics.Collectors
	Recorder   record.EventRecorder
}

ResourceDeleteHandler contains new objects

func (ResourceDeleteHandler) GetConfig added in v1.0.116

func (r ResourceDeleteHandler) GetConfig() (common.Config, string)

GetConfig gets configurations containing SHA, annotations, namespace and resource name

func (ResourceDeleteHandler) Handle added in v1.0.116

func (r ResourceDeleteHandler) Handle() error

Handle processes resources being deleted

type ResourceHandler

type ResourceHandler interface {
	Handle() error
	GetConfig() (common.Config, string)
}

ResourceHandler handles the creation and update of resources

type ResourceUpdatedHandler

type ResourceUpdatedHandler struct {
	Resource    interface{}
	OldResource interface{}
	Collectors  metrics.Collectors
	Recorder    record.EventRecorder
}

ResourceUpdatedHandler contains updated objects

func (ResourceUpdatedHandler) GetConfig added in v0.0.22

func (r ResourceUpdatedHandler) GetConfig() (common.Config, string)

GetConfig gets configurations containing SHA, annotations, namespace and resource name

func (ResourceUpdatedHandler) Handle

func (r ResourceUpdatedHandler) Handle() error

Handle processes the updated resource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL