Skip to content

Commit

Permalink
internal/finalize: fixes typo at PDB delete function
Browse files Browse the repository at this point in the history
Previously name and namespace args were misplaced at removeFinalize function call.
It prevented from proper object deletion. And caused various errors during objects deletion.

#1036
Signed-off-by: f41gh7 <[email protected]>
  • Loading branch information
f41gh7 committed Jul 17, 2024
1 parent ffe2ffb commit e9a4a61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ aliases:
---
# CHANGELOG

- [operator](./README.md): properly release `PodDisruptionBudget` object finalizer. Previously it could be kept due to typo. See this [issue](https://github.com/VictoriaMetrics/operator/issues/1036) for details.

## [v0.46.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.46.4) - 9 Jul 2024

### Breaking changes
Expand Down Expand Up @@ -1769,4 +1771,3 @@ it contains basic api objects support:
[v0.0.6]: https://github.com/VictoriaMetrics/operator/compare/v0.0.2...v0.0.6
[v0.0.2]: https://github.com/VictoriaMetrics/operator/compare/v0.0.1...v0.0.2
[v0.0.1]: https://github.com/VictoriaMetrics/operator/tree/v0.0.1

2 changes: 1 addition & 1 deletion internal/controller/operator/factory/finalize/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func finalizePBD(ctx context.Context, rclient client.Client, crd crdObject) erro
return removeFinalizeObjByName(ctx, rclient, &policyv1.PodDisruptionBudget{}, crd.PrefixedName(), crd.GetNSName())
}

func finalizePBDWithName(ctx context.Context, rclient client.Client, ns, name string) error {
func finalizePBDWithName(ctx context.Context, rclient client.Client, name, ns string) error {
return removeFinalizeObjByName(ctx, rclient, &policyv1.PodDisruptionBudget{}, name, ns)
}

Expand Down

0 comments on commit e9a4a61

Please sign in to comment.