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

[WIP] Add Optional Filebeat Configuration To Server Helm Chart #4183

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
746a7bb
update pulsar mock
d80tb7 Jan 2, 2025
29cc41b
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 3, 2025
64355fe
go mod tidy
d80tb7 Jan 3, 2025
2bc7d8d
import order
d80tb7 Jan 3, 2025
0fc3e7f
wip
d80tb7 Jan 3, 2025
93ac227
wip
d80tb7 Jan 3, 2025
7999ecc
wip
d80tb7 Jan 3, 2025
3b7dca8
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 3, 2025
f98b23c
supress logging
d80tb7 Jan 3, 2025
60c04fb
lint
d80tb7 Jan 3, 2025
4be8a0a
lint
d80tb7 Jan 4, 2025
32c79c8
lint
d80tb7 Jan 4, 2025
e1ced01
wip
d80tb7 Jan 4, 2025
8c184b0
wip
d80tb7 Jan 4, 2025
da74217
wip
d80tb7 Jan 4, 2025
e249f2d
wip
d80tb7 Jan 4, 2025
d490b0b
wip
d80tb7 Jan 4, 2025
1ccd7b1
wip
d80tb7 Jan 4, 2025
4e83b61
wip
d80tb7 Jan 4, 2025
94de1dd
remove logrus
d80tb7 Jan 4, 2025
4e5450d
remove logrus
d80tb7 Jan 4, 2025
59d3e9b
fix test
d80tb7 Jan 4, 2025
b660df0
fix armadactl
d80tb7 Jan 4, 2025
42baeae
clean up interfaces
d80tb7 Jan 4, 2025
b882e6a
clean up interfaces
d80tb7 Jan 4, 2025
67d3db0
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 5, 2025
b708709
wip
d80tb7 Jan 5, 2025
4c918e0
merged
d80tb7 Jan 5, 2025
05f1750
added back json logging
d80tb7 Jan 5, 2025
edd9734
lint
d80tb7 Jan 5, 2025
3d45d6c
fix test
d80tb7 Jan 5, 2025
dd94cb0
add back log tests
d80tb7 Jan 5, 2025
94ad206
wip
d80tb7 Jan 6, 2025
9f10d8e
wip
d80tb7 Jan 6, 2025
1fc7ead
wip
d80tb7 Jan 6, 2025
04ebd1a
lint
d80tb7 Jan 6, 2025
951ab70
fix skip frames
d80tb7 Jan 7, 2025
10f4813
fixed milli time
d80tb7 Jan 7, 2025
faf182e
formatting
d80tb7 Jan 7, 2025
ba90268
formatting
d80tb7 Jan 8, 2025
498789b
more tests
d80tb7 Jan 8, 2025
f0ab4e7
lint
d80tb7 Jan 8, 2025
ed5fca5
merged master
d80tb7 Jan 8, 2025
7901e4b
colorful
d80tb7 Jan 8, 2025
a834009
fixes
d80tb7 Jan 8, 2025
e8cb59a
fixes
d80tb7 Jan 12, 2025
6e950b9
fixes
d80tb7 Jan 12, 2025
cb8891f
fixes
d80tb7 Jan 12, 2025
9800c79
wip
d80tb7 Jan 12, 2025
0fe5017
lint
d80tb7 Jan 12, 2025
34b97dc
lint
d80tb7 Jan 12, 2025
7273f2e
wip
d80tb7 Jan 12, 2025
fc8b26e
wip
d80tb7 Jan 12, 2025
314e5a5
update docker
d80tb7 Jan 13, 2025
d89d12f
wip
d80tb7 Jan 13, 2025
620e064
add logfile config
d80tb7 Jan 13, 2025
bda5f33
add prometheus hook
d80tb7 Jan 14, 2025
5833afb
add prometheus hook
d80tb7 Jan 14, 2025
69328c5
add prometheus hook
d80tb7 Jan 14, 2025
3c45419
go mod tidy
d80tb7 Jan 14, 2025
f85c39e
unit test for prometheus
d80tb7 Jan 14, 2025
a6115bc
update
d80tb7 Jan 14, 2025
b8eece0
go mod tidy
d80tb7 Jan 14, 2025
44ad8a0
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 14, 2025
1d6f9f5
go mod tidy
d80tb7 Jan 14, 2025
b9020fb
Merge branch 'f/chrisma/zerlog-minimal' of github.com:armadaproject/a…
d80tb7 Jan 14, 2025
716b059
added development logging
d80tb7 Jan 14, 2025
3b985c7
fix
d80tb7 Jan 14, 2025
fd4b712
fix
d80tb7 Jan 14, 2025
ab21792
fix
d80tb7 Jan 14, 2025
e5d5eb6
merge master
d80tb7 Jan 15, 2025
21da962
merge master
d80tb7 Jan 16, 2025
c7833da
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 16, 2025
ee857b4
Merge branch 'f/chrisma/zerlog-minimal' of github.com:armadaproject/a…
d80tb7 Jan 16, 2025
715c832
merge master
d80tb7 Jan 18, 2025
aed8a47
merge master
d80tb7 Jan 18, 2025
dd99a83
merged master
d80tb7 Jan 20, 2025
86be50b
merged master
d80tb7 Jan 20, 2025
6ec31a1
lint
d80tb7 Jan 20, 2025
e5ae56a
minor fixes
d80tb7 Jan 20, 2025
c4119d5
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 23, 2025
f4bd10c
Merge branch 'f/chrisma/add-logfile-config' of github.com:armadaproje…
d80tb7 Jan 23, 2025
7b33e8d
more setup
d80tb7 Jan 23, 2025
e0c5bc9
more setup
d80tb7 Jan 23, 2025
48bd577
merge master
d80tb7 Jan 29, 2025
e356b32
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Feb 4, 2025
907e4f3
lint
d80tb7 Feb 4, 2025
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
13 changes: 13 additions & 0 deletions deployment/armada/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
{{- printf "%s%s" ( include "armada.config.name" .) ".yaml" -}}
{{- end }}

