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: update storage-calcluator and add metrics monitor #640

Merged
merged 2 commits into from
Feb 27, 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: 4 additions & 0 deletions charts/lagoon-remote/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ dependencies:
# Valid supported kinds are added, changed, deprecated, removed, fixed and security
annotations:
artifacthub.io/changes: |
- kind: changed
description: update storage-calculator to v0.5.1
- kind: changed
description: added metrics to storage-calculator
- kind: removed
description: removed dioscuri subchart, activestandby is handled via a Lagoon task directly now
2 changes: 2 additions & 0 deletions charts/lagoon-remote/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ sshPortal:

storageCalculator:
enabled: true
serviceMonitor:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ spec:
command:
- /manager
args:
- "--metrics-bind-address=127.0.0.1:8080"
- "--metrics-bind-address=0.0.0.0:8080"
- "--prometheus-metrics=true"
{{- with .Values.storageCalculator.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
ports:
- name: metrics
containerPort: 8080
env:
{{- range $name, $value := .Values.storageCalculator.extraEnvs }}
- name: {{ .name }}
Expand Down
17 changes: 17 additions & 0 deletions charts/lagoon-remote/templates/storage-calculator.service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.storageCalculator.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "lagoon-remote.storageCalculator.fullname" . }}-metrics
labels:
metrics-only: "true"
{{- include "lagoon-remote.storageCalculator.labels" . | nindent 4 }}
spec:
type: {{ .Values.storageCalculator.metricsService.type }}
ports:
- port: {{ .Values.storageCalculator.metricsService.ports.metrics }}
targetPort: metrics
name: metrics
selector:
{{- include "lagoon-remote.storageCalculator.selectorLabels" . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if and .Values.storageCalculator.enabled .Values.storageCalculator.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "lagoon-remote.storageCalculator.fullname" . }}
labels:
{{- include "lagoon-remote.storageCalculator.labels" . | nindent 4 }}
spec:
endpoints:
- port: metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
metrics-only: "true"
{{- include "lagoon-remote.storageCalculator.selectorLabels" . | nindent 6 }}
{{- end }}
10 changes: 9 additions & 1 deletion charts/lagoon-remote/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,16 @@ storageCalculator:
# template
name:

metricsService:
type: ClusterIP
ports:
metrics: 9912

serviceMonitor:
enabled: true

image:
repository: uselagoon/remote-calculator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: v0.2.3
tag: v0.5.1
Loading