base64 is no native filter in jinja
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tobias Trabelsi 2022-09-10 15:23:53 +02:00
parent 97fced6969
commit 4f3fc82e48
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
3 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
import kopf
import kubernetes
import base64
from jinja2 import Template
@ -22,8 +23,8 @@ def create_fn(spec, name, namespace, logger, **kwargs):
original_crd=name,
secret_name=secret_name,
namespace=secret_namespace,
username="test",
password="test"
username=base64.b64encode("test"),
password=base64.b64encode("test")
)
obj = api.create_namespaced_secret(

View File

@ -8,7 +8,7 @@ image:
repository: lerentis/bitwarden-crd-operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "2685c5b97d76bf00ed4c15519b699ae88682078f"
tag: "97fced6969e32d0c7e0975865f26ebbc43f1cd8a"
imagePullSecrets: []
nameOverride: ""

View File

@ -8,5 +8,5 @@ metadata:
namespace: "{{ namespace }}"
type: Opaque
data:
username: "{{ username | base64 }}"
password: "{{ password | base64 }}"
username: "{{ username }}"
password: "{{ password }}"