Skip to content

Commit

Permalink
fix(openshift): fix remote write proxy - use unprivileged NGINX
Browse files Browse the repository at this point in the history
  • Loading branch information
kasia-kujawa committed Sep 8, 2022
1 parent 041f5df commit 51d6cf9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@


upstream remote {
server {{ template "sumologic.metadata.name.metrics.service" . }}:9888;
}

server {
listen 80 default_server;
listen {{ .Values.sumologic.metrics.remoteWriteProxy.config.port }} default_server;

location / {
client_body_buffer_size {{ .Values.sumologic.metrics.remoteWriteProxy.config.clientBodyBufferSize }};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ spec:
image: {{ .Values.sumologic.metrics.remoteWriteProxy.image.repository }}:{{ .Values.sumologic.metrics.remoteWriteProxy.image.tag }}
imagePullPolicy: {{ .Values.sumologic.metrics.remoteWriteProxy.image.pullPolicy }}
ports:
- containerPort: 80
- containerPort: {{ .Values.sumologic.metrics.remoteWriteProxy.config.port }}
resources:
{{- toYaml .Values.sumologic.metrics.remoteWriteProxy.resources | nindent 10 }}
livenessProbe:
tcpSocket:
port: 80
port: {{ .Values.sumologic.metrics.remoteWriteProxy.config.port }}
{{- toYaml .Values.sumologic.metrics.remoteWriteProxy.livenessProbe | nindent 10 }}
readinessProbe:
tcpSocket:
port: 80
port: {{ .Values.sumologic.metrics.remoteWriteProxy.config.port }}
{{- toYaml .Values.sumologic.metrics.remoteWriteProxy.readinessProbe | nindent 10 }}
{{- if .Values.sumologic.metrics.remoteWriteProxy.config.workerCountAutotune }}
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
ports:
- name: http
port: 9888
targetPort: 80
targetPort: {{ .Values.sumologic.metrics.remoteWriteProxy.config.port }}
selector:
app: {{ template "sumologic.labels.app.remoteWriteProxy.pod" . }}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@ sumologic:
## This feature autodetects how much CPU is assigned to the nginx instance and sets
## the right amount of workers based on that. Disable to use the default of 8 workers.
workerCountAutotune: true
## Nginx listen port
port: 8080
replicaCount: 3
image:
## TODO: Serve this image from the sumologic public ECR
repository: public.ecr.aws/nginx/nginx
repository: nginxinc/nginx-unprivileged
tag: 1.21-alpine
pullPolicy: IfNotPresent
resources:
Expand Down

0 comments on commit 51d6cf9

Please sign in to comment.