Skip to content

Commit

Permalink
Merge pull request #15 from elastiflow/ENG-1780-add-tls-certificate
Browse files Browse the repository at this point in the history
FEAT: Add kafla tls support
  • Loading branch information
kgrubb authored Apr 30, 2024
2 parents b7ba3da + 8bb0ca5 commit 106b8c2
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/netobserv/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: netobserv
description: ElastiFlow NetObserv
type: application
version: 0.0.13
version: 0.0.14
appVersion: 6.4.3

keywords:
Expand Down
33 changes: 31 additions & 2 deletions charts/netobserv/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ spec:
name: netobserv-license
key: license
{{- end }}
{{- if .Values.kafka.enabled }}
- name: EF_OUTPUT_KAFKA_ENABLE
value: 'true'
- name: "EF_OUTPUT_KAFKA_BROKERS"
value: {{ .Values.kafka.brokers }}
{{- if .Values.kafka.tls.enabled }}
- name: EF_OUTPUT_KAFKA_TLS_ENABLE
value: 'true'
- name: "EF_OUTPUT_KAFKA_TLS_CA_CERT_FILEPATH"
value: "{{ .Values.kafka.tls.caMountPath }}/{{ .Values.kafka.tls.caFilename }}"
{{- end }}
{{- end }}
ports:
- name: udp
containerPort: {{ .Values.service.port }}
Expand All @@ -90,10 +102,17 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled }}
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled .Values.kafka.tls.enabled }}
volumeMounts:
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled }}
- name: geolite2-data
mountPath: /etc/elastiflow/maxmind
{{- end }}
{{- if .Values.kafka.tls.enabled }}
- name: {{ .Values.kafka.tls.caConfigMap }}
mountPath: {{ .Values.kafka.tls.caMountPath }}
readOnly: True
{{- end }}
{{- end }}
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled }}
- name: maxmind-geoipupdate
Expand Down Expand Up @@ -123,10 +142,20 @@ spec:
- name: geolite2-data
mountPath: /data
{{- end }}
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled }}
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled .Values.kafka.tls.enabled }}
volumes:
{{- if or .Values.maxmind.asnEnabled .Values.maxmind.geoipEnabled }}
- name: geolite2-data
emptyDir: {}
{{- end }}
{{- if .Values.kafka.tls.enabled }}
- name: {{ .Values.kafka.tls.caFileName }}
configMap:
name: {{ .Values.kafka.tls.caConfigMap }}
items:
- key: {{ .Values.kafka.tls.caConfigMapKey }}
path: {{ .Values.kafka.tls.caFileName }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
23 changes: 21 additions & 2 deletions charts/netobserv/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ env:
# EF_OUTPUT_SPLUNK_HEC_ENABLE: 'false'
# EF_OUTPUT_SPLUNK_HEC_ADDRESSES: '127.0.0.1:8088'
# EF_OUTPUT_SPLUNK_HEC_TOKEN: ''
# EF_OUTPUT_KAFKA_ENABLE: 'false'
# EF_OUTPUT_KAFKA_BROKERS: ''
# EF_OUTPUT_KAFKA_SASL_ENABLE: 'false'
# EF_OUTPUT_CRIBL_ENABLE: 'false'
# EF_OUTPUT_CRIBL_ADDRESSES: '127.0.0.1:10080'
Expand All @@ -67,6 +65,27 @@ env:
# EF_OUTPUT_GENERIC_HTTP_ADDRESSES: ''
# EF_OUTPUT_RISKIQ_ENABLE: 'false'

# The Kafka output can be used to send records to Apache Kafka, Confluent Platform,
# Confluent Cloud, Redpanda and Amazon Managed Streaming for Apache Kafka (Amazon MSK).
# https://docs.elastiflow.com/docs/output-kafka
kafka:
# Enable/disable TLS connections to Kafka.
enabled: false
# A comma-separated list of brokers, IP address and port number, to which the collector is to connect.
# Example: "192.0.2.11:9092,192.0.2.12:9092,192.0.2.13:9092"
brokers: ""
tls:
# Enable/disable TLS connections to Kafka.
enabled: false
# The name of the config map that contains the CA certificate.
caConfigMap: ""
# The path to the CA certificate file.
caMountPath: ""
# The key in the config map that contains the CA certificate.
caConfigMapKey: "ca.crt"
# The name of the file that contains the CA certificate.
caFileName: "ca.crt"

license:
# Specifies whether a secret should be created. If you don't have a license, no need to create a license secret.
createSecret: false
Expand Down

0 comments on commit 106b8c2

Please sign in to comment.