Skip to content

Commit

Permalink
Add prometheus integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Scherrer committed Nov 22, 2023
1 parent 85b96f3 commit a32c23a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@
local kap = import 'lib/kapitan.libjsonnet';
local kube = import 'lib/kube.libjsonnet';
local inv = kap.inventory();
local prom = import 'lib/prometheus.libsonnet';
// The hiera parameters for the component
local params = inv.parameters.cluster_autoscaler;

// Define outputs below
local namespace = kube.Namespace(params.namespace) {
metadata+: {
labels+: {
'openshift.io/cluster-monitoring': 'true',
},
},
};

{
'00_namespace': kube.Namespace(params.namespace),
'00_namespace':
if std.member(inv.applications, 'prometheus') then
prom.RegisterNamespace(namespace)
else
namespace,
}

0 comments on commit a32c23a

Please sign in to comment.