51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "teamcity.fullname" . }}-agent
|
|
labels:
|
|
{{- include "kubezero-lib.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.agentReplicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: teamcity-agent
|
|
app.kubernetes.io/name: teamcity
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: teamcity-agent
|
|
app.kubernetes.io/name: teamcity
|
|
spec:
|
|
# serviceAccountName: {{ include "teamcity.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: "{{ .Chart.Name }}-agent"
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 10 }}
|
|
image: "{{ .Values.image.agent.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
- name: SERVER_URL
|
|
value: "{{ include "teamcity.fullname" . }}:8111"
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 10 }}
|
|
volumeMounts:
|
|
- name: teamcity-config
|
|
mountPath: /data/teamcity_agent/conf
|
|
volumes:
|
|
- name: teamcity-config
|
|
emptyDir: {}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end -}}
|