Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(executor): Add fluent-bit sidecar (WIP don't merge) #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions charts/datahub-executor-worker/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
{{- if .Values.extraConfigmap }}
name: {{ .Values.extraConfigmap.name }}
{{- end }}

data:
{{- if .Values.extraConfigmap.data }}
{{- range .Values.extraConfigmap.data }}
{{- range $key, $value := . }}
{{ $key }}: |
{{ $value | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
19 changes: 18 additions & 1 deletion charts/datahub-executor-worker/templates/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,24 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

{{- if .Values.sidecarContainers }}
{{- range $name, $spec := .Values.sidecarContainers }}
- name: {{ $name }}
{{- if kindIs "string" $spec }}
{{- tpl $spec $ | nindent 10 }}
{{- else }}
{{- toYaml $spec | nindent 10 }}
{{- end }}
{{- end }}
volumes:
{{- if .Values.extraConfigmapMounts }}
{{- range .Values.extraConfigmapMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
60 changes: 60 additions & 0 deletions charts/datahub-executor-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@ image:
pullPolicy: Always
tag: v0.3.7.3-acryl

sidecarContainers:
sidecar-fluentbit:
image: "cr.fluentbit.io/fluent/fluent-bit:3.2.2"
imagePullPolicy: IfNotPresent
command:
- /fluent-bit/bin/fluent-bit
args:
- --workdir=/fluent-bit/etc
- --config=/fluent-bit/etc/conf/fluent-bit.conf
ports:
- name: http
containerPort: 2021
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /api/v1/health
port: http
volumeMounts:
- name: fluentbit-config
mountPath: /fluent-bit/etc/conf

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -61,6 +86,41 @@ extraEnvs: []

extraVolumes: []

extraConfigmapMounts:
- name: fluentbit-config
mountPath: /fluent-bit/etc/conf
configMap: sidecar-fluent-bit
readOnly: true

extraConfigmap:
name: sidecar-fluent-bit
data:
- fluent-bit.conf: |
[SERVICE]
flush 1
daemon Off
log_level info
parsers_file parsers.conf
plugins_file plugins.conf
http_server On
http_listen 0.0.0.0
http_port 2021
storage.metrics on
[INPUT]
name prometheus_scrape
host 127.0.0.1
port 9087
tag remote
scrape_interval 60
[OUTPUT]
Name prometheus_remote_write
Match *
Host prometheus-operated
Port 9090
Uri /api/v1/write?prometheus_server=remote
add_label source remote-executor


extraVolumeMounts: []

extraInitContainers: []
Expand Down
Loading