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

Fix several bugs in servicemonitor #690

Merged
merged 1 commit into from
Dec 16, 2021
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
2 changes: 1 addition & 1 deletion helm/sealed-secrets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ maintainers:
email: mmikulicic@gmail.com
name: sealed-secrets
type: application
version: 2.0.0
version: 2.0.1
3 changes: 2 additions & 1 deletion helm/sealed-secrets/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
- name: http
port: {{ .Values.service.port }}
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks kubeseal until #648 is merged.

targetPort: http
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
nodePort: {{ .Values.service.nodePort }}
Expand Down
10 changes: 5 additions & 5 deletions helm/sealed-secrets/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "sealed-secrets.fullname" . }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- else }}
namespace: {{ include "sealed-secrets.namespace" . }}
{{- end }}
labels: {{- include "sealed-secrets.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.labels }}
{{- include "sealed-secrets.render" ( dict "value" .Values.serviceMonitor.labels "context" $) | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.labels }}

Choose a reason for hiding this comment

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

This is not documented in values.yaml or the README :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Done in #635.

{{- include "sealed-secrets.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }}
{{- end }}
spec:
endpoints:
- honorLabels: true
port: {{ .Values.service.port }}
port: http
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
Expand Down