-
Notifications
You must be signed in to change notification settings - Fork 25
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
[VC-34401] Add metrics settings to the Helm chart #544
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generated by |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Naming the port is not strictly necessary, but adding it allows the PodMonitor (if enabled) to use the named port "http-metrics" rather than the port number. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The latest thinking is that we only need to provide a PodMonitor, not a ServiceMonitor.
The template is copied and adapted from cert-manager: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I was about to ask myself "what's the recommended choice: service monitor or pod monitor", and I read your comment. Nice proactive self-reviewing! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if and .Values.metrics.enabled .Values.metrics.podmonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: {{ include "venafi-kubernetes-agent.fullname" . }} | ||
{{- if .Values.metrics.podmonitor.namespace }} | ||
namespace: {{ .Values.metrics.podmonitor.namespace }} | ||
{{- else }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
{{- end }} | ||
labels: | ||
{{- include "venafi-kubernetes-agent.labels" . | nindent 4 }} | ||
prometheus: {{ .Values.metrics.podmonitor.prometheusInstance }} | ||
{{- with .Values.metrics.podmonitor.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.metrics.podmonitor.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
jobLabel: {{ include "venafi-kubernetes-agent.fullname" . }} | ||
selector: | ||
matchLabels: | ||
{{- include "venafi-kubernetes-agent.selectorLabels" . | nindent 6 }} | ||
{{- if .Values.metrics.podmonitor.namespace }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace | quote }} | ||
{{- end }} | ||
podMetricsEndpoints: | ||
- port: http-metrics | ||
path: /metrics | ||
interval: {{ .Values.metrics.podmonitor.interval }} | ||
scrapeTimeout: {{ .Values.metrics.podmonitor.scrapeTimeout }} | ||
honorLabels: {{ .Values.metrics.podmonitor.honorLabels }} | ||
{{- with .Values.metrics.podmonitor.endpointAdditionalProperties }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: what's "jscp"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it is "Jetstack Secure Control Plane". I copied that line from the metric description: