Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ spec:
ports:
- name: http
containerPort: 8080
- name: http-metrics
containerPort: 9100
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: 9100
targetPort: http-metrics
protocol: TCP
name: http-metrics
selector:
{{- include "cap-app-proxy.selectorLabels" . | nindent 4 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- define "cap-app-proxy.resources.serviceMonitor" }}
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ default (include "cap-app-proxy.fullname" .) .Values.serviceMonitor.name }}
labels:
{{- include "cap-app-proxy.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "cap-app-proxy.selectorLabels" . | nindent 6 }}
endpoints:
- port: http-metrics
interval: 30s
path: /metrics
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- $appProxyContext := deepCopy . }}
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
{{- include "cap-app-proxy.resources.serviceMonitor" $appProxyContext }}
5 changes: 5 additions & 0 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,11 @@ app-proxy:
annotations: {}
name: "cap-app-proxy"

serviceMonitor:
enabled: false
name: ''
labels: {}

podAnnotations: {}

podLabels: {}
Expand Down