Skip to content

Commit

Permalink
test(helm): add basic remote write proxy test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Świątek committed Feb 3, 2022
1 parent f612fcf commit de2242f
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/metrics/otelcol/configmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/metrics/remote-write-proxy/remote-write-proxy.conf") . | sha256sum }}
{{- if .Values.sumologic.podAnnotations }}
{{ toYaml .Values.sumologic.podAnnotations | indent 8 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions tests/helm/remote_write_proxy/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

export TEST_TEMPLATE="templates/metrics/remote-write-proxy/deployment.yaml"
4 changes: 4 additions & 0 deletions tests/helm/remote_write_proxy/static/basic.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sumologic:
metrics:
remoteWriteProxy:
enabled: true
68 changes: 68 additions & 0 deletions tests/helm/remote_write_proxy/static/basic.output.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# Source: sumologic/templates/metrics/remote-write-proxy/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: RELEASE-NAME-sumologic-remote-write-proxy
labels:
app: RELEASE-NAME-sumologic-remote-write-proxy
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
spec:
selector:
matchLabels:
app: RELEASE-NAME-sumologic-remote-write-proxy
replicas: 3
template:
metadata:
annotations:
checksum/config: "%CONFIG_CHECKSUM%"
labels:
app: RELEASE-NAME-sumologic-remote-write-proxy
chart: "sumologic-2.4.0"
release: "RELEASE-NAME"
heritage: "Helm"
spec:
containers:
- name: nginx
image: public.ecr.aws/nginx/nginx:1.21-alpine
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
resources:
limits:
cpu: 1000m
memory: 256Mi
requests:
cpu: 200m
memory: 128Mi
livenessProbe:
tcpSocket:
port: 80
failureThreshold: 6
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: 80
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
env:
# this setting makes the entrypoint automatically set the number of worker processes based
# on cpu limit data, by using the cgroups API
- name: NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE
value: "1"
volumeMounts:
- name: config
mountPath: /etc/nginx/conf.d/remote-write-proxy.conf
subPath: remote-write-proxy.conf
volumes:
- name: config
configMap:
name: RELEASE-NAME-sumologic-remote-write-proxy

0 comments on commit de2242f

Please sign in to comment.