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

chore: Use dedicated service for metrics #654

Merged
merged 1 commit into from
May 10, 2024
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: 2 additions & 2 deletions charts/lagoon-logs-concentrator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ type: application
# time you make changes to the chart and its templates, including the app
# version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.47.0
version: 0.48.0

# This section is used to collect a changelog for artifacthub.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI failure is due to this field not being updated. This field must be updated on every PR because it generates the changelog on artifacthub. The format is documented here.

# It should be started afresh for each release
# Valid supported kinds are added, changed, deprecated, removed, fixed and security
annotations:
artifacthub.io/changes: |
- kind: changed
description: update uselagoon/logs-concentrator image to v3.2.0
description: use dedicated service for metrics
22 changes: 22 additions & 0 deletions charts/lagoon-logs-concentrator/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
{{- with .Values.metrics.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "lagoon-logs-concentrator.fullname" . }}-metrics
labels:
metrics-only: "true"
{{- include "lagoon-logs-concentrator.labels" . | nindent 4 }}
spec:
type: {{ .Values.metrics.service.type }}
ports:
- port: {{ .Values.metrics.service.port }}
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "lagoon-logs-concentrator.selectorLabels" . | nindent 4 }}
{{- end }}
4 changes: 0 additions & 4 deletions charts/lagoon-logs-concentrator/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@ spec:
targetPort: forward
protocol: TCP
name: forward
- port: 24231
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "lagoon-logs-concentrator.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ spec:
- {{ .Release.Namespace }}
selector:
matchLabels:
metrics-only: "true"
{{- include "lagoon-logs-concentrator.selectorLabels" . | nindent 6 }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/lagoon-logs-concentrator/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ spec:
- name: forward
containerPort: 24224
protocol: TCP
{{- if .Values.metrics.enabled }}
- name: metrics
containerPort: 24231
protocol: TCP
{{- end }}
livenessProbe:
tcpSocket:
port: forward
Expand Down
8 changes: 8 additions & 0 deletions charts/lagoon-logs-concentrator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ service:
# Annotations to add to the service
annotations: {}

metrics:
enabled: true
service:
type: ClusterIP
port: 24231
# annotations to add to the metrics service
annotations: {}

serviceMonitor:
enabled: true

Expand Down
Loading