Newer
Older
{{- if .Values.server.enabled }}
name: {{ include "woodpecker-ci.fullname" . }}-server
woodpecker.component: "server"
{{- include "woodpecker-ci.labels" . | nindent 4 }}
spec:
woodpecker.component: "server"
{{- include "woodpecker-ci.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
woodpecker.component: "server"
{{- include "woodpecker-ci.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "woodpecker-ci.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
env:
- name: WOODPECKER_HOST
value: {{ include "woodpecker-ci.serverHost" . | quote }}
- name: WOODPECKER_OPEN
value: {{ .Values.server.registration | quote }}
{{- range $key, $value := .Values.common.environment.variables }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.common.secrets }}
envFrom:
{{- range .Values.common.secrets}}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
protocol: TCP
- name: grpc
containerPort: 9000
volumeMounts:
- name: sqlite-volume
mountPath: /var/lib/woodpecker
volumes:
- name: sqlite-volume
persistentVolumeClaim:
claimName: {{ include "woodpecker-ci.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}