Skip to content

Commit

Permalink
chore: bump version of aergia and add metrics (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Dec 16, 2023
1 parent 22afea9 commit 7bc88cb
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 14 deletions.
19 changes: 8 additions & 11 deletions charts/aergia/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
apiVersion: v2
name: aergia
description:
A Helm chart for Kubernetes which installs Aergia, a controller that allows simple scaling from and to zero.
description: A Helm chart for Kubernetes which installs Aergia, a controller that allows simple scaling from and to zero.
home: https://github.com/amazeeio/charts
icon: https://raw.githubusercontent.com/amazeeio/charts/main/icon.png
maintainers:
- name: shreddedbacon
email: [email protected]
url: https://amazee.io
- name: shreddedbacon
email: [email protected]
url: https://amazee.io
kubeVersion: ">= 1.23.0-0"

type: application

version: 0.5.0
version: 0.5.1

appVersion: v0.3.0
appVersion: v0.3.1

annotations:
artifacthub.io/changes: |
- kind: changed
description: update aergia-controller appVersion to v0.3.0
description: update aergia-controller appVersion to v0.3.1
- kind: changed
description: added configmap for setting ip and useragent allow and block lists
- kind: changed
description: minimum kubernetes version to 1.23.0
description: added metrics endpoint
3 changes: 3 additions & 0 deletions charts/aergia/ci/linter-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ customSelectors:
clideployments: abc
templates:
enabled: true

metrics:
enabled: false
2 changes: 2 additions & 0 deletions charts/aergia/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ spec:
ports:
- containerPort: 5000
name: backend
- containerPort: 9912
name: metrics
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
20 changes: 19 additions & 1 deletion charts/aergia/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,22 @@ spec:
protocol: TCP
name: backend
selector:
{{- include "aergia.selectorLabels" . | nindent 4 }}
{{- include "aergia.selectorLabels" . | nindent 4 }}
{{- if .Values.metrics.enabled }}
---
kind: Service
apiVersion: v1
metadata:
name: {{ include "aergia.fullname" . }}-metrics
labels:
{{- include "aergia.labels" . | nindent 4 }}
spec:
type: {{ .Values.backend.service.type }}
ports:
- name: metrics
protocol: TCP
port: 9912
targetPort: metrics
selector:
{{- include "aergia.selectorLabels" . | nindent 4 }}
{{- end }}
19 changes: 17 additions & 2 deletions charts/aergia/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@

{{- if .Values.metrics.enabled }}
kind: ServiceMonitor
apiVersion: monitoring.coreos.com/v1
metadata:
name: {{ include "aergia.fullname" . }}-metrics
labels:
{{- include "aergia.labels" . | nindent 4 }}
spec:
endpoints:
- interval: {{ .Values.metrics.interval }}
port: metrics
selector:
matchLabels:
{{- include "aergia.labels" . | nindent 6 }}
{{- end }}
{{- if .Values.servicemonitor.enabled }}
---
kind: ServiceMonitor
apiVersion: monitoring.coreos.com/v1
metadata:
Expand All @@ -8,4 +23,4 @@ metadata:
name: {{ include "aergia.fullname" . }}-ingress-servicemonitor
spec:
{{- toYaml .Values.servicemonitor.spec | nindent 2 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/aergia/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ customSelectors:
# - "production"
# - "development"

metrics:
enabled: true
interval: 30s

servicemonitor:
enabled: false
spec:
Expand Down

0 comments on commit 7bc88cb

Please sign in to comment.