Skip to content

Commit b412a83

Browse files
author
Sergey Dudoladov
committed
Remove the second namespace prefix from the operator configmap name
1 parent 0455792 commit b412a83

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

cmd/main.go

+4-10
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,14 @@ func init() {
3030
configMapRawName := os.Getenv("CONFIG_MAP_NAME")
3131
if configMapRawName != "" {
3232

33-
operatorNamespace := spec.GetOperatorNamespace()
34-
config.Namespace = operatorNamespace
35-
36-
namespacedConfigMapName := operatorNamespace + "/" + configMapRawName
37-
38-
log.Printf("Looking for the operator configmap at the same namespace the operator resides. Fully qualified configmap name: %v", namespacedConfigMapName)
39-
40-
err := config.ConfigMapName.Decode(namespacedConfigMapName)
33+
err := config.ConfigMapName.Decode(configMapRawName)
4134
if err != nil {
42-
log.Fatalf("incorrect config map name: %v", namespacedConfigMapName)
35+
log.Fatalf("incorrect config map name: %v", configMapRawName)
4336
}
4437

45-
}
38+
log.Printf("Fully qualified configmap name: %v", config.ConfigMapName)
4639

40+
}
4741
}
4842

4943
func main() {

0 commit comments

Comments
 (0)