Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 47dc657

Browse files
author
Chris Wiechmann
committed
Missing support in Helm-Chart for APM-Server Elasticsearch authentication
1 parent f4f036e commit 47dc657

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
- Elastic-Helm charts dependencies for the Elasticstack updated from 7.17.1 to 7.17.3
1111
- Updated default Elastic-Stack version from 7.17.1 to 7.17.3
1212

13+
### Fixed
14+
- Missing support in Helm-Chart for APM-Server Elasticsearch authentication
15+
1316
## [4.5.0] 2022-03-31
1417
### Added
1518
- Now the parameter: `CACHE_API_PATHS` is also used to cache the API-Ignore lookup more efficient

helm/templates/elasticApimApmServer/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Selector labels
2525
app.kubernetes.io/component: apm-server
2626
app.kubernetes.io/name: {{ include "apim4elastic.name" . }}
2727
app.kubernetes.io/instance: {{ .Release.Name }}
28-
{{- range $key, $value := .Values.apmserver.labels }}
28+
{{- range $key, $value := index .Values "apm-server" "labels" }}
2929
{{ $key }}: {{ $value | quote }}
3030
{{- end }}
3131
{{- end }}

helm/templates/elasticApimApmServer/apm-server-config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ kind: ConfigMap
44
metadata:
55
name: {{ template "apmserver.fullname" . }}-env-config
66
labels:
7-
app: "{{ template "apmserver.fullname" . }}"
8-
chart: "{{ .Chart.Name }}"
9-
heritage: {{ .Release.Service | quote }}
10-
release: {{ .Release.Name | quote }}
7+
{{- include "apmserver.labels" . | nindent 4 }}
118
data:
129
ELASTICSEARCH_HOSTS: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
1310
ELASTICSEARCH_CLUSTER_UUID: {{ index .Values "apm-server" "elasticsearchClusterUUID" | quote }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if and ".Values.apm-server.enabled" ".Values.apm-server.apmserverSecrets.enabled" }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: {{ template "apmserver.fullname" . }}-secret
6+
labels:
7+
{{- include "apmserver.labels" . | nindent 4 }}
8+
type: Opaque
9+
data:
10+
APM_USERNAME: {{ index .Values "apm-server" "apmserverSecrets" "username" | b64enc | quote }}
11+
APM_PASSWORD: {{ index .Values "apm-server" "apmserverSecrets" "password" | b64enc | quote }}
12+
{{- end }}

helm/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,20 @@ apm-server:
776776
# Required for the internal stack monitoring to work with the APM-Server
777777
elasticsearchClusterUUID: ""
778778

779+
# Username and Password for APM-Server to send monitoring events to Elasticsearch
780+
# When enabled, the provided username and password are used to create the secret
781+
# <releaseName>-apim4elastic-apmserver-secret which is referenced below.
782+
# You may use your own secret and reference it here.
783+
apmserverSecrets:
784+
enabled: true
785+
username: ""
786+
password: ""
787+
779788
envFrom:
780789
- configMapRef:
781790
name: axway-elk-apim4elastic-apmserver-env-config
791+
- secretRef:
792+
name: axway-elk-apim4elastic-apmserver-secret
782793

783794
secretMounts:
784795
- name: certificates
@@ -798,6 +809,9 @@ apm-server:
798809
# Possible values: (full|strict|certificate|none) - Defaults to: full
799810
validateElasticsearchCertificate: full
800811

812+
# additional labels
813+
labels: {}
814+
801815
livenessProbe:
802816
httpGet:
803817
path: /

0 commit comments

Comments
 (0)