Skip to content

Commit 4e42ce3

Browse files
authored
feat: Drop apt install bcrypt (#148)
Currently, Dex Charm is doing apt install. Update this logic to ensure the Dex Charm can work in an airgapped environment. Closes #100 Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@canonical.com>
1 parent 35e74f6 commit 4e42ce3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/charm.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# See LICENSE file for licensing details.
44

55
import logging
6-
import subprocess
76
from random import choices
87
from string import ascii_letters
98
from uuid import uuid4
109

10+
import bcrypt
1111
import yaml
1212
from charmed_kubeflow_chisme.exceptions import ErrorWithStatus
1313
from charms.grafana_k8s.v0.grafana_dashboard import GrafanaDashboardProvider
@@ -20,13 +20,6 @@
2020
from ops.pebble import Layer
2121
from serialized_data_interface import NoCompatibleVersions, NoVersionsListed, get_interface
2222

23-
try:
24-
import bcrypt
25-
except ImportError:
26-
subprocess.check_call(["apt", "update"])
27-
subprocess.check_call(["apt", "install", "-y", "python3-bcrypt"])
28-
import bcrypt
29-
3023
METRICS_PATH = "/metrics"
3124
METRICS_PORT = "5558"
3225

0 commit comments

Comments
 (0)