Skip to content

Commit

Permalink
Revert "Change monitoring labels for Prometheus"
Browse files Browse the repository at this point in the history
This reverts commit 519bfa0.
  • Loading branch information
Gabriel Mainberger committed Jun 2, 2023
1 parent 519bfa0 commit 2395c1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
22 changes: 6 additions & 16 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,16 @@ local k8up = import 'lib/backup-k8up.libjsonnet';
local com = import 'lib/commodore.libjsonnet';
local kap = import 'lib/kapitan.libjsonnet';
local kube = import 'lib/kube.libjsonnet';
local prometheus = import 'lib/prometheus.libjsonnet';
local inv = kap.inventory();
// The hiera parameters for the component
local params = inv.parameters.keycloak;

local namespace = (
if params.monitoring.enabled && std.member(inv.applications, 'prometheus') then
prometheus.RegisterNamespace(kube.Namespace(params.namespace))
else if params.monitoring.enabled && inv.parameters.facts.distribution == 'openshift4' then
kube.Namespace(params.namespace) {
metadata+: {
labels+: { 'openshift.io/cluster-monitoring': 'true' },
},
}
else
kube.Namespace(params.namespace)
) {
metadata+: {
labels+: com.makeMergeable(params.namespaceLabels),
},
local namespace = kube.Namespace(params.namespace) {
metadata+: {
labels+: {
SYNMonitoring: 'main',
} + com.makeMergeable(params.namespaceLabels),
},
};

local networkpolicy_infinispan_labels = {
Expand Down
1 change: 1 addition & 0 deletions tests/golden/builtin/builtin/builtin/00_namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Namespace
metadata:
annotations: {}
labels:
SYNMonitoring: main
name: syn-builtin
test: testing
name: syn-builtin

0 comments on commit 2395c1a

Please sign in to comment.