Skip to content

Commit a3b63bb

Browse files
authored
fix: helm chart config issues (#912)
This PR fixes issues with helm chart where streams as configured in the values file were not getting created if HA is enabled. Fixes #899 Another fix included in this PR is to allow different configurations for service monitor object by passing through the endpoints spec fields directly from values.yaml. Fixes #905 Final fix is to ensure podAnnotations applied in HA mode are propagated to the query node. Fixes #901 Also update the image tag to latest release v1.5.0
1 parent 7ab2dd4 commit a3b63bb

10 files changed

+138
-80
lines changed

helm-releases/parseable-1.5.0.tgz

400 Bytes
Binary file not shown.

helm/templates/_helpers_config_logstream.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ createStream() {
77
echo;
88
echo \"Creating the log stream $STREAM\";
99

10+
{{ if .Values.parseable.highAvailability.enabled }}
11+
response=$(curl -sS --header 'Content-Type: application/json' -u "$P_USERNAME":"$P_PASSWORD" -w 'HTTPSTATUS:%{http_code}' --location --request PUT "http://{{ include "parseable.fullname" . }}-querier-service.{{ .Release.Namespace }}:{{ $.Values.parseable.service.port }}/api/v1/logstream/$STREAM");
12+
{{ else }}
1013
response=$(curl -sS --header 'Content-Type: application/json' -u "$P_USERNAME":"$P_PASSWORD" -w 'HTTPSTATUS:%{http_code}' --location --request PUT "http://{{ include "parseable.fullname" . }}.{{ .Release.Namespace }}:{{ $.Values.parseable.service.port }}/api/v1/logstream/$STREAM");
14+
{{ end }}
1115

1216
HTTP_BODY=$(echo $response | sed -e 's/HTTPSTATUS\:.*//g')
1317
HTTP_STATUS=$(echo $response | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
@@ -25,7 +29,11 @@ setRetention() {
2529
echo;
2630
echo \"Setting the retention for $STREAM\";
2731

32+
{{ if .Values.parseable.highAvailability.enabled }}
33+
response=$(curl -sS --header 'Content-Type: application/json' -u "$P_USERNAME":"$P_PASSWORD" -w 'HTTPSTATUS:%{http_code}' --location --request PUT "http://{{ include "parseable.fullname" . }}-querier-service.{{ .Release.Namespace }}:{{ $.Values.parseable.service.port }}/api/v1/logstream/$STREAM/retention" --data "[{\"description\":\"$ACTION logs after $DURATION\",\"action\":\"$ACTION\",\"duration\":\"$DURATION\"}]");
34+
{{ else }}
2835
response=$(curl -sS --header 'Content-Type: application/json' -u "$P_USERNAME":"$P_PASSWORD" -w 'HTTPSTATUS:%{http_code}' --location --request PUT "http://{{ include "parseable.fullname" . }}.{{ .Release.Namespace }}:{{ $.Values.parseable.service.port }}/api/v1/logstream/$STREAM/retention" --data "[{\"description\":\"$ACTION logs after $DURATION\",\"action\":\"$ACTION\",\"duration\":\"$DURATION\"}]");
36+
{{ end }}
2937

3038
HTTP_BODY=$(echo $response | sed -e 's/HTTPSTATUS\:.*//g')
3139
HTTP_STATUS=$(echo $response | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')

helm/templates/ingestor-service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ kind: Service
44
metadata:
55
name: {{ include "parseable.fullname" . }}-ingestor-service
66
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "parseable.labelsSelector" . | nindent 4 }}
79
spec:
810
type: {{ $.Values.parseable.highAvailability.ingestor.service.type }}
911
ports:

helm/templates/ingestor-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ metadata:
1818
name: {{ include "parseable.fullname" . }}-ingestor
1919
namespace: {{ .Release.Namespace }}
2020
labels:
21-
{{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 4 }}
2221
{{- include "parseable.ingestorLabels" . | nindent 4 }}
2322
spec:
2423
selector:
@@ -30,6 +29,7 @@ spec:
3029
template:
3130
metadata:
3231
labels:
32+
{{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 8 }}
3333
{{- include "parseable.ingestorLabelsSelector" . | nindent 8 }}
3434
spec:
3535
terminationGracePeriodSeconds: 10

helm/templates/querier-service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ kind: Service
44
metadata:
55
name: {{ include "parseable.fullname" . }}-querier-service
66
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "parseable.labelsSelector" . | nindent 4 }}
79
spec:
810
type: {{ $.Values.parseable.service.type }}
911
ports:

helm/templates/querier-statefulset.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.parseable.highAvailability.enabled true }}
1+
{{- if .Values.parseable.highAvailability.enabled }}
22
apiVersion: v1
33
kind: Service
44
metadata:
@@ -18,7 +18,6 @@ metadata:
1818
name: {{ include "parseable.fullname" . }}-querier
1919
namespace: {{ .Release.Namespace }}
2020
labels:
21-
{{- .Values.parseable.podLabels | toYaml | nindent 4 }}
2221
{{- include "parseable.querierLabels" . | nindent 4 }}
2322
spec:
2423
selector:
@@ -30,7 +29,10 @@ spec:
3029
minReadySeconds: 2
3130
template:
3231
metadata:
32+
annotations:
33+
{{- .Values.parseable.podAnnotations | toYaml | nindent 8 }}
3334
labels:
35+
{{- .Values.parseable.podLabels | toYaml | nindent 8 }}
3436
{{- include "parseable.querierLabelsSelector" . | nindent 8 }}
3537
spec:
3638
terminationGracePeriodSeconds: 10
@@ -86,6 +88,9 @@ spec:
8688
- mountPath: "/parseable/hot-tier"
8789
name: hot-tier-volume
8890
{{- end }}
91+
volumes:
92+
- emptyDir: {}
93+
name: stage-volume
8994
{{- if .Values.parseable.sidecar.enabled}}
9095
- name: {{ .Chart.Name }}-sidecar
9196
securityContext:

