From ffbf466416743c36b77704c79c0b3dabfff90f5b Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Sun, 4 Aug 2024 22:20:42 +0200 Subject: [PATCH 1/2] updates and dedicated probe handler function --- Dockerfile | 2 +- charts/bitwarden-crd-operator/Chart.yaml | 12 +++++++----- src/bitwardenCrdOperator.py | 5 +++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac6936c..41c5e3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.19.1 +FROM alpine:3.20.2 LABEL org.opencontainers.image.source=https://github.com/Lerentis/bitwarden-crd-operator LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden" diff --git a/charts/bitwarden-crd-operator/Chart.yaml b/charts/bitwarden-crd-operator/Chart.yaml index c408854..6bdefc9 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.13.1" +version: "v0.14.0" -appVersion: "0.12.1" +appVersion: "0.13.0" keywords: - operator @@ -109,8 +109,10 @@ annotations: artifacthub.io/operator: "true" artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - kind: fixed - description: "Recreation of secrets where secretType is not defined." + - kind: changed + description: "Dedicated probe handler to reduce logging noise" + - kind: changed + description: "Update Alpine to 3.20.2" artifacthub.io/images: | - name: bitwarden-crd-operator - image: ghcr.io/lerentis/bitwarden-crd-operator:0.12.1 + image: ghcr.io/lerentis/bitwarden-crd-operator:0.13.0 diff --git a/src/bitwardenCrdOperator.py b/src/bitwardenCrdOperator.py index 4a73efb..03ef2a1 100755 --- a/src/bitwardenCrdOperator.py +++ b/src/bitwardenCrdOperator.py @@ -4,6 +4,7 @@ import kopf import schedule import time import threading +import datetime from utils.utils import command_wrapper, unlock_bw, sync_bw @@ -20,6 +21,10 @@ def bitwarden_signin(logger, **kwargs): command_wrapper(logger, "login --apikey") unlock_bw(logger) +@kopf.on.probe(id='now') +def get_current_timestamp(**kwargs): + return datetime.datetime.now(datetime.timezone.utc).isoformat() + def run_continuously(interval=30): cease_continuous_run = threading.Event() From 096bf6b5f6d7d8a9755588cae9ffb19e734a676a Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Sun, 4 Aug 2024 23:40:53 +0200 Subject: [PATCH 2/2] remove probe function again but update dependencies --- Dockerfile | 10 +++++----- charts/bitwarden-crd-operator/Chart.yaml | 12 ++++++++++-- src/bitwardenCrdOperator.py | 5 ----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41c5e3b..d9c1569 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,12 @@ LABEL org.opencontainers.image.source=https://github.com/Lerentis/bitwarden-crd- LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden" LABEL org.opencontainers.image.licenses=MIT -ARG PYTHON_VERSION=3.11.9-r0 -ARG PIP_VERSION=23.3.1-r0 +ARG PYTHON_VERSION=3.12.3-r1 +ARG PIP_VERSION=24.0-r2 ARG GCOMPAT_VERSION=1.1.0-r4 -ARG LIBCRYPTO_VERSION=3.1.4-r5 -ARG BW_VERSION=2023.7.0 -ARG NODE_VERSION=20.12.1-r0 +ARG LIBCRYPTO_VERSION=3.3.1-r3 +ARG BW_VERSION=2024.7.2 +ARG NODE_VERSION=20.15.1-r0 COPY requirements.txt /requirements.txt diff --git a/charts/bitwarden-crd-operator/Chart.yaml b/charts/bitwarden-crd-operator/Chart.yaml index 6bdefc9..5038e01 100644 --- a/charts/bitwarden-crd-operator/Chart.yaml +++ b/charts/bitwarden-crd-operator/Chart.yaml @@ -109,10 +109,18 @@ annotations: artifacthub.io/operator: "true" artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - kind: changed - description: "Dedicated probe handler to reduce logging noise" - kind: changed description: "Update Alpine to 3.20.2" + - kind: changed + description: "Update Python to 3.12.3-r1" + - kind: changed + description: "Update Pip to 24.0-r2" + - kind: changed + description: "Update NodeJS to 20.15.1-r0" + - kind: changed + description: "Update libcrypto3 to 3.3.1-r3" + - kind: changed + description: "Update BitwardenCLI to 2024.7.2" artifacthub.io/images: | - name: bitwarden-crd-operator image: ghcr.io/lerentis/bitwarden-crd-operator:0.13.0 diff --git a/src/bitwardenCrdOperator.py b/src/bitwardenCrdOperator.py index 03ef2a1..4a73efb 100755 --- a/src/bitwardenCrdOperator.py +++ b/src/bitwardenCrdOperator.py @@ -4,7 +4,6 @@ import kopf import schedule import time import threading -import datetime from utils.utils import command_wrapper, unlock_bw, sync_bw @@ -21,10 +20,6 @@ def bitwarden_signin(logger, **kwargs): command_wrapper(logger, "login --apikey") unlock_bw(logger) -@kopf.on.probe(id='now') -def get_current_timestamp(**kwargs): - return datetime.datetime.now(datetime.timezone.utc).isoformat() - def run_continuously(interval=30): cease_continuous_run = threading.Event()