mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 07:20:07 +02:00
fix sync streams and add diffs for annotations and owner references (#2728)
* extend and improve hasSlotsInSync unit test * fix sync streams and add diffs for annotations and owner references * incl. current annotations as desired where we do not fully control them * added one more unit test and fixed sub test names * pass maintenance windows to function and update unit test
This commit is contained in:
+3
-3
@@ -663,15 +663,15 @@ func parseResourceRequirements(resourcesRequirement v1.ResourceRequirements) (ac
|
||||
return resources, nil
|
||||
}
|
||||
|
||||
func (c *Cluster) isInMainternanceWindow() bool {
|
||||
if c.Spec.MaintenanceWindows == nil {
|
||||
func isInMainternanceWindow(specMaintenanceWindows []acidv1.MaintenanceWindow) bool {
|
||||
if len(specMaintenanceWindows) == 0 {
|
||||
return true
|
||||
}
|
||||
now := time.Now()
|
||||
currentDay := now.Weekday()
|
||||
currentTime := now.Format("15:04")
|
||||
|
||||
for _, window := range c.Spec.MaintenanceWindows {
|
||||
for _, window := range specMaintenanceWindows {
|
||||
startTime := window.StartTime.Format("15:04")
|
||||
endTime := window.EndTime.Format("15:04")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user