Skip to content

Commit

Permalink
UM: CRD ServiceMonitor added
Browse files Browse the repository at this point in the history
  • Loading branch information
thr authored and thr committed Apr 24, 2024
1 parent 708a5d0 commit b3cb03c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 2 deletions.
2 changes: 1 addition & 1 deletion universalmessaging/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.3
version: 1.0.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions universalmessaging/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ helm install um webmethods/universalmessaging
| `1.0.1` | Update JMX Exporter configuration file from latest [UM Git repository](https://github.com/SoftwareAG/universalmessaging-prometheus-jmx-exporter-config). Bugfix: Mount configuration files into container. Nginx added. |
| `1.0.2` | Change startup, liveness and readiness probes. All configuration settings are in `values.yaml`. Now, The probes are using `httpGet` instead of `runUMTool.sh` utility. |
| `1.0.3` | Make license file handling same as MSR |
| `1.0.4` | CRD `ServiceMonitor` added |

{{ template "chart.valuesSection" . }}
45 changes: 45 additions & 0 deletions universalmessaging/helm/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# /*
# * Copyright (c) 2023 Software AG, Darmstadt, Germany and/or its licensors
# *
# * SPDX-License-Identifier: Apache-2.0
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# */
---
{{- if .Values.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
spec:
endpoints:
- honorLabels: true
interval: {{ .Values.prometheus.interval }}
path: {{ .Values.prometheus.path }}
targetPort: {{ .Values.prometheus.port }}
scheme: {{ .Values.prometheus.scheme }}
scrapeTimeout: {{ .Values.prometheus.scrapeTimeout }}
tlsConfig:
insecureSkipVerify: true
jobLabel: {{ .Release.Name }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
2 changes: 1 addition & 1 deletion universalmessaging/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "common.prometheus.annotations" (dict "port" .Values.service.metricPort) | nindent 8 }}
{{- include "common.prometheus.annotations" (dict "port" .Values.prometheus.port "scrape" .Values.prometheus.scrape "path" .Values.prometheus.path "scheme" .Values.prometheus.scheme) | nindent 8 }}
labels:
{{- include "common.labels.matchLabels" . | nindent 8 }}
{{- with .Values.extraLabels -}}
Expand Down
16 changes: 16 additions & 0 deletions universalmessaging/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,21 @@ readinessProbe:
# Nginx is configured by example from [Universal Messaging documentation](https://documentation.softwareag.com/universal_messaging/num10-15/webhelp/num-webhelp/#page/num-webhelp%2Fre-configure_nginx_to_serve_http_requests.html%23)
externalLoadBalancer: false

# -- Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor.
prometheus:
path: "/metrics"
port: "9200"
scheme: "http"
## -- Only used on annotation
scrape: "true"
## -- Only used on ServiceMonitor
interval: 10s
## -- Only used on ServiceMonitor
scrapeTimeout: 10s

# -- Create and enable ServiceMonitor. The default is `false`.
serviceMonitor:
enabled: false

# -- Import the content as license key and create a ConfigMap named by `licenseConfigMap` value. You can copy/past the content of your provided license key file here.
license: |

0 comments on commit b3cb03c

Please sign in to comment.