Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
ed5a2f94
Commit
ed5a2f94
authored
4 years ago
by
Damien Grisonnet
Browse files
Options
Downloads
Patches
Plain Diff
jsonnet: fix test failures with platformPatch
Signed-off-by:
Damien Grisonnet
<
dgrisonn@redhat.com
>
parent
b59b2c23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jsonnet/kube-prometheus/main.libsonnet
+3
-3
3 additions, 3 deletions
jsonnet/kube-prometheus/main.libsonnet
jsonnet/kube-prometheus/platforms/platforms.libsonnet
+28
-3
28 additions, 3 deletions
jsonnet/kube-prometheus/platforms/platforms.libsonnet
with
31 additions
and
6 deletions
jsonnet/kube-prometheus/main.libsonnet
+
3
−
3
View file @
ed5a2f94
...
@@ -9,7 +9,7 @@ local prometheusAdapter = import './components/prometheus-adapter.libsonnet';
...
@@ -9,7 +9,7 @@ local prometheusAdapter = import './components/prometheus-adapter.libsonnet';
local
prometheusOperator
=
import
'./components/prometheus-operator.libsonnet'
;
local
prometheusOperator
=
import
'./components/prometheus-operator.libsonnet'
;
local
prometheus
=
import
'./components/prometheus.libsonnet'
;
local
prometheus
=
import
'./components/prometheus.libsonnet'
;
local
platformPatch
=
(
import
'./platforms/platforms.libsonnet'
).
platformPatch
;
local
platformPatch
=
import
'./platforms/platforms.libsonnet'
;
{
{
// using `values` as this is similar to helm
// using `values` as this is similar to helm
...
@@ -127,5 +127,5 @@ local platformPatch = (import './platforms/platforms.libsonnet').platformPatch;
...
@@ -127,5 +127,5 @@ local platformPatch = (import './platforms/platforms.libsonnet').platformPatch;
name
:
$
.
values
.
kubePrometheus
.
namespace
,
name
:
$
.
values
.
kubePrometheus
.
namespace
,
},
},
},
},
}
+
platformPatch
(
$
.
values
.
kubePrometheus
.
platform
)
,
},
}
}
+
platformPatch
This diff is collapsed.
Click to expand it.
jsonnet/kube-prometheus/platforms/platforms.libsonnet
+
28
−
3
View file @
ed5a2f94
...
@@ -9,8 +9,33 @@ local platforms = {
...
@@ -9,8 +9,33 @@ local platforms = {
kubespray
:
import
'./kubespray.libsonnet'
,
kubespray
:
import
'./kubespray.libsonnet'
,
};
};
// platformPatch returns the platform specific patch associated to the given
// platform.
local
platformPatch
(
p
)
=
if
p
!
=
null
&&
std
.
objectHas
(
platforms
,
p
)
then
platforms
[
p
]
else
{};
{
{
// platformPatch returns the platform specific patch associated to the given
// initialize the object to prevent "Indexed object has no field" lint errors
// platform.
local
p
=
{
platformPatch
(
p
):
if
p
!
=
null
&&
std
.
objectHas
(
platforms
,
p
)
then
platforms
[
p
]
else
{},
alertmanager
:
{},
blackboxExporter
:
{},
grafana
:
{},
kubeStateMetrics
:
{},
nodeExporter
:
{},
prometheus
:
{},
prometheusAdapter
:
{},
prometheusOperator
:
{},
kubernetesControlPlane
:
{},
kubePrometheus
:
{},
}
+
platformPatch
(
$
.
values
.
kubePrometheus
.
platform
),
alertmanager
+:
p
.
alertmanager
,
blackboxExporter
+:
p
.
blackboxExporter
,
grafana
+:
p
.
grafana
,
kubeStateMetrics
+:
p
.
kubeStateMetrics
,
nodeExporter
+:
p
.
nodeExporter
,
prometheus
+:
p
.
prometheus
,
prometheusAdapter
+:
p
.
prometheusAdapter
,
prometheusOperator
+:
p
.
prometheusOperator
,
kubernetesControlPlane
+:
p
.
kubernetesControlPlane
,
kubePrometheus
+:
p
.
kubePrometheus
,
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment