Handle update path and renaming

- handle the update path to update sts and connection pooler deployment.
  This way no need to wait for sync
- rename the parameter to downscaler_annotations
- handle other review comments
This commit is contained in:
Rafia Sabih
2020-04-30 13:20:44 +02:00
parent 1745c44c5e
commit 11ef0cf722
15 changed files with 41 additions and 45 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
result.SidecarImages = fromCRD.SidecarImages
result.SidecarContainers = fromCRD.SidecarContainers
result.StatefulsetPropagateAnnotations = fromCRD.StatefulsetPropagateAnnotations
result.DownscalerAnnotations = fromCRD.Kubernetes.DownscalerAnnotations
// user config
result.SuperUsername = fromCRD.PostgresUsersConfiguration.SuperUsername
+3 -1
View File
@@ -487,7 +487,9 @@ func (c *Controller) postgresqlUpdate(prev, cur interface{}) {
if pgOld != nil && pgNew != nil {
// Avoid the inifinite recursion for status updates
if reflect.DeepEqual(pgOld.Spec, pgNew.Spec) {
return
if pgNew.Annotations != nil && pgOld.Annotations != nil && !reflect.DeepEqual(pgNew.Annotations, pgOld.Annotations) {
return
}
}
c.queueClusterEvent(pgOld, pgNew, EventUpdate)
}