From 58b990db2aa13a201fea2d1e074aba492ad1783e Mon Sep 17 00:00:00 2001 From: Nico Angelo Date: Mon, 16 Oct 2023 13:28:12 +0200 Subject: [PATCH] bump version --- README.md | 16 ++++++++++++---- charts/bitwarden-crd-operator/Chart.yaml | 14 +++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2a1a2bf..192b44d 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ type: dockerconfigjson ## BitwardenTemplate -One of the more freely defined types that can be used with this operator you can just pass a whole template: +One of the more freely defined types that can be used with this operator you can just pass a whole template. Also the lookup function `bitwarden_lookup` is available to reference parts of the secret: ```yaml --- @@ -145,11 +145,11 @@ spec: --- api: enabled: True - key: {{ bitwarden_lookup("A Secret ID from bitwarden", "login or fields", "name of a field in bitwarden") }} + key: {{ bitwarden_lookup("A Secret ID from bitwarden", "login or fields or attachment", "name of a field in bitwarden") }} allowCrossOrigin: false apps: "some.app.identifier:some_version": - pubkey: {{ bitwarden_lookup("A Secret ID from bitwarden", "login or fields", "name of a field in bitwarden") }} + pubkey: {{ bitwarden_lookup("A Secret ID from bitwarden", "login or fields or attachment", "name of a field in bitwarden") }} enabled: true ``` @@ -169,7 +169,15 @@ metadata: type: Opaque ``` -please note that the rendering engine for this template is jinja2, with an addition of a custom `bitwarden_lookup` function, so there are more possibilities to inject here. +The signature of `bitwarden_lookup` is `(item_id, scope, field)`: +- `item_id`: The item ID of the secret in Bitwarden +- `scope`: one of `login`, `fields` or `attachment` +- `field`: + - when `scope` is `login`: either `username` or `password` + - when `scope` is `fields`: the name of a custom field + - when `scope` is `attachment`: the filename of a file attached to the item + +Please note that the rendering engine for this template is jinja2, with an addition of a custom `bitwarden_lookup` function, so there are more possibilities to inject here. ## Configurations parameters diff --git a/charts/bitwarden-crd-operator/Chart.yaml b/charts/bitwarden-crd-operator/Chart.yaml index 5dd508f..f779973 100644 --- a/charts/bitwarden-crd-operator/Chart.yaml +++ b/charts/bitwarden-crd-operator/Chart.yaml @@ -4,9 +4,9 @@ description: Deploy the Bitwarden CRD Operator type: application -version: "v0.9.0" +version: "v0.10.0" -appVersion: "0.8.0" +appVersion: "0.9.0" keywords: - operator @@ -89,18 +89,14 @@ annotations: allowCrossOrigin: false apps: "some.app.identifier:some_version": - pubkey: {{ bitwarden_lookup("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "fields", "public_key") }} + pubkey: {{ bitwarden_lookup("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "attachment", "public_key") }} enabled: true artifacthub.io/license: MIT artifacthub.io/operator: "true" artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - kind: changed - description: "Unified scheduled none crd related operations (bw sync and login)" - kind: added - description: "Added relogin interval which can be finetuned with env `BW_RELOGIN_INTERVAL`. defaults to 3600 seconds" - - kind: chanced - description: "Updated python to 3.11.6-r0" + description: "Added attachment lookup to bitwarden_lookup in BitwardenTemplate CRD" artifacthub.io/images: | - name: bitwarden-crd-operator - image: ghcr.io/lerentis/bitwarden-crd-operator:0.8.0 + image: ghcr.io/lerentis/bitwarden-crd-operator:0.9.0