Skip to content

Commit

Permalink
Merge pull request #71 from SoftwareAG/dev-msr-thr
Browse files Browse the repository at this point in the history
ServiceMonitor optional added
  • Loading branch information
thomas-2020 authored Apr 17, 2024
2 parents df913f2 + 034b8a3 commit b2403de
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 29 deletions.
2 changes: 1 addition & 1 deletion microservicesruntime/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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
3 changes: 3 additions & 0 deletions microservicesruntime/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ helm install wm-msr webmethods/microservicesruntime \
| `1.0.1` | Initial release |
| `1.0.2` | Added new option `microservicesruntime.licenseKeyProvided` to allow using images with trial or baked-in license key |
| `1.0.3` | Make Liveness and Readiness Probes as per current default. Both can now also be overwritten in a custom values file `values.yaml`. |
| `1.0.4` | Option in `values.yaml` to create a ServiceMonitor added. Some errors in Nginx external LB corrected |

## Values

Expand Down Expand Up @@ -187,6 +188,7 @@ helm install wm-msr webmethods/microservicesruntime \
| persistence.storageClassName | string | `""` | |
| podAnnotations | object | `{}` | pod annotations |
| podSecurityContext.fsGroup | int | `1724` | |
| prometheus | object | `{"interval":"10s","path":"/metrics","port":"5555","scheme":"http","scrape":"true","scrapeTimeout":"10s"}` | Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor. |
| readinessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/health/readiness","port":"http"},"initialDelaySeconds":0,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":30}` | Configure readiness probe |
| replicaCount | int | `1` | Number of replicates in Deployment |
| resources | object | `{}` | |
Expand All @@ -198,6 +200,7 @@ helm install wm-msr webmethods/microservicesruntime \
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `false` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor | object | `{"enabled":false}` | Create and enable ServiceMonitor. The default is `false`. |
| startupProbe | object | `{"failureThreshold":60,"periodSeconds":30,"tcpSocket":{"port":"http"}}` | startup probe for container |
| statefulSet | bool | `false` | StatefulSet or Deployment. You should only change this if you require Client Side queuing (CSQ) or functionality in IS which requires stable hostnames and filesystems. Default is false => Deployment. Keep in mind, you must disable CSQ on each webMethods messaging and JMS connection if you don't use stateful-sets. See examples in Process Engine deployment for disableing QSC. |
| tolerations | list | `[]` | |
Expand Down
1 change: 1 addition & 0 deletions microservicesruntime/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ helm install wm-msr webmethods/microservicesruntime \
| `1.0.1` | Initial release |
| `1.0.2` | Added new option `microservicesruntime.licenseKeyProvided` to allow using images with trial or baked-in license key |
| `1.0.3` | Make Liveness and Readiness Probes as per current default. Both can now also be overwritten in a custom values file `values.yaml`. |
| `1.0.4` | Option in `values.yaml` to create a ServiceMonitor added. Some errors in Nginx external LB corrected |

{{ template "chart.valuesSection" . }}
2 changes: 1 addition & 1 deletion microservicesruntime/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
{{- with .Values.podAnnotations }}
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- include "common.prometheus.annotations" (dict "port" .Values.service.port) | 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
17 changes: 3 additions & 14 deletions microservicesruntime/helm/templates/nginx-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,14 @@ data:
gzip on;
upstream msr-rt {
server {{ include "common.names.fullname" . }}:{{ int .Values.microservicesruntime.runtimePort }};
server {{ include "common.names.fullname" . }}:{{ int .Values.microservicesruntime.httpPort }};
}
upstream msr-admin {
server {{ include "common.names.fullname" . }}:{{ int .Values.microservicesruntime.adminPort }};
}
server {
listen {{ int .Values.microservicesruntime.runtimePort }};
listen {{ int .Values.microservicesruntime.httpPort }};
location / {
proxy_pass http://msr-rt;
}
}
server {
listen {{ int .Values.microservicesruntime.adminPort }};
location / {
proxy_pass http://msr-admin;
}
}
}
{{- end }}
5 changes: 1 addition & 4 deletions microservicesruntime/helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ spec:
resources:
{{- toYaml .Values.resources.nginxContainer | nindent 10 }}
ports:
- containerPort: {{ int .Values.microservicesruntime.runtimePort }}
- containerPort: {{ int .Values.microservicesruntime.httpPort }}
name: rt-port
protocol: TCP
- containerPort: {{ int .Values.microservicesruntime.adminPort }}
name: admin-http
protocol: TCP
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
Expand Down
11 changes: 2 additions & 9 deletions microservicesruntime/helm/templates/nginx-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,13 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ int .Values.microservicesruntime.runtimePort }}
- port: {{ int .Values.microservicesruntime.httpPort }}
protocol: TCP
targetPort: {{ int .Values.microservicesruntime.runtimePort }}
targetPort: {{ int .Values.microservicesruntime.httpPort }}
name: rt-port
{{- if (eq .Values.service.type "ClusterIP") }}
nodePort: null
{{- end }}
- port: {{ int .Values.microservicesruntime.adminPort }}
protocol: TCP
targetPort: {{ int .Values.microservicesruntime.adminPort }}
name: admin-port
{{- if (eq .Values.service.type "ClusterIP") }}
nodePort: null
{{- end }}
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}
{{- end }}
45 changes: 45 additions & 0 deletions microservicesruntime/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 }}
16 changes: 16 additions & 0 deletions microservicesruntime/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,21 @@ metering:
# Configure this property only if you use a truststore.
trustStorePassword:

# -- Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor.
prometheus:
path: "/metrics"
port: "5555"
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: |
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MWS as Service Auditing Monitor

To use MWS as Service Auditing Monitor (SAM), MWS must communicate with a deployed [MSR as SAM](../../../microservicesruntime/examples/service-auditing-monitor/README.md). You can read [Configuring Web Service Authentication for CAF Applications](https://documentation.softwareag.com/webmethods/mywebmethods_server/mws10-15/webhelp/mws-webhelp/index.html#page/my-webmethods-server-webhelp%2Fta-configure_basic_auth_msr.html%23) to setup this connection.
1 change: 1 addition & 0 deletions mywebmethodsserver/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| Use-case | Description |
|-----|------|
| [mws-postgresql](../examples/postgresql/README.md) | Using MWS with external PostgreSQL database |
| [service-auditing-monitor](../examples/service-auditing-monitor/README.md) | Using MWS as Service Auditing Monitor |

## Install MyWebMethods Server Release

Expand Down
1 change: 1 addition & 0 deletions mywebmethodsserver/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| Use-case | Description |
|-----|------|
| [mws-postgresql](../examples/postgresql/README.md) | Using MWS with external PostgreSQL database |
| [service-auditing-monitor](../examples/service-auditing-monitor/README.md) | Using MWS as Service Auditing Monitor |

## Install MyWebMethods Server Release

Expand Down

0 comments on commit b2403de

Please sign in to comment.