Skip to content

Commit

Permalink
NMS-16317: Minion Container: Add way to overlay config files (#56)
Browse files Browse the repository at this point in the history
* allow adding content to minion etc overlay

* update configmap

* Add example to README.md file

* fix the example in README.md

* Update README.md.gotmpl

* Revert "fix the example in README.md"

This reverts commit 040742b.

* Revert "Add example to README.md file"

This reverts commit d5a4658.

* clean up gotmpl

* Update README.md
  • Loading branch information
mershad-manesh authored Feb 26, 2024
1 parent 184b1b3 commit 2331a37
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions horizon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ 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.1.10
version: 1.1.11

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "32.0.6"
appVersion: "33.0.1"

maintainers:
- name: The OpenNMS Group Inc.
Expand Down
4 changes: 2 additions & 2 deletions minion/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ 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.1.10
version: 1.1.11

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "32.0.6"
appVersion: "33.0.1"

maintainers:
- name: The OpenNMS Group Inc.
Expand Down
7 changes: 7 additions & 0 deletions minion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This template can be used to bring up a minion and connect it to a OpenNMS core.
* Modify `values.yaml` file:
* (If you are using JKS) add a base64 value of Java Keystore into `content`. You can get the base64 value by running `cat jks/truststore.jks | base64`

### Example:
Adding a file called `hello.txt` to `etc` folder inside the minion container
```
cd minion
echo "Hello World" > etc/hello.txt
```

## Values

| Key | Type | Default | Description |
Expand Down
7 changes: 7 additions & 0 deletions minion/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This template can be used to bring up a minion and connect it to a OpenNMS core.
* Modify `values.yaml` file:
* (If you are using JKS) add a base64 value of Java Keystore into `content`. You can get the base64 value by running `cat jks/truststore.jks | base64`

### Example:
Adding a file called `hello.txt` to `etc` folder inside the minion container
```
cd minion
echo "Hello World" > etc/hello.txt
```

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
Empty file added minion/etc/.keep
Empty file.
8 changes: 8 additions & 0 deletions minion/templates/minion-app-etc.configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: minion-app-etc
data:
{{- (.Files.Glob "etc/**").AsConfig | nindent 2 }}

5 changes: 5 additions & 0 deletions minion/templates/minion-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ spec:
- mountPath: /opt/minion/minion-config.yaml
name: minion-settings
subPath: minion-config.yaml
- mountPath: "/opt/minion-etc-overlay"
name: minion-etc
{{- if .Values.truststore.content }}
- mountPath: /etc/java/jks
name: jks
Expand All @@ -113,6 +115,9 @@ spec:
hostname: minion
restartPolicy: Always
volumes:
- name: minion-etc
configMap:
name: minion-app-etc
- name: minion-data-folder
persistentVolumeClaim:
claimName: minion-data-folder
Expand Down

0 comments on commit 2331a37

Please sign in to comment.