Skip to content

Commit

Permalink
minor helm chaart improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Bansal <[email protected]>
  • Loading branch information
prnvbn committed Sep 21, 2024
1 parent 1d246ea commit 6b2dd23
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prom-aggregation-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: prom-aggregation-gateway
version: 0.6.1
version: 0.6.2
home: https://github.com/zapier/prom-aggregation-gateway
maintainers:
- name: djeebus
Expand Down
4 changes: 4 additions & 0 deletions charts/prom-aggregation-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "prom-aggregation-gateway.namespace" -}}
{{- default .Release.Namespace .Values.namespaceOverride }}
{{- end }}

{{- define "prom-aggregation-gateway.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end -}}
Expand Down
1 change: 1 addition & 0 deletions charts/prom-aggregation-gateway/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: {{ .Values.controller.type }}
metadata:
name: {{ .Release.Name }}
namespace: {{ template "prometheus-pushgateway.namespace" . }}
labels:
{{- include "prom-aggregation-gateway.labels" . | nindent 4 }}
{{- if .Values.controller.labels }}
Expand Down
1 change: 1 addition & 0 deletions charts/prom-aggregation-gateway/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Release.Name }}-metrics
namespace: {{ template "prometheus-pushgateway.namespace" . }}
{{- with .Values.podMonitor.additionalLabels }}
labels:
{{- toYaml . | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/prom-aggregation-gateway/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
namespace: {{ template "prometheus-pushgateway.namespace" . }}
labels:
{{- include "prom-aggregation-gateway.selectorLabels" . | nindent 4 }}
{{- with .Values.service.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: {{ .Release.Name }}
namespace: {{ template "prometheus-pushgateway.namespace" . }}
{{- with .Values.serviceMonitor.additionalLabels }}
labels:
{{- toYaml . | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/prom-aggregation-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
"nameOverride": {
"type": "string"
},
"namespaceOverride": {
"type": "string"
},
"service": {
"type": "object",
"additionalProperties": false,
Expand Down

0 comments on commit 6b2dd23

Please sign in to comment.