tracker/contrib/helm/chihaya/templates/service.yaml
2017-01-31 19:53:36 -05:00

27 lines
1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/"
prometheus.io/port: {{ $v := .Values.config.chihaya.prometheus_addr | split ":" }}{{ $v._1 | quote }}
spec:
type: {{ .Values.service.type }}
ports:
- name: bittorrent-http
port: {{ $v := .Values.config.chihaya.http.addr | split ":" }}{{ $v._1 }}
targetPort: {{ $v := .Values.config.chihaya.http.addr | split ":" }}{{ $v._1 }}
protocol: TCP
- name: bittorrent-udp
port: {{ $v := .Values.config.chihaya.udp.addr | split ":" }}{{ $v._1 }}
targetPort: {{ $v := .Values.config.chihaya.udp.addr | split ":" }}{{ $v._1 }}
protocol: UDP
- name: metrics
port: {{ $v := .Values.config.chihaya.prometheus_addr | split ":" }}{{ $v._1 }}
targetPort: {{ $v := .Values.config.chihaya.prometheus_addr | split ":" }}{{ $v._1 }}
protocol: TCP
selector:
app: {{ template "fullname" . }}