tracker/contrib/helm/chihaya/templates/deployment.yaml

42 lines
1.3 KiB
YAML
Raw Normal View History

2016-11-28 18:58:27 +01:00
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: {{ template "fullname" . }}
spec:
volumes:
- name: config
configMap:
name: {{ template "fullname" . }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "--config=/etc/chihaya/config.yaml"
ports:
- name: bittorrent-http
containerPort: {{ $v := .Values.config.chihaya.http.addr | split ":" }}{{ $v._1 }}
protocol: TCP
- name: bittorrent-udp
containerPort: {{ $v := .Values.config.chihaya.udp.addr | split ":" }}{{ $v._1 }}
protocol: UDP
- name: metrics
containerPort: {{ $v := .Values.config.chihaya.prometheus_addr | split ":" }}{{ $v._1 }}
livenessProbe:
httpGet:
path: /
port: {{ $v := .Values.config.chihaya.prometheus_addr | split ":" }}{{ $v._1 }}
volumeMounts:
- name: config
mountPath: /etc/chihaya
resources:
{{ toYaml .Values.resources | indent 10 }}