Created
January 7, 2019 13:56
-
-
Save mdesanti/fdf8cbdb498b48e5aef6e18e8ad54a04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ .Release.Name }} | |
labels: | |
app: {{ template "podinfo.name" . }} | |
chart: {{ template "podinfo.chart" . }} | |
release: {{ .Release.Name }} | |
heritage: {{ .Release.Service }} | |
serviceName: {{ template "podinfo.name" . }} | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.externalPort }} | |
targetPort: http | |
protocol: TCP | |
name: http | |
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} | |
nodePort: {{ .Values.service.nodePort }} | |
{{- end }} | |
selector: | |
app: {{ template "podinfo.name" . }} | |
release: {{ .Release.Name }} | |
--- | |
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
name: {{ .Release.Name }} | |
labels: | |
release: prometheus-operator | |
app: prometheus-operator | |
spec: | |
selector: | |
matchLabels: | |
serviceName: {{ template "podinfo.name" . }} | |
endpoints: | |
- port: http | |
interval: 5s | |
path: /metrics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment