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

Commit 024a78b

Browse files
author
Chris Wiechmann
committed
Added the option to skip ES-Server-Cert when using Helm
#156
1 parent 4bb756f commit 024a78b

File tree

7 files changed

+30
-11
lines changed

7 files changed

+30
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818
- `APM_ELASTICSEARCH_SSL_VERIFICATIONMODE` to configure APM-Server to Elasticsearch certificate validation [#156](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/156)
1919
- `LOGSTASH_ELASTICSEARCH_SSL_VERIFICATIONMODE` to configure Logstash to Elasticsearch certificate validation [#156](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/156)
2020
- `FILEBEAT_ELASTICSEARCH_SSL_VERIFICATIONMODE` to configure Filebeat to Elasticsearch certificate validation [#156](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/156)
21+
- Helm chart supports this by the new new parameter: `validateElasticsearchCertificate` per component [#156](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/156)
2122

2223
### Fixed
2324
- APIBuilder4Elastic - The Swagger for this service is invalid - Duplicate operationId renamed [#158](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/issues/158)

helm/templates/apibuilder4elastic/apibuilder4elastic-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
data:
99
ELASTICSEARCH_HOSTS: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
1010
ELASTICSEARCH_CA: {{ required "The path to the CA for API-Builder to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
11-
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ .Values.apibuilder4elastic.ssl.validateElasticsearchCertificate | quote }}
11+
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ default true .Values.apibuilder4elastic.validateElasticsearchCertificate | quote }}
1212
ADMIN_NODE_MANAGER: {{ required "The Admin-Node-Manager URL (apibuilder4elastic.anmUrl) is required." .Values.apibuilder4elastic.anmUrl | quote }}
1313
API_MANAGER: {{ default "" .Values.apibuilder4elastic.apimgrUrl | quote }}
1414
API_BUILDER_SSL_CERT: {{ default "config/certificates/apibuilder4elastic.crt" .Values.apibuilder4elastic.ssl.cert | quote }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data:
1212
ELASTICSEARCH_HOSTS: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
1313
ELASTICSEARCH_CLUSTER_UUID: {{ index .Values "apm-server" "elasticsearchClusterUUID" | quote }}
1414
ELASTICSEARCH_CA: {{ required "The path to the CA for APM-Server to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
15-
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ .Values.apm-server.ssl.validateElasticsearchCertificate | quote }}
15+
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ index .Values "apm-server" "validateElasticsearchCertificate" }}
1616
APM_SERVER_CRT: {{ index .Values "apm-server" "ssl" "cert" }}
1717
APM_SERVER_KEY: {{ index .Values "apm-server" "ssl" "key" }}
1818
{{- end }}

helm/templates/elasticApimFilebeat/filebeat-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data:
1313
ELASTICSEARCH_HOSTS: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
1414
ELASTICSEARCH_CLUSTER_UUID: {{ .Values.filebeat.elasticsearchClusterUUID | quote }}
1515
ELASTICSEARCH_CRT: {{ required "The path to the CA for Logstash to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
16-
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ .Values.filebeat.ssl.validateElasticsearchCertificate | quote }}
16+
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ default "full" .Values.filebeat.validateElasticsearchCertificate | quote }}
1717
FILEBEAT_WORKER: {{ .Values.filebeat.filebeatWorker | quote }}
1818
FILEBEAT_COMPRESSION_LEVEL: {{ .Values.filebeat.compressionLevel | quote }}
1919
SELF_MONITORING_ENABLED: {{ .Values.global.selfMonitoringEnabled | quote }}

helm/templates/elasticApimKibana/kibana-env-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ data:
2626
SERVER_SSL_CERTIFICATE: {{ default "config/certificates/kibana.crt" .Values.kibana.ssl.cert | quote }}
2727
SERVER_SSL_KEYPASSPHRASE: {{ default "" .Values.kibana.ssl.password | quote }}
2828
ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES: {{ required "The path to the CA for Kibana to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
29-
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ .Values.kibana.ssl.validateElasticsearchCertificate | quote }}
29+
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ default "full" .Values.kibana.validateElasticsearchCertificate | quote }}
3030
{{- end }}