helm/templates/service-monitor.yaml

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,63 @@ kind: ServiceMonitor
44
metadata:
55
name: {{ include "parseable.fullname" . }}
66
namespace: {{ default .Release.Namespace .Values.parseable.metrics.serviceMonitor.namespace | quote }}
7-
labels: {{- include "parseable.labelsSelector" . | nindent 4 }}
8-
{{- if .Values.parseable.metrics.serviceMonitor.additionalLabels }}
9-
{{- include (dict "value" .Values.parseable.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
10-
{{- end }}
7+
labels:
8+
{{- include "parseable.labels" . | nindent 4 }}
119
spec:
10+
{{ if .Values.parseable.metrics.serviceMonitor.spec.jobLabel }}
11+
jobLabel: {{ .Values.parseable.metrics.serviceMonitor.spec.jobLabel | quote }}
12+
{{- end }}
13+
{{ if .Values.parseable.metrics.serviceMonitor.spec.targetLabels }}
14+
targetLabels:
15+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.targetLabels | nindent 4 }}
16+
{{- end }}
17+
{{ if .Values.parseable.metrics.serviceMonitor.spec.podTargetLabels }}
18+
podTargetLabels:
19+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.podTargetLabels | nindent 4 }}
20+
{{- end }}
21+
{{ if .Values.parseable.metrics.serviceMonitor.spec.endpoints }}
1222
endpoints:
13-
- port: parseable-metrics
14-
{{- if .Values.parseable.metrics.serviceMonitor.interval }}
15-
interval: {{ .Values.parseable.metrics.serviceMonitor.interval }}
16-
{{- end }}
17-
{{- if .Values.parseable.metrics.serviceMonitor.scrapeTimeout }}
18-
scrapeTimeout: {{ .Values.parseable.metrics.serviceMonitor.scrapeTimeout }}
19-
{{- end }}
20-
{{- if .Values.parseable.metrics.serviceMonitor.honorLabels }}
21-
honorLabels: {{ .Values.parseable.metrics.serviceMonitor.honorLabels }}
22-
{{- end }}
23-
{{- if .Values.parseable.metrics.serviceMonitor.relabellings }}
24-
relabelings: {{- toYaml .Values.parseable.metrics.serviceMonitor.relabellings | nindent 6 }}
25-
{{- end }}
26-
{{- if .Values.parseable.metrics.serviceMonitor.metricRelabelings }}
27-
metricRelabelings: {{- toYaml .Values.parseable.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
28-
{{- end }}
29-
{{- if .Values.parseable.metrics.serviceMonitor.podTargetLabels }}
30-
podTargetLabels: {{- toYaml .Values.parseable.metrics.serviceMonitor.podTargetLabels | nindent 4 }}
23+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.endpoints | nindent 4 }}
3124
{{- end }}
32-
namespaceSelector:
33-
matchNames:
34-
- {{ .Release.Namespace }}
25+
{{ if .Values.parseable.metrics.serviceMonitor.spec.selector }}
3526
selector:
36-
matchLabels: {{- include "parseable.labelsSelector" . | nindent 6 }}
27+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.selector | nindent 4 }}
28+
{{- end }}
29+
{{ if .Values.parseable.metrics.serviceMonitor.spec.namespaceSelector }}
30+
namespaceSelector:
31+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.namespaceSelector | nindent 4 }}
32+
{{- end }}
33+
{{ if .Values.parseable.metrics.serviceMonitor.spec.sampleLimit }}
34+
sampleLimit: {{ .Values.parseable.metrics.serviceMonitor.spec.sampleLimit }}
35+
{{- end }}
36+
{{ if .Values.parseable.metrics.serviceMonitor.spec.scrapeProtocols }}
37+
scrapeProtocols:
38+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.scrapeProtocols | nindent 4 }}
39+
{{- end }}
40+
{{ if .Values.parseable.metrics.serviceMonitor.spec.targetLimit }}
41+
targetLimit: {{ .Values.parseable.metrics.serviceMonitor.spec.targetLimit }}
42+
{{- end }}
43+
{{ if .Values.parseable.metrics.serviceMonitor.spec.labelLimit }}
44+
labelLimit: {{ .Values.parseable.metrics.serviceMonitor.spec.labelLimit }}
45+
{{- end }}
46+
{{ if .Values.parseable.metrics.serviceMonitor.spec.labelNameLengthLimit }}
47+
labelNameLengthLimit: {{ .Values.parseable.metrics.serviceMonitor.spec.labelNameLengthLimit }}
48+
{{- end }}
49+
{{ if .Values.parseable.metrics.serviceMonitor.spec.labelValueLengthLimit }}
50+
labelValueLengthLimit: {{ .Values.parseable.metrics.serviceMonitor.spec.labelValueLengthLimit }}
51+
{{- end }}
52+
{{ if .Values.parseable.metrics.serviceMonitor.spec.keepDroppedTargets }}
53+
keepDroppedTargets: {{ .Values.parseable.metrics.serviceMonitor.spec.keepDroppedTargets }}
54+
{{- end }}
55+
{{ if .Values.parseable.metrics.serviceMonitor.spec.attachMetadata }}
56+
attachMetadata:
57+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.attachMetadata | nindent 4 }}
58+
{{- end }}
59+
{{ if .Values.parseable.metrics.serviceMonitor.spec.scrapeClass }}
60+
scrapeClass: {{ .Values.parseable.metrics.serviceMonitor.spec.scrapeClass | quote }}
61+
{{- end }}
62+
{{ if .Values.parseable.metrics.serviceMonitor.spec.bodySizeLimit }}
63+
bodySizeLimit:
64+
{{- toYaml .Values.parseable.metrics.serviceMonitor.spec.bodySizeLimit | nindent 4 }}
65+
{{- end }}
3766
{{- end }}

