Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make *_LOCK_DURATION options more clear #23

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Application Options:
(default: 10m) [$REPAIR_NOTREADY_THRESHOLD]
--repair.concurrency= How many VMs should be redeployed concurrently (default: 1)
[$REPAIR_CONCURRENCY]
--repair.lock-duration= Duration how long should be waited for another redeploy (default: 30m)
--repair.lock-duration= Duration how long should be waited for another redeploy on the same node (default: 30m)
[$REPAIR_LOCK_DURATION]
--repair.lock-duration-error= Duration how long should be waited for another redeploy in case an error
--repair.lock-duration-error= Duration how long should be waited for another redeploy on the same node in case an error
occurred (default: 5m) [$REPAIR_LOCK_DURATION_ERROR]
--repair.azure.vmss.action=[restart|redeploy|reimage|delete] Defines the action which should be tried to repair the node (VMSS)
(default: redeploy) [$REPAIR_AZURE_VMSS_ACTION]
Expand All @@ -60,9 +60,9 @@ Application Options:
--update.crontab= Crontab of check runs (default: @every 15m) [$UPDATE_CRONTAB]
--update.concurrency= How many VMs should be updated concurrently (default: 1)
[$UPDATE_CONCURRENCY]
--update.lock-duration= Duration how long should be waited for another update (default: 15m)
--update.lock-duration= Duration how long should be waited for another update on the same node (default: 15m)
[$UPDATE_LOCK_DURATION]
--update.lock-duration-error= Duration how long should be waited for another update in case an error
--update.lock-duration-error= Duration how long should be waited for another update on the same node in case an error
occurred (default: 5m) [$UPDATE_LOCK_DURATION_ERROR]
--update.lock-annotation= Node annotation for update lock time (default:
autopilot.webdevops.io/update-lock) [$UPDATE_LOCK_ANNOTATION]
Expand Down
8 changes: 4 additions & 4 deletions config/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ type (
Crontab string `long:"repair.crontab" env:"REPAIR_CRONTAB" description:"Crontab of check runs" default:"@every 2m"`
NotReadyThreshold time.Duration `long:"repair.notready-threshold" env:"REPAIR_NOTREADY_THRESHOLD" description:"Threshold (duration) when the automatic repair should be tried (eg. after 10 mins of NotReady state after last successfull heartbeat)" default:"10m"`
Limit int `long:"repair.concurrency" env:"REPAIR_CONCURRENCY" description:"How many VMs should be redeployed concurrently" default:"1"`
LockDuration time.Duration `long:"repair.lock-duration" env:"REPAIR_LOCK_DURATION" description:"Duration how long should be waited for another redeploy" default:"30m"`
LockDurationError time.Duration `long:"repair.lock-duration-error" env:"REPAIR_LOCK_DURATION_ERROR" description:"Duration how long should be waited for another redeploy in case an error occurred" default:"5m"`
LockDuration time.Duration `long:"repair.lock-duration" env:"REPAIR_LOCK_DURATION" description:"Duration how long should be waited for another redeploy on the same node" default:"30m"`
LockDurationError time.Duration `long:"repair.lock-duration-error" env:"REPAIR_LOCK_DURATION_ERROR" description:"Duration how long should be waited for another redeploy on the same node in case an error occurred" default:"5m"`
AzureVmssAction string `long:"repair.azure.vmss.action" env:"REPAIR_AZURE_VMSS_ACTION" description:"Defines the action which should be tried to repair the node (VMSS)" default:"redeploy" choice:"restart" choice:"redeploy" choice:"reimage" choice:"delete"` //nolint:staticcheck
AzureVmAction string `long:"repair.azure.vm.action" env:"REPAIR_AZURE_VM_ACTION" description:"Defines the action which should be tried to repair the node (VM)" default:"redeploy" choice:"restart" choice:"redeploy"` //nolint:staticcheck
ProvisioningState []string `long:"repair.azure.provisioningstate" env:"REPAIR_AZURE_PROVISIONINGSTATE" description:"Azure VM provisioning states where repair should be tried (eg. avoid repair in \"upgrading\" state; \"*\" to accept all states)" default:"succeeded" default:"failed" env-delim:" "` //nolint:staticcheck
Expand All @@ -62,8 +62,8 @@ type (
Update struct {
Crontab string `long:"update.crontab" env:"UPDATE_CRONTAB" description:"Crontab of check runs" default:"@every 15m"`
Limit int `long:"update.concurrency" env:"UPDATE_CONCURRENCY" description:"How many VMs should be updated concurrently" default:"1"`
LockDuration time.Duration `long:"update.lock-duration" env:"UPDATE_LOCK_DURATION" description:"Duration how long should be waited for another update" default:"15m"`
LockDurationError time.Duration `long:"update.lock-duration-error" env:"UPDATE_LOCK_DURATION_ERROR" description:"Duration how long should be waited for another update in case an error occurred" default:"5m"`
LockDuration time.Duration `long:"update.lock-duration" env:"UPDATE_LOCK_DURATION" description:"Duration how long should be waited for another update on the same node" default:"15m"`
LockDurationError time.Duration `long:"update.lock-duration-error" env:"UPDATE_LOCK_DURATION_ERROR" description:"Duration how long should be waited for another update on the same node in case an error occurred" default:"5m"`
NodeLockAnnotation string `long:"update.lock-annotation" env:"UPDATE_LOCK_ANNOTATION" description:"Node annotation for update lock time" default:"autopilot.webdevops.io/update-lock"`
NodeOngoingAnnotation string `long:"update.ongoing-annotation" env:"UPDATE_ONGOING_ANNOTATION" description:"Node annotation for ongoing update lock" default:"autopilot.webdevops.io/update-ongoing"`
NodeExcludeAnnotation string `long:"update.exclude-annotation" env:"UPDATE_EXCLUDE_ANNOTATION" description:"Node annotation for excluding node for updates" default:"autopilot.webdevops.io/exclude"`
Expand Down
Loading