feat: add time and force sync envs to trigger a sync before getting the secrets

This commit is contained in:
Matthias Ludwig
2023-09-25 11:13:44 +02:00
parent 63e6f8ab7b
commit f0a9258b71
6 changed files with 72 additions and 12 deletions

View File

@ -3,7 +3,7 @@ import base64
import kubernetes
import json
from utils.utils import unlock_bw
from utils.utils import unlock_bw, bw_sync_interval
from lookups.bitwarden_lookup import bitwarden_lookup
from jinja2 import Environment, BaseLoader
@ -58,7 +58,7 @@ def create_managed_secret(spec, name, namespace, logger, body, **kwargs):
@kopf.on.update('bitwarden-template.lerentis.uploadfilter24.eu')
@kopf.timer('bitwarden-template.lerentis.uploadfilter24.eu', interval=900)
@kopf.timer('bitwarden-template.lerentis.uploadfilter24.eu', interval=bw_sync_interval)
def update_managed_secret(
spec,
status,