From 0a0215f739ca5694e982e4c63b7d184efb043aa3 Mon Sep 17 00:00:00 2001 From: Phoevos Kalemkeris Date: Thu, 3 Aug 2023 11:39:17 +0300 Subject: [PATCH] charm: Drop `apt install bcrypt` Currently, Dex Charm is doing apt install. Update this logic to ensure the Dex Charm can work in an airgapped environment. Signed-off-by: Phoevos Kalemkeris --- src/charm.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/charm.py b/src/charm.py index 9d691a7c..f3c00f43 100755 --- a/src/charm.py +++ b/src/charm.py @@ -3,11 +3,11 @@ # See LICENSE file for licensing details. import logging -import subprocess from random import choices from string import ascii_letters from uuid import uuid4 +import bcrypt import yaml from charmed_kubeflow_chisme.exceptions import ErrorWithStatus from charms.grafana_k8s.v0.grafana_dashboard import GrafanaDashboardProvider @@ -20,13 +20,6 @@ from ops.pebble import Layer from serialized_data_interface import NoCompatibleVersions, NoVersionsListed, get_interface -try: - import bcrypt -except ImportError: - subprocess.check_call(["apt", "update"]) - subprocess.check_call(["apt", "install", "-y", "python3-bcrypt"]) - import bcrypt - METRICS_PATH = "/metrics" METRICS_PORT = "5558"