Skip to content

Commit a1cbd00

Browse files
authored
Release Wazuh version 2.1.0 (#79)
* [wazuh]: improve OpenSearch security configuration reload * [wazuh]: bump chart version to 2.1.0
1 parent 428aefe commit a1cbd00

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

charts/wazuh/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: 2.0.0
18+
version: 2.1.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/wazuh/templates/indexer/indexer-sts.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ spec:
6363
- vm.max_map_count=262144
6464
securityContext:
6565
{{- toYaml .Values.indexer.initContainers.securityContext | nindent 12 }}
66-
- name: security-admin
66+
{{- if .Values.indexer.config.reloadSecurityConfig }}
67+
- name: reload-security-config
6768
securityContext:
6869
{{- toYaml .Values.indexer.securityContext | nindent 12 }}
6970
image: "{{ .Values.indexer.image.repository }}:{{ .Values.indexer.image.tag | default .Chart.AppVersion }}"
@@ -72,6 +73,12 @@ spec:
7273
- sh
7374
- -c
7475
- |
76+
# Wait for indexer to be ready
77+
until curl -k -u $INDEXER_USERNAME:$INDEXER_PASSWORD https://localhost:9200/_cluster/health; do
78+
echo "Waiting for indexer to be ready..."
79+
sleep 10
80+
done
81+
7582
# Run security admin
7683
export JAVA_HOME=/usr/share/wazuh-indexer/jdk/ && \
7784
bash /usr/share/wazuh-indexer/plugins/opensearch-security/tools/securityadmin.sh \
@@ -104,6 +111,24 @@ spec:
104111
value: {{ .Values.indexer.config.sslEnabled | quote }}
105112
- name: DISABLE_INSTALL_DEMO_CONFIG
106113
value: "true"
114+
- name: INDEXER_USERNAME
115+
valueFrom:
116+
secretKeyRef:
117+
{{- if .Values.manager.config.secrets.existingSecretName }}
118+
name: {{ .Values.manager.config.secrets.existingSecretName }}
119+
{{- else }}
120+
name: {{ include "wazuh.fullname" . }}-manager
121+
{{- end }}
122+
key: INDEXER_USERNAME
123+
- name: INDEXER_PASSWORD
124+
valueFrom:
125+
secretKeyRef:
126+
{{- if .Values.manager.config.secrets.existingSecretName }}
127+
name: {{ .Values.manager.config.secrets.existingSecretName }}
128+
{{- else }}
129+
name: {{ include "wazuh.fullname" . }}-manager
130+
{{- end }}
131+
key: INDEXER_PASSWORD
107132
volumeMounts:
108133
- name: wazuh-indexer
109134
mountPath: /var/lib/wazuh-indexer
@@ -130,6 +155,7 @@ spec:
130155
{{- with .Values.indexer.volumeMounts }}
131156
{{- toYaml . | nindent 12 }}
132157
{{- end }}
158+
{{- end }}
133159
containers:
134160
- name: {{ include "wazuh.fullname" . }}-indexer
135161
securityContext:

charts/wazuh/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ indexer:
9999
javaOpts: "-Xms2g -Xmx2g -Dlog4j2.formatMsgNoLookups=true"
100100
# Network host configuration
101101
networkHost: "0.0.0.0"
102+
# Set to true when you make changes to OpenSearch security configuration files
103+
# (opensearch-security/config.yml, internal_users.yml, etc.) to reload the security settings
104+
reloadSecurityConfig: false
102105
# The name of the configmap that includes the custom indexer config
103106
# Must have the following key "opensearch.yml"
104107
indexerCustomConfig: ""
@@ -507,4 +510,4 @@ serviceAccount:
507510
annotations: {}
508511
# The name of the service account to use.
509512
# If not set and create is true, a name is generated using the fullname template
510-
name: ""
513+
name: ""

0 commit comments

Comments
 (0)