Skip to content

Commit

Permalink
feat: Drop apt install bcrypt (#148)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
phoevos committed Aug 4, 2023
1 parent 35e74f6 commit 4e42ce3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand Down

0 comments on commit 4e42ce3

Please sign in to comment.