ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
40
vendor/workloads/grafana/credential-rotation/policy.yaml
vendored
Normal file
40
vendor/workloads/grafana/credential-rotation/policy.yaml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: grafana-credential-rotation
|
||||
spec:
|
||||
mutateExistingOnPolicyUpdate: false
|
||||
rules:
|
||||
- name: patch-grafana-cr-revision
|
||||
match:
|
||||
any:
|
||||
- resources:
|
||||
kinds:
|
||||
- Secret
|
||||
names:
|
||||
- grafana-db
|
||||
- grafana-oidc-zitadel
|
||||
namespaces:
|
||||
- grafana
|
||||
operations:
|
||||
- UPDATE
|
||||
preconditions:
|
||||
all:
|
||||
- key: "{{ request.object.data }}"
|
||||
operator: NotEquals
|
||||
value: "{{ request.oldObject.data }}"
|
||||
mutate:
|
||||
targets:
|
||||
- apiVersion: grafana.integreatly.org/v1beta1
|
||||
kind: Grafana
|
||||
name: grafana
|
||||
namespace: grafana
|
||||
patchStrategicMerge:
|
||||
spec:
|
||||
deployment:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
# Admission UPDATE objects still carry the pre-commit resourceVersion.
|
||||
credentials.quorate.internal/revision: "{{ request.uid }}"
|
||||
Loading…
Reference in a new issue