base64 is no native filter in jinja
All checks were successful
continuous-integration/drone/push Build is passing

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

View File

@ -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: "2685c5b97d76bf00ed4c15519b699ae88682078f" tag: "97fced6969e32d0c7e0975865f26ebbc43f1cd8a"
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""

View File

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