From 724f0034ca325bab1efd935cc2087db4699f4a6b Mon Sep 17 00:00:00 2001 From: paulfantom <pawel@krupa.net.pl> Date: Fri, 12 Nov 2021 14:23:42 +0100 Subject: [PATCH] examples,manifests: provide only NS and CRDs in setup directory --- examples/kustomize.jsonnet | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/kustomize.jsonnet b/examples/kustomize.jsonnet index 455b38bd..238f57f1 100644 --- a/examples/kustomize.jsonnet +++ b/examples/kustomize.jsonnet @@ -8,17 +8,14 @@ local kp = }; local manifests = - // Uncomment line below to enable vertical auto scaling of kube-state-metrics - //{ ['ksm-autoscaler-' + name]: kp.ksmAutoscaler[name] for name in std.objectFields(kp.ksmAutoscaler) } + - { 'setup/0namespace-namespace': kp.kubePrometheus.namespace } + - { - ['setup/prometheus-operator-' + name]: kp.prometheusOperator[name] - for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator)) + { 'setup/namespace': kp.kubePrometheus.namespace } + + { ['setup/' + name]: kp.prometheusOperator[name] + for name in std.filter(function(name) kp.prometheusOperator[name]['kind'] == 'CustomResourceDefinition', std.objectFields(kp.prometheusOperator)) } + - // serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready - { 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } + - { 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } + { 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } + + { ['prometheus-operator-' + name]: kp.prometheusOperator[name] + for name in std.filter(function(name) kp.prometheusOperator[name]['kind'] != 'CustomResourceDefinition', std.objectFields(kp.prometheusOperator)) + } + { ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } + { ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } + { ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } + -- GitLab