Skip to content

Commit bf092a5

Browse files
authored
Merge branch 'main' into replace-deprecated-gomock-package
2 parents 8805b1c + 70ea129 commit bf092a5

File tree

3 files changed

+79
-2
lines changed

3 files changed

+79
-2
lines changed

deploy/manifests/controller/helm/retina/templates/daemonset.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ spec:
5858
{{- end}}
5959
{{- end}}
6060
ports:
61-
- containerPort: {{ .Values.retinaPort }}
61+
- name: retina
62+
containerPort: {{ .Values.retinaPort }}
6263
resources:
6364
limits:
6465
memory: {{ .Values.resources.limits.memory | quote }}
@@ -152,7 +153,8 @@ spec:
152153
- name: retinawin
153154
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
154155
ports:
155-
- containerPort: {{ .Values.retinaPort }}
156+
- name: retina
157+
containerPort: {{ .Values.retinaPort }}
156158
command:
157159
- powershell.exe
158160
- -command
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{- if .Values.metrics.podMonitor.enabled }}
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: PodMonitor
4+
metadata:
5+
name: {{ include "retina.fullname" . }}
6+
namespace: {{ ternary .Values.metrics.podMonitor.namespace .Values.namespace (not (empty .Values.metrics.podMonitor.namespace)) }}
7+
labels:
8+
k8s-app: {{ include "retina.name" . }}
9+
{{- if .Values.metrics.podMonitor.additionalLabels }}
10+
{{- .Values.metrics.podMonitor.additionalLabels | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
podMetricsEndpoints:
14+
- port: retina
15+
path: /metrics
16+
{{- if .Values.metrics.podMonitor.interval }}
17+
interval: {{ .Values.metrics.podMonitor.interval }}
18+
{{- end }}
19+
{{- if .Values.metrics.podMonitor.scrapeTimeout }}
20+
scrapeTimeout: {{ .Values.metrics.podMonitor.scrapeTimeout }}
21+
{{- end }}
22+
{{- if .Values.metrics.podMonitor.scheme }}
23+
scheme: {{ .Values.metrics.podMonitor.scheme }}
24+
{{- end }}
25+
{{- if .Values.metrics.podMonitor.tlsConfig }}
26+
tlsConfig: {{- .Values.metrics.podMonitor.tlsConfig | nindent 8 }}
27+
{{- end }}
28+
{{- if .Values.metrics.podMonitor.relabelings }}
29+
relabelings:
30+
{{- .Values.metrics.podMonitor.relabelings | nindent 8 }}
31+
{{- end }}
32+
namespaceSelector:
33+
matchNames:
34+
- {{ .Values.namespace }}
35+
selector:
36+
matchLabels:
37+
app: {{ include "retina.name" . }}
38+
{{- end }}

deploy/manifests/controller/helm/retina/values.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,40 @@ nodeSelector: {}
122122
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
123123
##
124124
tolerations: []
125+
126+
metrics:
127+
## Prometheus Service Monitor
128+
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
129+
##
130+
podMonitor:
131+
## @param metrics.podMonitor.enabled Create PodMonitor Resource for scraping metrics using PrometheusOperator
132+
##
133+
enabled: false
134+
## @param metrics.podMonitor.namespace Namespace in which the PodMonitor should be created
135+
##
136+
namespace: ~
137+
## @param metrics.podMonitor.interval Specify the interval at which metrics should be scraped
138+
##
139+
interval: 30s
140+
## @param metrics.podMonitor.scrapeTimeout Specify the timeout after which the scrape is ended
141+
##
142+
scrapeTimeout: 30s
143+
## @param metrics.podMonitor.additionalLabels [object] Additional labels that can be used so PodMonitors will be discovered by Prometheus
144+
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
145+
##
146+
additionalLabels: {}
147+
## @param metrics.podMonitor.scheme Scheme to use for scraping
148+
##
149+
scheme: http
150+
## @param metrics.podMonitor.tlsConfig [object] TLS configuration used for scrape endpoints used by Prometheus
151+
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
152+
## e.g:
153+
## tlsConfig:
154+
## ca:
155+
## secret:
156+
## name: existingSecretName
157+
##
158+
tlsConfig: {}
159+
## @param metrics.podMonitor.relabelings [array] Prometheus relabeling rules
160+
##
161+
relabelings: []

0 commit comments

Comments
 (0)