Skip to content
Permalink
53db5d63ae
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
99 lines (99 sloc) 3.32 KB
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "drone.fullname" . }}
labels:
{{- include "drone.labels" . | nindent 4 }}
spec:
{{/* Drone server is a singleton. */}}
replicas: 1
selector:
matchLabels:
{{- include "drone.selectorLabels" . | nindent 6 }}
strategy:
{{ toYaml .Values.updateStrategy | indent 4 }}
template:
metadata:
labels:
{{- include "drone.selectorLabels" . | nindent 8 }}
annotations:
checksum/secrets: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
serviceAccountName: {{ include "drone.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: server
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ include "drone.fullname" . }}
{{- range .Values.extraSecretNamesForEnvFrom }}
- secretRef:
name: {{ . }}
{{- end }}
volumeMounts:
- name: storage-volume
mountPath: {{ .Values.persistentVolume.mountPath }}
subPath: "{{ .Values.persistentVolume.subPath }}"
{{- with .Values.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 6 }}
{{- end }}
volumes:
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | nindent 8}}
{{- end }}
{{/* This is where Drone stashes any data it needs to persist. If you use SQLite for your DB, state will go here. */}}
- name: storage-volume
{{- if .Values.persistentVolume.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistentVolume.existingClaim }}{{ .Values.persistentVolume.existingClaim }}{{- else }}{{ template "drone.fullname" . }}{{- end }}
{{- else }}
emptyDir:
{{- if .Values.emptyDir.sizeLimit }}
sizeLimit: {{ .Values.emptyDir.sizeLimit }}
{{- else }}
{}
{{- end -}}
{{- end -}}