when kubernetes_use_configmaps -> skip further endpoints actions even delete (#921)

* further compatibility with k8sUseConfigMaps - skip further endpoints related actions

* Update pkg/cluster/cluster.go

thanks!

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update pkg/cluster/cluster.go

Co-Authored-By: Felix Kunde <felix-kunde@gmx.de>

* Update pkg/cluster/cluster.go

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
ReSearchITEng
2020-04-16 16:47:59 +02:00
committed by GitHub
co-authored by Felix Kunde
parent 6a689cdc1c
commit 5014eebfb2
2 changed files with 18 additions and 7 deletions
+4 -3
View File
@@ -122,10 +122,11 @@ func (c *Cluster) syncServices() error {
for _, role := range []PostgresRole{Master, Replica} {
c.logger.Debugf("syncing %s service", role)
if err := c.syncEndpoint(role); err != nil {
return fmt.Errorf("could not sync %s endpoint: %v", role, err)
if !c.patroniKubernetesUseConfigMaps() {
if err := c.syncEndpoint(role); err != nil {
return fmt.Errorf("could not sync %s endpoint: %v", role, err)
}
}
if err := c.syncService(role); err != nil {
return fmt.Errorf("could not sync %s service: %v", role, err)
}