{{- if .Values.publicApi -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: kong-public-api-{{ .Release.Namespace }}
  namespace: openshift-monitoring
spec:
  namespaceSelector:
    matchNames:
      - {{ .Release.Namespace }}
  endpoints:
    - port: metrics
      interval: 30s
  selector:
    matchLabels:
      app: kong-prometheus-monitoring
{{- end }}
