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

[Backport release-v2.0] Allow setting securityContext per container in Fluentd statefulsets #1443

Merged
merged 1 commit into from
Feb 18, 2021
Merged
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
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/templates/events-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ spec:
imagePullPolicy: {{ .Values.fluentd.image.pullPolicy }}
resources:
{{- toYaml .Values.fluentd.events.statefulset.resources | nindent 10 }}
{{- if .Values.fluentd.events.statefulset.containers.fluentd.securityContext }}
securityContext:
{{- toYaml .Values.fluentd.events.statefulset.containers.fluentd.securityContext | nindent 10 }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /fluentd/etc/
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/templates/metrics-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
imagePullPolicy: {{ .Values.fluentd.image.pullPolicy }}
resources:
{{- toYaml .Values.fluentd.metrics.statefulset.resources | nindent 10 }}
{{- if .Values.fluentd.metrics.statefulset.containers.fluentd.securityContext }}
securityContext:
{{- toYaml .Values.fluentd.metrics.statefulset.containers.fluentd.securityContext | nindent 10 }}
{{- end }}
ports:
- name: prom-write
containerPort: 9888
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
imagePullPolicy: {{ .Values.fluentd.image.pullPolicy }}
resources:
{{- toYaml .Values.fluentd.logs.statefulset.resources | nindent 10 }}
{{- if .Values.fluentd.logs.statefulset.containers.fluentd.securityContext }}
securityContext:
{{- toYaml .Values.fluentd.logs.statefulset.containers.fluentd.securityContext | nindent 10 }}
{{- end }}
ports:
{{- if .Values.sumologic.traces.enabled }}
- name: zipkin-write
Expand Down
15 changes: 15 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ fluentd:
## Add custom annotations only to logs fluentd sts pods
podAnnotations: {}

## Set securityContext for containers running in pods in logs statefulset.
containers:
fluentd:
securityContext: {}

## Option to turn autoscaling on for fluentd and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
autoscaling:
Expand Down Expand Up @@ -583,6 +588,11 @@ fluentd:
## Add custom annotations only to metrics fluentd sts pods
podAnnotations: {}

## Set securityContext for containers running in pods in metrics statefulset.
containers:
fluentd:
securityContext: {}

## Option to turn autoscaling on for fluentd and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
autoscaling:
Expand Down Expand Up @@ -702,6 +712,11 @@ fluentd:
## Add custom annotations only to events fluentd sts pods
podAnnotations: {}

## Set securityContext for containers running in pods in events statefulset.
containers:
fluentd:
securityContext: {}

## Source category for the Events source. Default: "{clusterName}/events"
sourceCategory: ""
## Override Kubernetes resource types you want to get events for from different Kubernetes
Expand Down