mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-19 10:03:09 +02:00
Merge pull request #236 from zalando-incubator/fix-config-map-namespace
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")
|
configMapRawName := os.Getenv("CONFIG_MAP_NAME")
|
||||||
if configMapRawName != "" {
|
if configMapRawName != "" {
|
||||||
|
|
||||||
operatorNamespace := spec.GetOperatorNamespace()
|
err := config.ConfigMapName.Decode(configMapRawName)
|
||||||
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)
|
|
||||||
if err != nil {
|
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() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user