mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
Allow Disable of Grafana Dashboards / External Target Configuration (#81)
* Allow Disable of Grafana Dashboards * Allow External Configuration * Update Chart.lock * Satisfy CT Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
parent
0a88bc37c8
commit
e0848fb53f
10 changed files with 35 additions and 9 deletions
|
@ -1,12 +1,12 @@
|
|||
dependencies:
|
||||
- name: monitoring
|
||||
repository: ""
|
||||
version: 1.4.4
|
||||
version: 1.5.0
|
||||
- name: ui
|
||||
repository: ""
|
||||
version: 1.10.0
|
||||
- name: kyvernoPlugin
|
||||
repository: ""
|
||||
version: 0.7.0
|
||||
digest: sha256:93996a41bb416445ba7e5c8fe29650a811671b9970bd0366aa09c860cfedc91c
|
||||
generated: "2021-09-27T09:56:18.1815481+02:00"
|
||||
digest: sha256:9c81be2f483771e0192cc4309d58ee754502f51df7f1cd55bc50d207370dbc98
|
||||
generated: "2021-10-13T14:25:35.257173006+02:00"
|
||||
|
|
|
@ -5,14 +5,14 @@ description: |
|
|||
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
|
||||
|
||||
type: application
|
||||
version: 1.11.0
|
||||
version: 1.12.0
|
||||
appVersion: 1.9.0
|
||||
|
||||
dependencies:
|
||||
- name: monitoring
|
||||
condition: monitoring.enabled
|
||||
repository: ""
|
||||
version: "1.4.4"
|
||||
version: "1.5.0"
|
||||
- name: ui
|
||||
condition: ui.enabled
|
||||
repository: ""
|
||||
|
|
|
@ -3,5 +3,5 @@ name: monitoring
|
|||
description: Policy Reporter Monitoring with predefined ServiceMonitor and Grafana Dashboards
|
||||
|
||||
type: application
|
||||
version: 1.4.4
|
||||
version: 1.5.0
|
||||
appVersion: 0.0.0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- if $.Values.grafana.dashboards.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
@ -809,4 +810,5 @@ data:
|
|||
"title": "ClusterPolicyReport Details",
|
||||
"uid": "iyJszGUMk",
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
{{- end }}
|
|
@ -1,3 +1,4 @@
|
|||
{{- if $.Values.grafana.dashboards.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
@ -478,3 +479,4 @@ data:
|
|||
"title": "PolicyReports",
|
||||
"version": 1
|
||||
}
|
||||
{{- end }}
|
|
@ -1,3 +1,4 @@
|
|||
{{- if $.Values.grafana.dashboards.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
@ -830,3 +831,4 @@ data:
|
|||
"uid": "Tf1skG8Mz",
|
||||
"version": 1
|
||||
}
|
||||
{{- end }}
|
|
@ -14,6 +14,8 @@ grafana:
|
|||
# namespace for configMap of grafana dashboards
|
||||
namespace:
|
||||
dashboards:
|
||||
# Enable the deployment of grafana dashboards
|
||||
enabled: true
|
||||
# Label to find dashboards using the k8s sidecar
|
||||
label: grafana_dashboard
|
||||
folder:
|
||||
|
|
|
@ -66,15 +66,23 @@ spec:
|
|||
volumeMounts:
|
||||
- name: config-file
|
||||
mountPath: /app/config.yaml
|
||||
{{- if and .Values.existingTargetConfig.enabled .Values.existingTargetConfig.subPath }}
|
||||
subPath: {{ .Values.existingTargetConfig.subPath }}
|
||||
{{- else }}
|
||||
subPath: config.yaml
|
||||
{{- end }}
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
value: {{ .Release.Namespace }}
|
||||
volumes:
|
||||
- name: config-file
|
||||
secret:
|
||||
{{- if and .Values.existingTargetConfig.enabled .Values.existingTargetConfig.name }}
|
||||
secretName: {{ .Values.existingTargetConfig.name }}
|
||||
{{- else }}
|
||||
secretName: {{ include "policyreporter.fullname" . }}-targets
|
||||
optional: true
|
||||
{{- end }}
|
||||
optional: true
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- if not .Values.existingTargetConfig.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
@ -6,4 +7,5 @@ metadata:
|
|||
{{- include "policyreporter.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
config.yaml: {{ tpl (.Files.Get "config.yaml") . | b64enc }}
|
||||
config.yaml: {{ tpl (.Files.Get "config.yaml") . | b64enc }}
|
||||
{{- end }}
|
|
@ -128,6 +128,14 @@ policyPriorities:
|
|||
# require-ns-labels: error
|
||||
mapping: {}
|
||||
|
||||
# Reference a configuration which already exists instead of creating one
|
||||
existingTargetConfig:
|
||||
enabled: false
|
||||
# Name of the secret with the config
|
||||
name: ""
|
||||
# subPath within the secret (defaults to config.yaml)
|
||||
subPath: ""
|
||||
|
||||
# Supported targets for new PolicyReport Results
|
||||
target:
|
||||
loki:
|
||||
|
|
Loading…
Reference in a new issue