You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/01 02:07:03 UTC

[GitHub] [apisix-helm-chart] tokers commented on a change in pull request #87: feat: add service monitor

tokers commented on a change in pull request #87:
URL: https://github.com/apache/apisix-helm-chart/pull/87#discussion_r642736172



##########
File path: charts/apisix-ingress-controller/templates/servicemonitor.yaml
##########
@@ -0,0 +1,24 @@
+{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.serviceMonitor.enabled }}

Review comment:
       Should add the Apache License Header.

##########
File path: charts/apisix-ingress-controller/templates/servicemonitor.yaml
##########
@@ -0,0 +1,24 @@
+{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+  name: {{ template "apisix-ingress-controller.fullname" . }}
+  {{- if .Values.serviceMonitor.namespace }}
+  namespace: {{ .Values.serviceMonitor.namespace }}
+  {{- end }}
+spec:
+  endpoints:
+  - targetPort: http

Review comment:
       Note in newer APISIX releases, APISIX using a separate port to expose Prometheus. So the `targetPort` might not be `http`, also, the Service definition should also be adjusted.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org