Skip to content

Commit 6d478bf

Browse files
fix: Handle log4j2 not being yaml (#110) and chart bump. (#123)
* fix: Handle log4j2 not being yaml (#110) and chart bump. Signed-off-by: Stein Arne Storslett <[email protected]> * Including tpl changes Signed-off-by: Aaron Layfield <[email protected]> * Adding log4j example. Signed-off-by: Aaron Layfield <[email protected]> * Adding some documentation AND updated per comment.s Signed-off-by: Aaron Layfield <[email protected]> * Use project name and clarify from/to. Signed-off-by: Stein Arne Storslett <[email protected]> * Explicitly document that config must be YAML multiline strings. Signed-off-by: Stein Arne Storslett <[email protected]> * Cast as string for use with tpl. Signed-off-by: Stein Arne Storslett <[email protected]> * Because this would be really annoying. Signed-off-by: Stein Arne Storslett <[email protected]> * fix: Handle log4j2 not being yaml (#110) and chart bump to 1.4.0. Signed-off-by: Stein Arne Storslett <[email protected]> Co-authored-by: Aaron Layfield <[email protected]>
1 parent fb2844c commit 6d478bf

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

charts/opensearch/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Fixed
1414
### Security
1515
---
16+
## [1.4.0]
17+
### Changed
18+
- Changed support for any kind of configuration type. Including `log4j2.properties` file. Added example.
19+
### BREAKING CHANGE
20+
- `.Values.config` items must now be interpreted as a string. Existing items must now be updated from YAML to string:
21+
22+
Change from YAML:
23+
```yaml
24+
config:
25+
opensearch.yml:
26+
cluster.name: opensearch-cluster
27+
```
28+
29+
Change to YAML multiline string:
30+
```yaml
31+
config:
32+
opensearch.yml: |
33+
cluster.name: opensearch-cluster
34+
```
35+
---
1636
## [1.3.1]
1737
### Added
1838
- Added image definition for `fsgroup-volume` initContainer to `values.yaml`.

charts/opensearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.3.1
18+
version: 1.4.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/opensearch/ci/ci-rbac-enabled-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ global:
2828
opensearchHome: /usr/share/opensearch
2929
# such as opensearch.yml and log4j2.properties
3030
config:
31-
opensearch.yml:
31+
opensearch.yml: |
3232
cluster.name: opensearch-cluster
3333
3434
# Bind to all interfaces because we don't know what IP address Docker will assign to us.

charts/opensearch/ci/ci-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ global:
2828
opensearchHome: /usr/share/opensearch
2929
# such as opensearch.yml and log4j2.properties
3030
config:
31-
opensearch.yml:
31+
opensearch.yml: |
3232
cluster.name: opensearch-cluster
3333
3434
# Bind to all interfaces because we don't know what IP address Docker will assign to us.

charts/opensearch/templates/configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- $root := . }}
12
{{- if .Values.config }}
23
apiVersion: v1
34
kind: ConfigMap
@@ -8,6 +9,6 @@ metadata:
89
data:
910
{{- range $configName, $configYaml := .Values.config }}
1011
{{ $configName }}: |
11-
{{- toYaml $configYaml | nindent 4 }}
12+
{{- tpl $configYaml $root | nindent 4 }}
1213
{{- end -}}
1314
{{- end -}}

charts/opensearch/values.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,20 @@ global:
2828
opensearchHome: /usr/share/opensearch
2929
# such as opensearch.yml and log4j2.properties
3030
config:
31-
opensearch.yml:
31+
# Values must be YAML literal style scalar / YAML multiline string.
32+
# <filename>: |
33+
# <formatted-value(s)>
34+
# log4j2.properties: |
35+
# status = error
36+
#
37+
# appender.console.type = Console
38+
# appender.console.name = console
39+
# appender.console.layout.type = PatternLayout
40+
# appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
41+
#
42+
# rootLogger.level = info
43+
# rootLogger.appenderRef.console.ref = console
44+
opensearch.yml: |
3245
cluster.name: opensearch-cluster
3346
3447
# Bind to all interfaces because we don't know what IP address Docker will assign to us.

0 commit comments

Comments
 (0)