Skip to content

Commit

Permalink
fix: enable ARGO_REMOVE_PVC_PROTECTION_FINALIZER by default. Fixes #…
Browse files Browse the repository at this point in the history
…8592 (#8661)

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohankmr414 authored May 6, 2022
1 parent 6c0602c commit 16fef4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ most users. Environment variables may be removed at any time.
| `ARGO_PPROF` | `bool` | `false` | Enable `pprof` endpoints |
| `ARGO_PROGRESS_PATCH_TICK_DURATION` | `time.Duration` | `1m` | How often self reported progress is patched into the pod annotations which means how long it takes until the controller picks up the progress change. Set to 0 to disable self reporting progress. |
| `ARGO_PROGRESS_FILE_TICK_DURATION` | `time.Duration` | `3s` | How often the progress file is read by the executor. Set to 0 to disable self reporting progress. |
| `ARGO_REMOVE_PVC_PROTECTION_FINALIZER` | `bool` | `false` | Remove the `kubernetes.io/pvc-protection` finalizer from persistent volume claims (PVC) after marking PVCs created for the workflow for deletion, so deleted is not blocked until the pods are deleted. [#6629](https://github.com/argoproj/argo-workflows/issues/6629) |
| `ARGO_REMOVE_PVC_PROTECTION_FINALIZER` | `bool` | `true` | Remove the `kubernetes.io/pvc-protection` finalizer from persistent volume claims (PVC) after marking PVCs created for the workflow for deletion, so deleted is not blocked until the pods are deleted. [#6629](https://github.com/argoproj/argo-workflows/issues/6629) |
| `ARGO_TRACE` | `string` | `` | Whether to enable tracing statements in Argo components. |
| `ARGO_AGENT_PATCH_RATE` | `time.Duration` | `DEFAULT_REQUEUE_TIME` | Rate that the Argo Agent will patch the workflow task-set. |
| `ARGO_AGENT_CPU_LIMIT` | `resource.Quantity` | `100m` | CPU resource limit for the agent. |
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ func (woc *wfOperationCtx) deletePVCs(ctx context.Context) error {
}
}
}
if os.Getenv("ARGO_REMOVE_PVC_PROTECTION_FINALIZER") == "true" {
if os.Getenv("ARGO_REMOVE_PVC_PROTECTION_FINALIZER") != "false" {
for _, pvc := range woc.wf.Status.PersistentVolumeClaims {
woc.log.WithField("claimName", pvc.PersistentVolumeClaim.ClaimName).
Info("Removing PVC \"kubernetes.io/pvc-protection\" finalizer")
Expand Down
6 changes: 3 additions & 3 deletions workflow/controller/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func TestVolumeGCStrategy(t *testing.T) {
name: "failed/OnWorkflowCompletion",
strategy: wfv1.VolumeClaimGCOnCompletion,
phase: wfv1.NodeFailed,
expectedVolumesRemaining: 0,
expectedVolumesRemaining: 1,
}, {
name: "failed/OnWorkflowSuccess",
strategy: wfv1.VolumeClaimGCOnSuccess,
Expand All @@ -482,12 +482,12 @@ func TestVolumeGCStrategy(t *testing.T) {
name: "succeeded/OnWorkflowSuccess",
strategy: wfv1.VolumeClaimGCOnSuccess,
phase: wfv1.NodeSucceeded,
expectedVolumesRemaining: 0,
expectedVolumesRemaining: 1,
}, {
name: "succeeded/OnWorkflowCompletion",
strategy: wfv1.VolumeClaimGCOnCompletion,
phase: wfv1.NodeSucceeded,
expectedVolumesRemaining: 0,
expectedVolumesRemaining: 1,
}}

for _, tt := range tests {
Expand Down

0 comments on commit 16fef4e

Please sign in to comment.