diff --git a/jsonnet/kube-prometheus/components/grafana.libsonnet b/jsonnet/kube-prometheus/components/grafana.libsonnet index ce6cb40e4837a72cda88322114745efd143add3f..cf2c7ea2f82b131e558cfc08d16c577996130960 100644 --- a/jsonnet/kube-prometheus/components/grafana.libsonnet +++ b/jsonnet/kube-prometheus/components/grafana.libsonnet @@ -68,8 +68,7 @@ function(params) { }, }, - // Add object only if user passes config and config is not empty - [if std.objectHas(params, 'config') && std.length(params.config) > 0 then 'config']: glib.grafana.config, + config: glib.grafana.config, service: glib.grafana.service, serviceAccount: glib.grafana.serviceAccount, deployment: glib.grafana.deployment, diff --git a/kustomization.yaml b/kustomization.yaml index 2f5b872e1ff49892e3d74bdf0cc95b63c4ad7369..ffea5b17a1288716776944f7203c7a5e01ad20e5 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -15,6 +15,7 @@ resources: - ./manifests/blackbox-exporter-service.yaml - ./manifests/blackbox-exporter-serviceAccount.yaml - ./manifests/blackbox-exporter-serviceMonitor.yaml +- ./manifests/grafana-config.yaml - ./manifests/grafana-dashboardDatasources.yaml - ./manifests/grafana-dashboardDefinitions.yaml - ./manifests/grafana-dashboardSources.yaml diff --git a/manifests/grafana-config.yaml b/manifests/grafana-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..eeece25e07b063e951f3b2a5ed692415cd56db11 --- /dev/null +++ b/manifests/grafana-config.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Secret +metadata: + labels: + app.kubernetes.io/component: grafana + app.kubernetes.io/name: grafana + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 8.1.3 + name: grafana-config + namespace: monitoring +stringData: + grafana.ini: | + [date_formats] + default_timezone = UTC +type: Opaque