prepare changelog and set ownership to generated secrets

This commit is contained in:
Tobias Trabelsi 2024-05-18 22:50:18 +02:00
parent c9c36f1a37
commit 1128051a5b
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
4 changed files with 29 additions and 6 deletions

View File

@ -4,9 +4,9 @@ description: Deploy the Bitwarden CRD Operator
type: application type: application
version: "v0.11.3" version: "v0.12.0"
appVersion: "0.10.3" appVersion: "0.11.0"
keywords: keywords:
- operator - operator
@ -102,11 +102,21 @@ annotations:
artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: changed - kind: changed
description: "Update python to 3.11.8-r0" description: "Update python to 3.11.9-r0"
- kind: changed - kind: changed
description: "Update Node to 20.11.1-r0" description: "Update Node to 20.12.1-r0"
- kind: changed - kind: changed
description: "Unified bw cli installation methode" description: "Update libcrypto3 to 3.1.4-r5"
- kind: changed
description: "Update alpine to 3.19.1"
- kind: changed
description: "Update kopf to 1.37.2"
- kind: changed
description: "Update jinja to 3.1.4"
- kind: added
description: "Allow custom annotations to generated secrets"
- kind: added
description: "Set ownership of generated secrets"
artifacthub.io/images: | artifacthub.io/images: |
- name: bitwarden-crd-operator - name: bitwarden-crd-operator
image: ghcr.io/lerentis/bitwarden-crd-operator:0.10.3 image: ghcr.io/lerentis/bitwarden-crd-operator:0.11.0

View File

@ -71,6 +71,8 @@ def create_managed_registry_secret(spec, name, namespace, logger, **kwargs):
password_ref, password_ref,
registry) registry)
kopf.append_owner_reference(secret)
api.create_namespaced_secret( api.create_namespaced_secret(
secret_namespace, secret secret_namespace, secret
) )
@ -147,6 +149,9 @@ def update_managed_registry_secret(
username_ref, username_ref,
password_ref, password_ref,
registry) registry)
kopf.append_owner_reference(secret)
try: try:
api.replace_namespaced_secret( api.replace_namespaced_secret(
name=secret_name, name=secret_name,

View File

@ -62,6 +62,8 @@ def create_managed_secret(spec, name, namespace, logger, body, **kwargs):
name=secret_name, annotations=annotations, labels=labels) name=secret_name, annotations=annotations, labels=labels)
secret = create_kv(secret, secret_json_object, content_def) secret = create_kv(secret, secret_json_object, content_def)
kopf.append_owner_reference(secret)
api.create_namespaced_secret( api.create_namespaced_secret(
namespace="{}".format(secret_namespace), namespace="{}".format(secret_namespace),
body=secret body=secret
@ -128,6 +130,8 @@ def update_managed_secret(
name=secret_name, annotations=annotations, labels=labels) name=secret_name, annotations=annotations, labels=labels)
secret = create_kv(secret, secret_json_object, content_def) secret = create_kv(secret, secret_json_object, content_def)
kopf.append_owner_reference(secret)
try: try:
api.replace_namespaced_secret( api.replace_namespaced_secret(
name=secret_name, name=secret_name,

View File

@ -52,6 +52,8 @@ def create_managed_secret(spec, name, namespace, logger, body, **kwargs):
name=secret_name, annotations=annotations, labels=labels) name=secret_name, annotations=annotations, labels=labels)
secret = create_template_secret(logger, secret, filename, template) secret = create_template_secret(logger, secret, filename, template)
kopf.append_owner_reference(secret)
api.create_namespaced_secret( api.create_namespaced_secret(
secret_namespace, secret secret_namespace, secret
) )
@ -118,6 +120,8 @@ def update_managed_secret(
name=secret_name, annotations=annotations, labels=labels) name=secret_name, annotations=annotations, labels=labels)
secret = create_template_secret(logger, secret, filename, template) secret = create_template_secret(logger, secret, filename, template)
kopf.append_owner_reference(secret)
try: try:
api.replace_namespaced_secret( api.replace_namespaced_secret(
name=secret_name, name=secret_name,