Skip to content

Commit cec4ab8

Browse files
authored
feat: add mandatory kafka env values to helm template (#1291)
1 parent 2793d81 commit cec4ab8

File tree

3 files changed

+116
-40
lines changed

3 files changed

+116
-40
lines changed

helm/templates/ingestor-statefulset.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ spec:
139139
{{- end }}
140140
- name: P_MODE
141141
value: "ingest"
142+
{{- if .Values.parseable.kafkaConnector.enabled }}
143+
{{- range $key, $value := .Values.parseable.kafkaConnector.env }}
144+
- name: {{ $key }}
145+
value: {{ tpl $value $ | quote }}
146+
{{- end }}
147+
{{- end }}
148+
142149
ports:
143150
- containerPort: {{ .Values.parseable.highAvailability.ingestor.port }}
144151
{{- with .Values.readinessProbe }}

helm/templates/standalone-deployment.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
imagePullPolicy: {{ .Values.parseable.image.pullPolicy }}
3737
# Uncomment to debug
3838
# command: [ "/bin/sh", "-c", "sleep 1000000" ]
39-
args: ["/usr/bin/parseable", {{ if eq .Values.parseable.store "gcs-store" }}"s3-store"{{ else }}{{ .Values.parseable.store | quote }}{{ end }}]
39+
args: [ "/usr/bin/parseable", {{ if eq .Values.parseable.store "gcs-store" }}"s3-store"{{ else }}{{ .Values.parseable.store | quote }}{{ end }}]
4040
env:
4141
- name: HOSTNAME
4242
valueFrom:
@@ -70,6 +70,13 @@ spec:
7070
value: {{ .Values.parseable.auditLogging.p_password | quote }}
7171
{{- end }}
7272

73+
{{- if .Values.parseable.kafkaConnector.enabled }}
74+
{{- range $key, $value := .Values.parseable.kafkaConnector.env }}
75+
- name: {{ $key }}
76+
value: {{ tpl $value $ | quote }}
77+
{{- end }}
78+
{{- end }}
79+
7380
{{- if and .Values.parseable.s3ModeSecret .Values.parseable.s3ModeSecret.enabled }}
7481
{{- range $secret := .Values.parseable.s3ModeSecret.secrets }}
7582
{{- range $key := $secret.keys }}
@@ -111,6 +118,8 @@ spec:
111118
{{- end }}
112119
{{- end }}
113120
{{- end }}
121+
122+
114123
ports:
115124
- containerPort: 8000
116125
{{- with .Values.readinessProbe }}

helm/values.yaml

+99-39
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ parseable:
99
## Please note that highAvailability is not supported in local mode
1010
highAvailability:
1111
enabled: false
12-
ingestor:
13-
affinity: {}
12+
ingestor:
13+
affinity: { }
1414
# podAntiAffinity:
1515
# requiredDuringSchedulingIgnoredDuringExecution:
1616
# - labelSelector:
1717
# matchLabels:
1818
# app: parseable
19-
# component: ingestor
20-
# topologyKey: kubernetes.io/hostname
19+
# component: ingestor
20+
# topologyKey: kubernetes.io/hostname
2121
port: 8000
2222
extraLabels:
2323
app: parseable
24-
podAnnotations: {}
25-
nodeSelector: {}
26-
tolerations: []
24+
podAnnotations: { }
25+
nodeSelector: { }
26+
tolerations: [ ]
2727
labels:
2828
app: parseable
2929
component: ingestor
3030
count: 3
31-
env:
31+
env:
3232
RUST_LOG: warn
3333
## Use this endpoint to send events to ingestors
3434
## Console (UI) is available on the other service (that points to the query pod)
@@ -85,8 +85,8 @@ parseable:
8585
storageClass: ""
8686
accessMode: ReadWriteOnce
8787
size: 5Gi
88-
## enabling the disk on querier adds the hot-tier.
89-
## local-store is not supported on hot-tier.
88+
## enabling the disk on querier adds the hot-tier.
89+
## local-store is not supported on hot-tier.
9090
querier:
9191
enabled: false
9292
storageClass: ""
@@ -155,16 +155,16 @@ parseable:
155155
serviceAccount:
156156
create: true
157157
name: "parseable"
158-
annotations: {}
159-
nodeSelector: {}
158+
annotations: { }
159+
nodeSelector: { }
160160
service:
161161
type: ClusterIP
162162
port: 80
163163
readinessProbe:
164164
httpGet:
165165
path: /api/v1/readiness
166166
port: 8000
167-
toleration: []
167+
toleration: [ ]
168168
resources:
169169
limits:
170170
cpu: 500m
@@ -181,9 +181,9 @@ parseable:
181181
repository: busybox
182182
tag: latest
183183
pullPolicy: IfNotPresent
184-
command: []
185-
args: []
186-
env:
184+
command: [ ]
185+
args: [ ]
186+
env:
187187
RUST_LOG: warn
188188
ports: 8000
189189
volumeMounts:
@@ -217,39 +217,99 @@ parseable:
217217
fsGroupChangePolicy: "Always"
218218
nameOverride: ""
219219
fullnameOverride: ""
220-
nodeSelector: {}
221-
affinity: {}
220+
affinity: { }
222221
podLabels:
223222
app: parseable
224223
component: query
225-
tolerations: []
224+
tolerations: [ ]
226225
## Use this section to create ServiceMonitor object for
227226
## this Parseable deployment. Read more on ServiceMonitor
228227
## here: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor
229228
metrics:
230229
serviceMonitor:
231230
enabled: false
232-
labels: {}
231+
labels: { }
233232
namespace: ""
234233
spec:
235234
jobLabel: ""
236-
targetLabels: []
237-
podTargetLabels: []
238-
endpoints: []
239-
selector: {}
240-
namespaceSelector: {}
235+
targetLabels: [ ]
236+
podTargetLabels: [ ]
237+
endpoints: [ ]
238+
selector: { }
239+
namespaceSelector: { }
241240
sampleLimit: 0
242-
scrapeProtocols: []
241+
scrapeProtocols: [ ]
243242
targetLimit: 0
244243
labelLimit: 0
245244
labelNameLengthLimit: 0
246245
labelValueLengthLimit: 0
247246
keepDroppedTargets: 0
248-
attachMetadata: {}
247+
attachMetadata: { }
249248
scrapeClass: ""
250-
bodySizeLimit: {}
249+
bodySizeLimit: { }
250+
kafkaConnector:
251+
enabled: false
252+
env:
253+
# General Kafka Configuration
254+
P_KAFKA_BOOTSTRAP_SERVERS: "my-kafka.kafka.svc.cluster.local:9092" # Comma-separated list of Kafka bootstrap servers
255+
P_KAFKA_PARTITION_LISTENER_CONCURRENCY: "2" # Number of parallel threads for Kafka partition listeners
256+
P_KAFKA_CONSUMER_TOPICS: "test-log-stream-0,test-log-stream-1"
257+
# P_KAFKA_CLIENT_ID: "parseable-connect" # Client ID for Kafka connection
258+
# P_CONNECTOR_BAD_DATA_POLICY: "fail" # Default Policy for handling bad data
259+
260+
# Consumer Configurations. These config are Default Parseable KafkaConnector configs. Change only if necessary.
261+
# P_KAFKA_CONSUMER_GROUP_ID: "parseable-connect-cg"
262+
# P_KAFKA_CONSUMER_BUFFER_SIZE: "10000"
263+
# P_KAFKA_CONSUMER_BUFFER_TIMEOUT: "10000ms"
264+
# P_KAFKA_CONSUMER_SESSION_TIMEOUT: "60000"
265+
# P_KAFKA_CONSUMER_HEARTBEAT_INTERVAL: "3000"
266+
# P_KAFKA_CONSUMER_PARTITION_STRATEGY: "roundrobin,range"
267+
# P_KAFKA_CONSUMER_MAX_POLL_INTERVAL: "300000"
268+
# P_KAFKA_CONSUMER_ENABLE_AUTO_OFFSET_STORE: "true"
269+
# P_KAFKA_CONSUMER_AUTO_OFFSET_RESET: "earliest"
270+
# P_KAFKA_CONSUMER_FETCH_MIN_BYTES: "1"
271+
# P_KAFKA_CONSUMER_FETCH_MAX_BYTES: "52428800"
272+
# P_KAFKA_CONSUMER_FETCH_MAX_WAIT: "500"
273+
# P_KAFKA_CONSUMER_MAX_PARTITION_FETCH_BYTES: "1048576"
274+
# P_KAFKA_CONSUMER_QUEUED_MIN_MESSAGES: "100000"
275+
# P_KAFKA_CONSUMER_QUEUED_MAX_MESSAGES_KBYTES: "65536"
276+
# P_KAFKA_CONSUMER_ENABLE_PARTITION_EOF: "false"
277+
# P_KAFKA_CONSUMER_CHECK_CRCS: "false"
278+
# P_KAFKA_CONSUMER_ISOLATION_LEVEL: "read_committed"
279+
# P_KAFKA_CONSUMER_FETCH_MESSAGE_MAX_BYTES: "1048576"
280+
# P_KAFKA_CONSUMER_STATS_INTERVAL: "10000"
281+
282+
# Security Configuration Options - By Default PLAINTEXT
283+
284+
# Option 1: SSL Encryption Only
285+
# P_KAFKA_SECURITY_PROTOCOL: "SSL"
286+
# P_KAFKA_SSL_CA_LOCATION: "/etc/ssl/certs/ca-certificates.crt"
287+
# P_KAFKA_SSL_CERTIFICATE_LOCATION: "/etc/ssl/certs/client-cert.pem"
288+
# P_KAFKA_SSL_KEY_LOCATION: "/etc/ssl/private/client-key.pem"
289+
# P_KAFKA_SSL_KEY_PASSWORD: "my-key-password" # Optional: only if key is password protected
290+
291+
# Option 2: SASL Authentication with SSL Encryption
292+
# P_KAFKA_SECURITY_PROTOCOL: "SASL_SSL"
293+
# P_KAFKA_SSL_CA_LOCATION: "/etc/ssl/certs/ca-certificates.crt"
294+
# P_KAFKA_SASL_MECHANISM: "SCRAM-SHA-512" # Can also be PLAIN, SCRAM-SHA-256, or GSSAPI
295+
# P_KAFKA_SASL_USERNAME: "kafka-user"
296+
# P_KAFKA_SASL_PASSWORD: "kafka-password"
297+
298+
# Option 3: SASL Authentication without Encryption
299+
# P_KAFKA_SECURITY_PROTOCOL: "SASL_PLAINTEXT"
300+
# P_KAFKA_SASL_MECHANISM: "PLAIN" # Can also be SCRAM-SHA-256, SCRAM-SHA-512, or GSSAPI
301+
# P_KAFKA_SASL_USERNAME: "kafka-user"
302+
# P_KAFKA_SASL_PASSWORD: "kafka-password"
303+
304+
# Option 4: OAuth Bearer Token Authentication (Not supported yet)
305+
# P_KAFKA_SECURITY_PROTOCOL: "SASL_SSL"
306+
# P_KAFKA_SASL_MECHANISM: "OAUTHBEARER"
307+
# P_KAFKA_OAUTH_TOKEN_ENDPOINT: "https://oauth.example.com/token"
308+
# P_KAFKA_OAUTH_CLIENT_ID: "kafka-client"
309+
# P_KAFKA_OAUTH_CLIENT_SECRET: "client-secret"
310+
# P_KAFKA_OAUTH_SCOPE: "kafka-access" # Optional: only if required by OAuth provider
251311

252-
# Default values for Vector
312+
## Default values for Vector
253313
# See Vector helm documentation to learn more:
254314
# https://vector.dev/docs/setup/installation/package-managers/helm/
255315
vector:
@@ -259,7 +319,7 @@ vector:
259319
image:
260320
repository: timberio/vector
261321
pullPolicy: IfNotPresent
262-
pullSecrets: []
322+
pullSecrets: [ ]
263323
tag: ""
264324
sha: ""
265325
replicas: 1
@@ -272,7 +332,7 @@ vector:
272332
create: true
273333
serviceAccount:
274334
create: true
275-
annotations: {}
335+
annotations: { }
276336
name:
277337
automountToken: true
278338
podLabels:
@@ -284,13 +344,13 @@ vector:
284344
service:
285345
enabled: true
286346
type: "ClusterIP"
287-
annotations: {}
288-
topologyKeys: []
289-
ports: []
347+
annotations: { }
348+
topologyKeys: [ ]
349+
ports: [ ]
290350
externalTrafficPolicy: ""
291351
loadBalancerIP: ""
292352
ipFamilyPolicy: ""
293-
ipFamilies: []
353+
ipFamilies: [ ]
294354
serviceHeadless:
295355
enabled: true
296356
dnsPolicy: ClusterFirst
@@ -353,7 +413,7 @@ fluent-bit:
353413
tag: latest
354414
serviceAccount:
355415
create: true
356-
annotations: {}
416+
annotations: { }
357417
name:
358418
rbac:
359419
create: true
@@ -364,8 +424,8 @@ fluent-bit:
364424
type: ClusterIP
365425
port: 2020
366426
loadBalancerClass:
367-
loadBalancerSourceRanges: []
368-
labels: {}
427+
loadBalancerSourceRanges: [ ]
428+
labels: { }
369429
livenessProbe:
370430
httpGet:
371431
path: /
@@ -457,7 +517,7 @@ fluent-bit:
457517
Password {{ .Values.serverPassword }}
458518
Stream k8s-events
459519
460-
upstream: {}
520+
upstream: { }
461521

462522
customParsers: |
463523
[PARSER]

0 commit comments

Comments
 (0)