mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 16:12:07 +02:00
Remove the second namespace prefix from the operator configmap name
This commit is contained in:
+4
-10
@@ -30,20 +30,14 @@ func init() {
|
||||
configMapRawName := os.Getenv("CONFIG_MAP_NAME")
|
||||
if configMapRawName != "" {
|
||||
|
||||
operatorNamespace := spec.GetOperatorNamespace()
|
||||
config.Namespace = operatorNamespace
|
||||
|
||||
namespacedConfigMapName := operatorNamespace + "/" + configMapRawName
|
||||
|
||||
log.Printf("Looking for the operator configmap at the same namespace the operator resides. Fully qualified configmap name: %v", namespacedConfigMapName)
|
||||
|
||||
err := config.ConfigMapName.Decode(namespacedConfigMapName)
|
||||
err := config.ConfigMapName.Decode(configMapRawName)
|
||||
if err != nil {
|
||||
log.Fatalf("incorrect config map name: %v", namespacedConfigMapName)
|
||||
log.Fatalf("incorrect config map name: %v", configMapRawName)
|
||||
}
|
||||
|
||||
}
|
||||
log.Printf("Fully qualified configmap name: %v", config.ConfigMapName)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user