helm/templates/elasticApimLogstash/logstash-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ data:
2020
xpack.monitoring.enabled: "true"
2121
xpack.monitoring.elasticsearch.hosts: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
2222
xpack.monitoring.elasticsearch.ssl.certificate_authority: {{ required "The path to the CA for Logstash to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
23+
xpack.monitoring.elasticsearch.ssl.verification_mode: {{ default "certificate" .Values.logstash.validateElasticsearchCertificate | quote }}
2324
LS_JAVA_OPTS: {{ .Values.logstash.logstashJavaOpts | quote }}
2425
ELASTICSEARCH_HOSTS: {{ required "The value global.elasticsearchHosts is missing." .Values.global.elasticsearchHosts | quote }}
2526
ELASTICSEARCH_CERT: {{ required "The path to the CA for Logstash to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}
26-
ELASTICSEARCH_SSL_VERIFICATIONMODE: {{ .Values.logstash.ssl.validateElasticsearchCertificate | quote }}
27+
{{- if eq .Values.logstash.validateElasticsearchCertificate "none" }}
28+
ELASTICSEARCH_SSL_VERIFICATIONMODE: "false"
29+
{{- else }}
30+
ELASTICSEARCH_SSL_VERIFICATIONMODE: "true"
31+
{{- end }}
2732
API_BUILDER_URL: "https://{{ include "apim4elastic.fullname" . }}-apibuilder4elastic:{{ .Values.apibuilder4elastic.port }}"
2833
DROP_TRACE_MESSAGE_LEVELS: {{ .Values.logstash.dropTraceMessageLevels | quote }}
2934
API_BUILDER_SSL_CERT: {{ required "The path to the CA for Logstash to Elasticsearch communication is missing" .Values.global.elasticsearchCa | quote }}

helm/values.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ apibuilder4elastic:
120120
# cert: "config/certificates/apibuilder4elastic.crt"
121121
# password: ""
122122

123-
# Here you may disable the Elasticsearch server certificate validation for APIBuilder4Elastic
124-
# validateElasticsearchCertificate: false
125-
126123
# localAPILookup enables the Local API-Lookup feature
127124
# Use extraVolumes & extraVolumeMounts to mount your custom configuration into
128125
# the API-Builder4Elastic container.
@@ -152,6 +149,9 @@ apibuilder4elastic:
152149
# if you want to raise an issue.
153150
#logLevel: "debug"
154151

152+
# Configure the Elasticsearch server certificate validation for APIBuilder4Elastic. Is enabled by default.
153+
# validateElasticsearchCertificate: false
154+
155155
# Resource requests for API-Builder
156156
resources:
157157
requests:
@@ -226,6 +226,19 @@ logstash:
226226
dropTraceMessageLevels: "DEBUG,DATA"
227227
# Number of replicas for Logstash
228228
replicas: 2
229+
230+
# Controls the Logstash to Elasticsearch certificate validation mode for pipelines and monitoring
231+
# Value certificate is translated into true for pipelines certificate validation. none into false
232+
# Possible values: (certificate|none)
233+
# Defaults to: certificate
234+
# For more information please read
235+
# https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ssl_certificate_verification
236+
237+
# Controls Logstash to Elasticsearch certificate validation mode for pipelines and monitoring
238+
# Value certificate is translated into true for pipelines certificate validation. none into false
239+
# Possible values: (certificate|none) - Defaults to: certificate
240+
validateElasticsearchCertificate: "certificate"
241+
229242
# Injects the environment variables from the ConfigMaps and Secrets into the
230243
# Logstash container. Specify your own ConfigMaps or Secrets if you don't
231244
# provide Configuration and Secrets as part of this values.yaml.
@@ -453,7 +466,7 @@ kibana:
453466
# cert: "certificates/kibana.crt"
454467
# password: ""
455468

456-
# Here you can configure the Elasticsearch server certificate validation for Kibana
469+
# Can configure the Elasticsearch server certificate validation for Kibana
457470
# Possible values: (full|certificate|none) - Defaults to: full
458471
# validateElasticsearchCertificate: none
459472

@@ -552,7 +565,7 @@ filebeat:
552565

553566
# Here you can configure the Elasticsearch server certificate validation for Filebeat (for monitoring only)
554567
# Possible values: (full|strict|certificate|none) - Defaults to: full
555-
# ssl.validateElasticsearchCertificate: none
568+
# validateElasticsearchCertificate: none
556569

557570
# extraVolumes is used to provide Filebeat access to the necessary log files from the API-Gateways.
558571
# The API-Gateways write to the same volumes accordingly.
@@ -740,7 +753,7 @@ apm-server:
740753

741754
# Here you can configure the Elasticsearch server certificate validation for the APM-Server
742755
# Possible values: (full|strict|certificate|none) - Defaults to: full
743-
# validateElasticsearchCertificate: none
756+
validateElasticsearchCertificate: full
744757

745758
livenessProbe:
746759
httpGet:

0 commit comments

Comments
 (0)