Skip to content

Commit 9b05068

Browse files
committed
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 008bd7f commit 9b05068

10 files changed

+138
-80
lines changed

helm-releases/parseable-1.5.0.tgz

268 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
@@ -76,6 +78,9 @@ spec:
7678
- mountPath: "/parseable/hot-tier"
7779
name: hot-tier-volume
7880
{{- end }}
81+
volumes:
82+
- emptyDir: {}
83+
name: stage-volume
7984
{{- if .Values.parseable.sidecar.enabled}}
8085
- name: {{ .Chart.Name }}-sidecar
8186
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:
@@ -164,18 +164,28 @@ parseable:
164164
tolerations: []
165165
## Use this section to create ServiceMonitor object for
166166
## this Parseable deployment. Read more on ServiceMonitor
167-
## here: https://prometheus-operator.dev/docs/operator/design/#servicemonitor
167+
## here: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ServiceMonitor
168168
metrics:
169169
serviceMonitor:
170170
enabled: false
171171
namespace: ""
172-
interval: 30s
173-
scrapeTimeout: ""
174-
relabellings: []
175-
metricRelabelings: []
176-
honorLabels: false
177-
additionalLabels: {}
178-
podTargetLabels: []
172+
spec:
173+
jobLabel: ""
174+
targetLabels: []
175+
podTargetLabels: []
176+
endpoints: []
177+
selector: {}
178+
namespaceSelector: {}
179+
sampleLimit: 0
180+
scrapeProtocols: []
181+
targetLimit: 0
182+
labelLimit: 0
183+
labelNameLengthLimit: 0
184+
labelValueLengthLimit: 0
185+
keepDroppedTargets: 0
186+
attachMetadata: {}
187+
scrapeClass: ""
188+
bodySizeLimit: {}
179189

180190
# Default values for Vector
181191
# See Vector helm documentation to learn more:

0 commit comments

Comments
 (0)