Skip to content

Commit

Permalink
Merge pull request #44 from SoftwareAG/dev-msr-thr
Browse files Browse the repository at this point in the history
Using of Stakater Reloader @ MSR
  • Loading branch information
MarcFriedhoff authored Feb 23, 2024
2 parents bcf9ab9 + 8d15285 commit deec72b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions microservicesruntime/examples/stakater-reloader/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Using of Stakater Reloader

Per default, the Microservices Runtime pod is not restarted on changed `application.properties` (in *ConfigMap*) between Helm release upgrades. The [Stakataer Reloader](https://github.com/stakater/Reloader) can solve and help this issue.

## Increase `values.yaml`

Add following annotation value in `podAnnotations` to define the dependency between deployment and *ConfigMap* ...

```
podAnnotations:
configmap.reloader.stakater.com/reload: "{{ include \"common.names.fullname\" . }}"
```

If the *ConfigMap* (evaluated by `{{ include \"common.names.fullname\" . }}`) with the content of `application.properties` is changed, [Stakataer Reloader](https://github.com/stakater/Reloader) restarts the pod after installing Helm release.
1 change: 1 addition & 0 deletions microservicesruntime/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| [msr-with-tls](../examples/msr-with-tls/README.md) | Configure Ingress with TLS |
| [process-engine](../examples/process-engine/README.md) | Deploy MSR as Process Engine |
| [service-auditing-monitor](../examples/service-auditing-monitor/README.md) | Deploy MSR as Service Auditing Monitor |
| [Stakater Reloader](../examples/stakater-reloader/README.md) | Utility to restart MSR pod on configuration changes |

## Install Microservices Runtime Release

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 @@ -59,6 +59,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| [msr-with-tls](../examples/msr-with-tls/README.md) | Configure Ingress with TLS |
| [process-engine](../examples/process-engine/README.md) | Deploy MSR as Process Engine |
| [service-auditing-monitor](../examples/service-auditing-monitor/README.md) | Deploy MSR as Service Auditing Monitor |
| [Stakater Reloader](../examples/stakater-reloader/README.md) | Utility to restart MSR pod on configuration changes |

## Install Microservices Runtime Release

Expand Down
3 changes: 2 additions & 1 deletion microservicesruntime/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ spec:
template:
metadata:
annotations:
{{- $context := . }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- include "common.prometheus.annotations" (dict "port" .Values.service.port) | nindent 8 }}
labels:
Expand Down

0 comments on commit deec72b

Please sign in to comment.