diff --git a/bitwarden-crd-operator.py b/bitwarden-crd-operator.py index eb05916..4e89291 100755 --- a/bitwarden-crd-operator.py +++ b/bitwarden-crd-operator.py @@ -2,7 +2,7 @@ import os import kopf import kubernetes -from jinja2 import Environment, FileSystemLoader +from jinja2 import Template @kopf.on.create('bitwarden-secrets.lerentis.uploadfilter24.eu') @@ -15,9 +15,9 @@ def create_fn(spec, name, namespace, logger, **kwargs): api = kubernetes.client.CoreV1Api() - environment = Environment(loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), '/templates'))) + with open(os.path.join(os.path.dirname(__file__), '/templates/username-password.yaml.j2')) as file_: + template = Template(file_.read()) - template = environment.get_template('username-password.yaml.j2') data = template.render( original_crd=name, secret_name=secret_name, diff --git a/chart/bitwarden-crd-operator/values.yaml b/chart/bitwarden-crd-operator/values.yaml index 262d5dd..e8d449e 100644 --- a/chart/bitwarden-crd-operator/values.yaml +++ b/chart/bitwarden-crd-operator/values.yaml @@ -8,7 +8,7 @@ image: repository: lerentis/bitwarden-crd-operator pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "28c2db9d18cfc98aa556764912bce8a981b09f22" + tag: "53d27891282b91cd379f1d28ccbaec0100d19dfa" imagePullSecrets: [] nameOverride: ""