Files
2019-11-22 07:55:28 -08:00

41 lines
1.2 KiB
YAML

apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ .Values.agent.name }}
labels:
app: {{ template "weave-cloud.name" . }}
chart: {{ template "weave-cloud.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
minReadySeconds: 30
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
name: weave-agent
template:
metadata:
labels:
name: weave-agent
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ template "weave-cloud.serviceAccountName" . }}
{{- end }}
terminationGracePeriodSeconds: 30
containers:
- name: agent
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- -agent.report-errors=true
- -agent.poll-url=https://get.weave.works/k8s/agent.yaml?instanceID={{"{{.InstanceID}}"}}
- -wc.hostname=cloud.weave.works
- -wc.token=$(WEAVE_CLOUD_TOKEN)
env:
- name: WEAVE_CLOUD_TOKEN
valueFrom:
secretKeyRef:
key: token
name: weave-cloud