From a3cf80e187c18926b60895661329af33e0c34f35 Mon Sep 17 00:00:00 2001
From: Sergey Dudoladov <sergey.dudoladov@zalando.de>
Date: Fri, 21 Dec 2018 18:14:55 +0100
Subject: [PATCH] Fix syntax error and run_locally_script

---
 pkg/util/users/users.go | 2 +-
 run_operator_locally.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/util/users/users.go b/pkg/util/users/users.go
index b4d7fd82..b436595e 100644
--- a/pkg/util/users/users.go
+++ b/pkg/util/users/users.go
@@ -116,7 +116,7 @@ func (strategy DefaultUserSyncStrategy) createPgUser(user spec.PgUser, db *sql.D
 		userFlags = append(userFlags, fmt.Sprintf(inRoleTemplate, quoteMemberList(user)))
 	}
 	if user.AdminRole != "" {
-		userFlags = append(userFlags, fmt.Sprintf(adminTemplate, user))
+		userFlags = append(userFlags, fmt.Sprintf(adminTemplate, user.AdminRole))
 	}
 
 	if user.Password == "" {
diff --git a/run_operator_locally.sh b/run_operator_locally.sh
index 301803c3..d6c416d5 100755
--- a/run_operator_locally.sh
+++ b/run_operator_locally.sh
@@ -121,7 +121,7 @@ function deploy_self_built_image() {
     # update the tag in the postgres operator conf
     # since the image with this tag already exists on the machine,
     # docker should not attempt to fetch it from the registry due to imagePullPolicy
-    sed --expression "s/\(image\:.*\:\).*$/\1$TAG/" manifests/postgres-operator.yaml > "$PATH_TO_LOCAL_OPERATOR_MANIFEST"
+    sed --expression "s/\(image\:.*\:\).*$/\1$TAG/; s/smoke-tested-//" manifests/postgres-operator.yaml > "$PATH_TO_LOCAL_OPERATOR_MANIFEST"
 
     retry "kubectl create -f \"$PATH_TO_LOCAL_OPERATOR_MANIFEST\"" "attempt to create $PATH_TO_LOCAL_OPERATOR_MANIFEST resource"
 }
-- 
GitLab