From edbbb52bc6d2489d47f5eed67187a51b6ef52e78 Mon Sep 17 00:00:00 2001 From: Danijel Simeunovic Date: Fri, 13 Mar 2026 12:33:14 +0100 Subject: [PATCH] rule --- cluster-resources/policies/auth-sidecar-injector.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cluster-resources/policies/auth-sidecar-injector.yaml b/cluster-resources/policies/auth-sidecar-injector.yaml index 7c5faa7..500ae48 100644 --- a/cluster-resources/policies/auth-sidecar-injector.yaml +++ b/cluster-resources/policies/auth-sidecar-injector.yaml @@ -85,6 +85,7 @@ spec: - name: auth-tokens secret: secretName: auth-tokens + optional: true - name: generate-auth-tokens-secret skipBackgroundRequests: true match: @@ -103,21 +104,12 @@ spec: - argocd - cert-manager - monitoring - context: - - name: secretCount - apiCall: - method: GET - urlPath: /api/v1/namespaces/{{request.namespace}}/secrets - jmesPath: "items[?metadata.name == 'auth-tokens'] | length(@)" preconditions: all: - key: "{{ request.operation }}" operator: In value: - CREATE - - key: "{{ secretCount }}" - operator: Equals - value: 0 generate: synchronize: false apiVersion: v1