Add image_username and image_password to charms
[osm/devops.git] / installers / charm / ng-ui / src / charm.py
index d9ad8f2..6f5ca5b 100755 (executable)
@@ -32,9 +32,6 @@ from ops.model import (
 )
 
 
-sys.path.append("lib")
-
-
 logger = logging.getLogger(__name__)
 
 
@@ -130,7 +127,11 @@ class NGUICharm(CharmBase):
         ]
         port = config["https_port"] if ssl_enabled else config["port"]
         ports = [
-            {"name": "port", "containerPort": port, "protocol": "TCP", },
+            {
+                "name": "port",
+                "containerPort": port,
+                "protocol": "TCP",
+            },
         ]
 
         kubernetes = {
@@ -166,7 +167,11 @@ class NGUICharm(CharmBase):
             "containers": [
                 {
                     "name": self.framework.model.app.name,
-                    "image": "{}".format(config["image"]),
+                    "imageDetails": {
+                        "imagePath": config["image"],
+                        "username": config["image_username"],
+                        "password": config["image_password"],
+                    },
                     "ports": ports,
                     "kubernetes": kubernetes,
                     "files": files,