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

minor helm chart improvements #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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 }}
Copy link
Author

Choose a reason for hiding this comment

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

should this be using the "prometheus-pushgateway.name"} template?

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