simplify template read
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
53d2789128
commit
2685c5b97d
@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
import kopf
|
import kopf
|
||||||
import kubernetes
|
import kubernetes
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Template
|
||||||
|
|
||||||
|
|
||||||
@kopf.on.create('bitwarden-secrets.lerentis.uploadfilter24.eu')
|
@kopf.on.create('bitwarden-secrets.lerentis.uploadfilter24.eu')
|
||||||
@ -15,9 +15,9 @@ def create_fn(spec, name, namespace, logger, **kwargs):
|
|||||||
|
|
||||||
api = kubernetes.client.CoreV1Api()
|
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(
|
data = template.render(
|
||||||
original_crd=name,
|
original_crd=name,
|
||||||
secret_name=secret_name,
|
secret_name=secret_name,
|
||||||
|
@ -8,7 +8,7 @@ image:
|
|||||||
repository: lerentis/bitwarden-crd-operator
|
repository: lerentis/bitwarden-crd-operator
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: "28c2db9d18cfc98aa556764912bce8a981b09f22"
|
tag: "53d27891282b91cd379f1d28ccbaec0100d19dfa"
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
|
Loading…
Reference in New Issue
Block a user