From d4b8fff27640a1aa56bdc61b649f6d3a4f027d8b Mon Sep 17 00:00:00 2001 From: Blizter <blizter47@gmail.com> Date: Sun, 24 Oct 2021 09:34:01 -0400 Subject: [PATCH] import main.libsonnet to allow exmaple generation --- examples/ingress-one-to-many.jsonnet | 72 ++++++++++++++-------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/examples/ingress-one-to-many.jsonnet b/examples/ingress-one-to-many.jsonnet index 96b28d41..ee56090f 100644 --- a/examples/ingress-one-to-many.jsonnet +++ b/examples/ingress-one-to-many.jsonnet @@ -14,7 +14,7 @@ local ingress(name, namespace, rules) = { }; local kp = - (import 'kube-prometheus/kube-prometheus.libsonnet') + + (import 'kube-prometheus/main.libsonnet') + { _config+:: { namespace: 'monitoring', @@ -48,47 +48,49 @@ local kp = 'kube-prometheus': ingress( 'kube-prometheus', $._config.namespace, - [{ - host: 'alertmanager.example.com', - http: { - paths: [{ - backend: { - service: { - name: 'alertmanager-main', - port: 'web', + [ + { + host: 'alertmanager.example.com', + http: { + paths: [{ + backend: { + service: { + name: 'alertmanager-main', + port: 'web', + }, }, - }, - }], + }], + }, }, - }, - { - host: 'grafana.example.com', - http: { - paths: [{ - backend: { - service: { - name: 'grafana', - port: 'http', + { + host: 'grafana.example.com', + http: { + paths: [{ + backend: { + service: { + name: 'grafana', + port: 'http', + }, }, - }, - }], + }], + }, }, - }, - { - host: 'alertmanager.example.com', - http: { - paths: [{ - backend: { - service: { - name: 'prometheus-k8s', - port: 'web', + { + host: 'alertmanager.example.com', + http: { + paths: [{ + backend: { + service: { + name: 'prometheus-k8s', + port: 'web', + }, }, - }, - }], + }], + }, }, - },] + ] ), - + }, } + { // Create basic auth secret - replace 'auth' file with your own -- GitLab