Skip to content

Commit

Permalink
Add Namespace to Prometheus-Prefect-Exporter Chart (#310)
Browse files Browse the repository at this point in the history
* Add namespace option to prometheus metrics exporter

* Add chart repo to prometheus exporter linter
  • Loading branch information
NickJHoffmann authored Mar 12, 2024
1 parent 71130f6 commit 756c391
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/linters/prometheus-prefect-exporter-ct.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# See https://github.com/helm/chart-testing#configuration
charts:
- charts/prometheus-prefect-exporter
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 600s
namespace: default
release-label: prefect
6 changes: 6 additions & 0 deletions charts/prometheus-prefect-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ apiVersion: v2
appVersion: "latest"
description: A Helm chart to deploy Prometheus Prefect Exporter
home: https://github.com/PrefectHQ
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 2.16.1
keywords:
- prometheus-prefect-exporter
maintainers:
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-prefect-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Shoutout to @ialejandro for the original work on this chart!
| jimid27 | <[email protected]> | |
| parkedwards | <[email protected]> | |

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | common | 2.16.1 |

## Values

| Key | Type | Default | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-prefect-exporter/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-prefect-exporter/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
{{- with .Values.prometheusRule.additionalLabels -}}
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-prefect-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "prometheus-prefect-exporter.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "prometheus-prefect-exporter.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels:
{{- include "prometheus-prefect-exporter.labels" . | nindent 4 }}
spec:
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-prefect-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@
"title": "Affinity",
"description": "Affinity",
"form": true
},
"common": {
"type": "object",
"title": "Common",
"description": "common configuration. Not set by user but required as common vars are passed to all manifests.",
"form": true
}
}
}

0 comments on commit 756c391

Please sign in to comment.