{{- define "armada.logging.config.name" -}}
{{- printf "%s-%s" ( include "armada.name" .) "logging-config" -}}
{{- end }}

{{- define "armada.logging.config.filename" -}}
{{- printf "%s%s" ( include "armada.logging.config.name" .) ".yaml" -}}
{{- end }}

{{- define "armada.users.name" -}}
{{- printf "%s-%s" ( include "armada.name" .) "users" -}}
{{- end }}
Expand Down Expand Up @@ -63,3 +71,8 @@ release: {{ .Release.Name }}
{{ toYaml .Values.additionalLabels }}
{{- end }}
{{- end -}}


{{- define "armada.filebeat.config.name" -}}
{{- printf "%s-%s" ( include "armada.name" .) "filebeat-config" -}}
{{- end }}
35 changes: 35 additions & 0 deletions deployment/armada/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,38 @@ data:
{{- if .Values.applicationConfig }}
{{ toYaml .Values.applicationConfig | indent 4 }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "armada.logging.config.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "armada.labels.all" . | nindent 4 }}
data:
{{ include "armada.logging.config.filename" . }}: |
{{- if .Values.logging }}
{{ toYaml .Values.logging | indent 4 }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "armada.filebeat.config.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "armada.labels.all" . | nindent 4 }}
data:
filebeat.yml: |-
filebeat.inputs:
- type: log
enabled: true
paths:
- /log/*.json
processors:
- add_fields:
target: ""
fields:
app: "armada-server"
output.logstash:
hosts: ["${LOGSTASH_HOST}:${LOGSTASH_PORT}"]
31 changes: 31 additions & 0 deletions deployment/armada/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ spec:
- name: GOMEMLIMIT
value: {{ quote . }}
{{- end }}
- name: "ARMADA_LOG_CONFIG"
value: /config/{{ include "armada.logging.config.filename" . }}
- name: SERVICE_ACCOUNT
valueFrom:
fieldRef:
Expand Down Expand Up @@ -79,6 +81,12 @@ spec:
mountPath: /config/application_config.yaml
subPath: {{ include "armada.config.filename" . }}
readOnly: true
- name: logging-config
mountPath: /config/logging_config.yaml
subPath: {{ include "armada.logging.config.filename" . }}
readOnly: true
- name: logs
mountPath: /log
{{- if .Values.applicationConfig.pulsar.authenticationEnabled }}
- name: pulsar-token
mountPath: "/pulsar/tokens"
Expand Down Expand Up @@ -117,6 +125,24 @@ spec:
initialDelaySeconds: 10
timeoutSeconds: 10
failureThreshold: 3
- name: filebeat
image: {{ .Values.filebeat.image.registry }}{{ .Values.filebeat.image.tag }}
imagePullPolicy: IfNotPresent
env:
- name: LOGSTASH_HOST
value: {{ .Values.filebeat.logstash.host }}
- name: LOGSTASH_PORT
value: {{ .Values.filebeat.logstash.port }}
args:
- "-e"
- "-c"
- "/etc/filebeat/filebeat.yaml"
volumeMounts:
- name: filebeat-config
mountPath: /etc/filebeat/filebeat.yaml
subPath: filebeat.yml
- name: log
mountPath: /log
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -133,6 +159,11 @@ spec:
- name: user-config
configMap:
name: {{ include "armada.config.name" . }}
- name: logging-config
configMap:
name: {{ include "armada.logging.config.name" . }}
- name: logs
emptyDir: { }
{{- if .Values.applicationConfig.pulsar.authenticationEnabled }}
- name: pulsar-token
secret:
Expand Down
23 changes: 23 additions & 0 deletions deployment/armada/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,26 @@ applicationConfig:
tlsEnabled: false
# -- Name of the secret which contains the Pulsar CA certificate
cacert: armada-pulsar-ca-tls

logging:
console:
level: info
format: text
file:
enabled: false
level: info
format: json
rotation:
maxSizeMb: 5
maxBackups: 3
maxAgeDays: 7
compress: false

filebeat:
enabled: false
image:
repository: docker.elastic.co/beats/filebeat
tag: 7.17.0
logstash:
host: "localhost"
port: 5044