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:
parent
7dbd62f486
commit
207a606a85
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue