Fix for the unused namespaces in case of disabling additional addons

This commit is contained in:
CarlosEDP 2019-03-25 18:01:00 -03:00
parent 031fd7e157
commit 4ee0c86a03
5 changed files with 14 additions and 5 deletions

View File

@ -13,7 +13,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
prometheus+:: {
names: 'k8s',
replicas: 1,
namespaces: ['default', 'kube-system', 'monitoring', 'logging', 'metallb-system'],
namespaces: ['default', 'kube-system', 'monitoring'],
},
alertmanager+:: {

View File

@ -13,6 +13,10 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
elasticExporter: 'justwatch/elasticsearch_exporter',
},
prometheus+:: {
namespaces+:: ['logging'],
},
// Add custom dashboards
grafanaDashboards+:: {
'elasticsearch-dashboard.json': (import 'grafana-dashboards/elasticsearch-dashboard.json'),

View File

@ -43,7 +43,7 @@ items:
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: logging
namespace: metallb-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@ -56,7 +56,7 @@ items:
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: metallb-system
namespace: logging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role

View File

@ -52,7 +52,7 @@ items:
kind: Role
metadata:
name: prometheus-k8s
namespace: logging
namespace: metallb-system
rules:
- apiGroups:
- ""
@ -68,7 +68,7 @@ items:
kind: Role
metadata:
name: prometheus-k8s
namespace: metallb-system
namespace: logging
rules:
- apiGroups:
- ""

View File

@ -3,6 +3,11 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
{
_config+:: {
namespace: 'monitoring',
prometheus+:: {
namespaces+:: ['metallb-system'],
},
},
metallb+:: {