Skip to content

Commit d63b9fc

Browse files
authored
Merge pull request syslog-ng#4981 from ktzsolt/helmchartfixes
helm: multiple fixes
2 parents 9adfc8e + 7bc2ccb commit d63b9fc

File tree

4 files changed

+73
-31
lines changed

4 files changed

+73
-31
lines changed

contrib/syslog-ng-helm-chart/templates/compress-job.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ data:
1818
fi
1919
done
2020
---
21-
apiVersion: batch/v1beta1
21+
apiVersion: batch/v1
2222
kind: CronJob
2323
metadata:
2424
name: {{ include "syslog-ng.fullname" . }}-compressor

contrib/syslog-ng-helm-chart/templates/deployment.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,34 @@ spec:
3333
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3434
imagePullPolicy: {{ .Values.image.pullPolicy }}
3535
ports:
36-
- name: tcp-port
36+
- name: tcp-port-601
3737
containerPort: 601
3838
protocol: TCP
39-
- name: udp-port
39+
- name: tcp-port-514
40+
containerPort: 514
41+
protocol: TCP
42+
- name: tcp-port-6514
43+
containerPort: 6514
44+
protocol: TCP
45+
- name: udp-port-514
4046
containerPort: 514
4147
protocol: UDP
4248
volumeMounts:
49+
{{- if .Values.config }}
4350
- mountPath: /etc/syslog-ng/syslog-ng.conf
4451
name: config
4552
subPath: syslog-ng.conf
53+
{{- end }}
4654
{{- if .Values.storage.enable }}
4755
- mountPath: /var/log
4856
name: logs
4957
{{- end }}
5058
volumes:
59+
{{- if .Values.config }}
5160
- name: config
5261
configMap:
5362
name: {{ include "syslog-ng.fullname" . }}
63+
{{- end }}
5464
{{- if .Values.storage.enable }}
5565
- name: logs
5666
persistentVolumeClaim:

contrib/syslog-ng-helm-chart/templates/service.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,21 @@ spec:
1515
type: {{ .Values.service.type }}
1616
{{- end }}
1717
ports:
18-
- name: udp-port
18+
- name: tcp-port-514
1919
port: 514
2020
targetPort: 514
21-
protocol: UDP
22-
- name: tcp-port
21+
protocol: TCP
22+
- name: tcp-port-601
2323
port: 601
2424
targetPort: 601
25-
protocol: TCP
25+
protocol: TCP
26+
- name: tcp-port-6514
27+
port: 6514
28+
targetPort: 6514
29+
protocol: TCP
30+
- name: udp-port-514
31+
port: 514
32+
targetPort: 514
33+
protocol: UDP
2634
selector:
2735
{{- include "syslog-ng.selectorLabels" . | nindent 4 }}

contrib/syslog-ng-helm-chart/values.yaml

+48-24
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,54 @@ image:
66
repository: balabit/syslog-ng
77
pullPolicy: IfNotPresent
88
# Overrides the image tag whose default is the chart appVersion.
9-
tag: "3.27.1"
10-
11-
# By default, the network() driver binds to 0.0.0.0, meaning that it listens
12-
# on every available IPV4 interface on the TCP/601 port.
13-
14-
config: |
15-
@version: 3.27
16-
@include "scl.conf"
17-
options {
18-
# enable or disable directory creation for destination files
19-
create_dirs(yes);
20-
21-
# keep hostnames from source host
22-
keep_hostname(yes);
23-
24-
# use ISO8601 timestamps
25-
ts_format(iso);
26-
};
27-
log {
28-
source {
29-
network();
30-
};
31-
destination { file("/var/log/${YEAR}-${MONTH}-syslog"); };
32-
};
9+
tag: "4.7.1"
10+
11+
# By default, https://github.com/syslog-ng/syslog-ng/blob/master/docker/syslog-ng.conf will be used that is part of the image
12+
# You can ovverride this by providing your own config, for example:
13+
# config: |
14+
# #############################################################################
15+
# # Default syslog-ng.conf file which collects all local logs into a
16+
# # single file called /var/log/messages tailored to container usage.
17+
# #
18+
# # The changes from the stock, default syslog-ng.conf file is that we've
19+
# # dropped the system() source that is not needed and that we enabled network
20+
# # connections using default-network-drivers(). Customize as needed and
21+
# # override using the -v option to docker, such as:
22+
# #
23+
# # docker run ... -v "$PWD/syslog-ng.conf":/etc/syslog-ng/syslog-ng.conf
24+
# #
25+
26+
# @version: 4.7
27+
# @include "scl.conf"
28+
29+
# source s_local {
30+
# internal();
31+
# };
32+
33+
# source s_network {
34+
# default-network-drivers(
35+
# # NOTE: TLS support
36+
# #
37+
# # the default-network-drivers() source driver opens the TLS
38+
# # enabled ports as well, however without an actual key/cert
39+
# # pair they will not operate and syslog-ng would display a
40+
# # warning at startup.
41+
# #
42+
# #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
43+
# );
44+
# };
45+
46+
# destination d_local {
47+
# file("/var/log/messages");
48+
# file("/var/log/messages-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3));
49+
# };
50+
51+
# log {
52+
# source(s_local);
53+
# source(s_network);
54+
# destination(d_local);
55+
# };
56+
config: ""
3357

3458
storage:
3559
enable: True

0 commit comments

Comments
 (0)