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

Add flag to disable events collection in helm #205

Merged
merged 11 commits into from
Sep 24, 2019
4 changes: 3 additions & 1 deletion deploy/helm/sumologic/templates/events-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if eq .Values.sumologic.eventCollectionEnabled true }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -8,4 +9,5 @@ metadata:
data:
fluent.conf: |-
@include events.conf
{{- (tpl (.Files.Glob "conf/events/*.conf").AsConfig .) | nindent 2 }}
{{- (tpl (.Files.Glob "conf/events/*.conf").AsConfig .) | nindent 2 }}
{{- end }}
3 changes: 2 additions & 1 deletion deploy/helm/sumologic/templates/events-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if eq .Values.sumologic.eventCollectionEnabled true }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -67,4 +68,4 @@ spec:
value: {{ .Values.sumologic.chunkLimitSize | quote }}
- name: TOTAL_LIMIT_SIZE
value: {{ .Values.sumologic.totalLimitSize | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/templates/events-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if eq .Values.sumologic.eventCollectionEnabled true }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -13,3 +14,4 @@ spec:
port: 24231
targetPort: 24231
protocol: TCP
{{- end }}
3 changes: 3 additions & 0 deletions deploy/helm/sumologic/templates/setup/setup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
{{- if .Values.sumologic.collectorName }}
"-c", "{{ .Values.sumologic.collectorName }}",
{{- end }}
{{- if eq .Values.sumologic.eventCollectionEnabled false }}
"-e",
samjsong marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
"-d", "false",
"-y", "false",
'{{ required "A valid .Values.sumologic.endpoint entry required!" .Values.sumologic.endpoint }}',
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ sumologic:
# Cluster name
clusterName: "kubernetes"

# If enabled, collect K8s events
eventCollectionEnabled: true

## Format to post logs into Sumo. json, json_merge, or text
logFormat: fields
Expand Down
6 changes: 3 additions & 3 deletions deploy/kubernetes/fluentd-sumologic.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ data:

---
# Source: sumologic/templates/events-configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -325,6 +326,7 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
---
# Source: sumologic/templates/events-service.yaml

apiVersion: v1
kind: Service
metadata:
Expand All @@ -340,7 +342,6 @@ spec:
port: 24231
targetPort: 24231
protocol: TCP

---
# Source: sumologic/templates/service.yaml
apiVersion: v1
Expand Down Expand Up @@ -523,6 +524,7 @@ spec:
value: "true"
---
# Source: sumologic/templates/events-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -598,5 +600,3 @@ spec:
value: "100k"
- name: TOTAL_LIMIT_SIZE
value: "128m"