updates and dedicated probe handler function

This commit is contained in:
Tobias Trabelsi 2024-08-04 22:20:42 +02:00
parent 0c0243c407
commit ffbf466416
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
3 changed files with 13 additions and 6 deletions

View File

@ -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.source=https://github.com/Lerentis/bitwarden-crd-operator
LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden" LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden"

View File

@ -4,9 +4,9 @@ description: Deploy the Bitwarden CRD Operator
type: application type: application
version: "v0.13.1" version: "v0.14.0"
appVersion: "0.12.1" appVersion: "0.13.0"
keywords: keywords:
- operator - operator
@ -109,8 +109,10 @@ annotations:
artifacthub.io/operator: "true" artifacthub.io/operator: "true"
artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: fixed - kind: changed
description: "Recreation of secrets where secretType is not defined." description: "Dedicated probe handler to reduce logging noise"
- kind: changed
description: "Update Alpine to 3.20.2"
artifacthub.io/images: | artifacthub.io/images: |
- name: bitwarden-crd-operator - name: bitwarden-crd-operator
image: ghcr.io/lerentis/bitwarden-crd-operator:0.12.1 image: ghcr.io/lerentis/bitwarden-crd-operator:0.13.0

View File

@ -4,6 +4,7 @@ import kopf
import schedule import schedule
import time import time
import threading import threading
import datetime
from utils.utils import command_wrapper, unlock_bw, sync_bw from utils.utils import command_wrapper, unlock_bw, sync_bw
@ -20,6 +21,10 @@ def bitwarden_signin(logger, **kwargs):
command_wrapper(logger, "login --apikey") command_wrapper(logger, "login --apikey")
unlock_bw(logger) 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): def run_continuously(interval=30):
cease_continuous_run = threading.Event() cease_continuous_run = threading.Event()