rule
This commit is contained in:
@@ -85,6 +85,7 @@ spec:
|
|||||||
- name: auth-tokens
|
- name: auth-tokens
|
||||||
secret:
|
secret:
|
||||||
secretName: auth-tokens
|
secretName: auth-tokens
|
||||||
|
optional: true
|
||||||
- name: generate-auth-tokens-secret
|
- name: generate-auth-tokens-secret
|
||||||
skipBackgroundRequests: true
|
skipBackgroundRequests: true
|
||||||
match:
|
match:
|
||||||
@@ -103,21 +104,12 @@ spec:
|
|||||||
- argocd
|
- argocd
|
||||||
- cert-manager
|
- cert-manager
|
||||||
- monitoring
|
- monitoring
|
||||||
context:
|
|
||||||
- name: secretCount
|
|
||||||
apiCall:
|
|
||||||
method: GET
|
|
||||||
urlPath: /api/v1/namespaces/{{request.namespace}}/secrets
|
|
||||||
jmesPath: "items[?metadata.name == 'auth-tokens'] | length(@)"
|
|
||||||
preconditions:
|
preconditions:
|
||||||
all:
|
all:
|
||||||
- key: "{{ request.operation }}"
|
- key: "{{ request.operation }}"
|
||||||
operator: In
|
operator: In
|
||||||
value:
|
value:
|
||||||
- CREATE
|
- CREATE
|
||||||
- key: "{{ secretCount }}"
|
|
||||||
operator: Equals
|
|
||||||
value: 0
|
|
||||||
generate:
|
generate:
|
||||||
synchronize: false
|
synchronize: false
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|||||||
Reference in New Issue
Block a user