projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Additional arguments
[osm/devops.git]
/
installers
/
charm
/
ng-ui
/
src
/
charm.py
diff --git
a/installers/charm/ng-ui/src/charm.py
b/installers/charm/ng-ui/src/charm.py
index
8e21bcd
..
6f5ca5b
100755
(executable)
--- a/
installers/charm/ng-ui/src/charm.py
+++ b/
installers/charm/ng-ui/src/charm.py
@@
-13,11
+13,12
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
-import logging
import base64
import base64
-
-sys.path.append("lib")
+from glob import glob
+import logging
+from pathlib import Path
+from string import Template
+import sys
from ops.charm import CharmBase
from ops.framework import StoredState, Object
from ops.charm import CharmBase
from ops.framework import StoredState, Object
@@
-30,9
+31,6
@@
from ops.model import (
WaitingStatus,
)
WaitingStatus,
)
-from glob import glob
-from pathlib import Path
-from string import Template
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@
-129,7
+127,11
@@
class NGUICharm(CharmBase):
]
port = config["https_port"] if ssl_enabled else config["port"]
ports = [
]
port = config["https_port"] if ssl_enabled else config["port"]
ports = [
- {"name": "port", "containerPort": port, "protocol": "TCP", },
+ {
+ "name": "port",
+ "containerPort": port,
+ "protocol": "TCP",
+ },
]
kubernetes = {
]
kubernetes = {
@@
-158,12
+160,18
@@
class NGUICharm(CharmBase):
}
)
}
)
+ logger.debug(files)
+
spec = {
"version": 2,
"containers": [
{
"name": self.framework.model.app.name,
spec = {
"version": 2,
"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,
"ports": ports,
"kubernetes": kubernetes,
"files": files,