Skip to content

Commit

Permalink
Allow user workload monitoring configuration configmap to be created in
Browse files Browse the repository at this point in the history
openshift-user-workload-monitoring namespace
  • Loading branch information
lilic committed Jun 16, 2020
1 parent 81e3ed6 commit 7b4146d
Show file tree
Hide file tree
Showing 17 changed files with 653 additions and 298 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
- [#714](https://github.com/openshift/cluster-monitoring-operator/pull/714) Validate new/updated PrometheusRule custom resources against the prometheus-operator rule validation API.
- [#799](https://github.com/openshift/cluster-monitoring-operator/pull/799) Rules federation support.
- [#800](https://github.com/openshift/cluster-monitoring-operator/pull/800) Collect metrics and implement alerting rules for Thanos querier.
- [#804](https://github.com/openshift/cluster-monitoring-operator/pull/804) Allow user workload monitoring configuration ConfigMap to be created in openshift-user-workload-monitoring namespace.
3 changes: 2 additions & 1 deletion cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ func Main() int {
return 1
}

o, err := cmo.New(config, *releaseVersion, *namespace, *namespaceUserWorkload, *namespaceSelector, *configMapName, *remoteWrite, images.asMap(), telemetryConfig.Matches)
userWorkloadConfigMapName := "user-workload-monitoring-config"
o, err := cmo.New(config, *releaseVersion, *namespace, *namespaceUserWorkload, *namespaceSelector, *configMapName, userWorkloadConfigMapName, *remoteWrite, images.asMap(), telemetryConfig.Matches)
if err != nil {
fmt.Fprint(os.Stderr, err)
return 1
Expand Down
5 changes: 5 additions & 0 deletions examples/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ prometheusK8s:
cpu: 200m
memory: 2Gi
alertmanagerMain:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 15Gi
baseImage: quay.io/prometheus/alertmanager
externalUrl: https://monitoring-demo.staging.core-os.net/alertmanager
resources:
Expand Down
23 changes: 23 additions & 0 deletions examples/user-workload/1q
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: user-workload-monitoring-config
namespace: openshift-user-workload-monitoring
data:
config.yaml: |
prometheusOperator:
resources:
requests:
cpu: 200m
memory: 2Gi
prometheus:
retention: 24h
resources:
requests:
cpu: 200m
memory: 2Gi
thanos:
resources:
requests:
cpu: 20m
memory: 50Mi
23 changes: 23 additions & 0 deletions examples/user-workload/cluster-monitoring-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: user-workload-monitoring-config
namespace: openshift-user-workload-monitoring
data:
config.yaml: |
prometheusOperator:
resources:
requests:
cpu: 200m
memory: 2Gi
prometheus:
retention: 24h
resources:
requests:
cpu: 200m
memory: 2Gi
thanosRuler:
resources:
requests:
cpu: 20m
memory: 50Mi

0 comments on commit 7b4146d

Please sign in to comment.