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"
|
2017-06-06 04:37:35 +02:00
|
|
|
- "--debug"
|
|
|
|
- "--json"
|
2016-11-28 18:58:27 +01:00
|
|
|
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 }}
|