helm/templates/standalone-service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ kind: Service
44
metadata:
55
name: {{ include "parseable.fullname" . }}
66
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "parseable.labelsSelector" . | nindent 4 }}
79
spec:
810
type: {{ $.Values.parseable.service.type }}
911
ports:

helm/values.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
parseable:
22
image:
33
repository: containers.parseable.com/parseable/parseable
4-
tag: v1.4.0
4+
tag: v1.5.0
55
pullPolicy: Always
66
## Set to true if you want to deploy Parseable in local mode (store logs
77
## on local mount point instead of S3 bucket)
8-
local: true
8+
local: false
99
## Set to true if you want to deploy Parseable in a HA mode (multiple ingestors)
1010
## Please note that highAvailability is not supported in local mode
1111
highAvailability:
@@ -172,18 +172,28 @@ parseable:
172172
tolerations: []
173173
## Use this section to create ServiceMonitor object for
174174
## this Parseable deployment. Read more on ServiceMonitor
175-
## here: https://prometheus-operator.dev/docs/operator/design/#servicemonitor
175+
## here: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor
176176
metrics:
177177
serviceMonitor:
178178
enabled: false
179179
namespace: ""
180-
interval: 30s
181-
scrapeTimeout: ""
182-
relabellings: []
183-
metricRelabelings: []
184-
honorLabels: false
185-
additionalLabels: {}
186-
podTargetLabels: []
180+
spec:
181+
jobLabel: ""
182+
targetLabels: []
183+
podTargetLabels: []
184+
endpoints: []
185+
selector: {}
186+
namespaceSelector: {}
187+
sampleLimit: 0
188+
scrapeProtocols: []
189+
targetLimit: 0
190+
labelLimit: 0
191+
labelNameLengthLimit: 0
192+
labelValueLengthLimit: 0
193+
keepDroppedTargets: 0
194+
attachMetadata: {}
195+
scrapeClass: ""
196+
bodySizeLimit: {}
187197

188198
# Default values for Vector
189199
# See Vector helm documentation to learn more:

0 commit comments

Comments
 (0)