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+:: { prometheus+:: {
names: 'k8s', names: 'k8s',
replicas: 1, replicas: 1,
namespaces: ['default', 'kube-system', 'monitoring', 'logging', 'metallb-system'], namespaces: ['default', 'kube-system', 'monitoring'],
}, },
alertmanager+:: { alertmanager+:: {

View File

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

View File

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

View File

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

View File

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