1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Bugfix] Remove PDBs if group count is 0 (#1213)

This commit is contained in:
Adam Janikowski 2022-12-19 12:09:28 +01:00 committed by GitHub
parent 7dbd62f486
commit 207a606a85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# Change Log
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- (Bugfix) Remove PDBs if group count is 0
## [1.2.22](https://github.com/arangodb/kube-arangodb/tree/1.2.22) (2022-12-13)
- (Bugfix) Do not manage ports in managed ExternalAccess mode

View file

@ -121,8 +121,13 @@ func newPDBV1(minAvail int, deplname string, group api.ServerGroup, owner meta.O
}
}
// ensurePDBForGroup ensure pdb for a specific server group, if wantMinAvail is zero, the PDB is removed and not recreated
// ensurePDBForGroup ensure pdb for a specific server group, if wantMinAvail is zero or less, the PDB is removed and not recreated
func (r *Resources) ensurePDBForGroup(ctx context.Context, group api.ServerGroup, wantedMinAvail int) error {
if wantedMinAvail < 0 {
// Enforce removal
wantedMinAvail = 0
}
deplName := r.context.GetAPIObject().GetName()
pdbName := PDBNameForGroup(deplName, group)
log := r.log.Str("section", "pdb").Str("group", group.AsRole())