mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 17:50:28 +02:00
drop deprecated fields from Postgresql CRD (#3106)
* remove deprecated fields from postgresql CRD --------- Co-authored-by: ida-novindasari_zse <ida.novindasari@zalando.de> Co-authored-by: Mikkel Oscar Lyderik Larsen <mikkeloscar@users.noreply.github.com> Co-authored-by: idanovinda <idanovinda@gmail.com>
This commit is contained in:
co-authored by
ida-novindasari_zse
Mikkel Oscar Lyderik Larsen
idanovinda
parent
a3d17c12d2
commit
18e359b995
@@ -1084,7 +1084,7 @@ func (c *Cluster) Update(oldSpec, newSpec *acidv1.Postgresql) error {
|
||||
|
||||
// Patroni service and endpoints / config maps
|
||||
if err := c.syncPatroniResources(); err != nil {
|
||||
c.logger.Errorf("could not sync services: %v", err)
|
||||
c.logger.Errorf("could not sync Patroni resources: %v", err)
|
||||
updateFailed = true
|
||||
}
|
||||
|
||||
|
||||
@@ -1340,28 +1340,6 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef
|
||||
}
|
||||
}
|
||||
|
||||
// backward compatible check for InitContainers
|
||||
if spec.InitContainersOld != nil {
|
||||
msg := "manifest parameter init_containers is deprecated."
|
||||
if spec.InitContainers == nil {
|
||||
c.logger.Warningf("%s Consider using initContainers instead.", msg)
|
||||
spec.InitContainers = spec.InitContainersOld
|
||||
} else {
|
||||
c.logger.Warningf("%s Only value from initContainers is used", msg)
|
||||
}
|
||||
}
|
||||
|
||||
// backward compatible check for PodPriorityClassName
|
||||
if spec.PodPriorityClassNameOld != "" {
|
||||
msg := "manifest parameter pod_priority_class_name is deprecated."
|
||||
if spec.PodPriorityClassName == "" {
|
||||
c.logger.Warningf("%s Consider using podPriorityClassName instead.", msg)
|
||||
spec.PodPriorityClassName = spec.PodPriorityClassNameOld
|
||||
} else {
|
||||
c.logger.Warningf("%s Only value from podPriorityClassName is used", msg)
|
||||
}
|
||||
}
|
||||
|
||||
spiloConfiguration, err := generateSpiloJSONConfiguration(&spec.PostgresqlParam, &spec.Patroni, &c.OpConfig, c.logger)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not generate Spilo JSON configuration: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user