mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-05 08:27:01 +00:00
128 lines
4.3 KiB
YAML
128 lines
4.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "baserow.fullname" . }}
|
|
namespace: {{ include "baserow.namespace" . }}
|
|
labels:
|
|
{{- include "baserow.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "baserow.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
{{- with .Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "baserow.selectorLabels" . | nindent 8 }}
|
|
{{- if .Values.securityContext.enabled }}
|
|
{{- with .Values.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ include "baserow.serviceAccountName" . }}
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: {{ .Values.priorityClassName }}
|
|
{{- end -}}
|
|
{{- if or .Values.imagePullSecrets .Values.global.baserow.imagePullSecrets }}
|
|
imagePullSecrets: {{ include "baserow.imagePullSecrets" . }}
|
|
{{- end }}
|
|
{{- with .Values.volumes }}
|
|
volumes:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ include "baserow.fullname" . }}
|
|
image: {{ include "baserow.image" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
workingDir: {{ .Values.workingDir }}
|
|
{{- with .Values.args }}
|
|
args:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.service.create }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.targetPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
{{- if .Values.readinessProbe.enabled }}
|
|
{{- with .Values.livenessProbe }}
|
|
livenessProbe:
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.readinessProbe.enabled }}
|
|
{{- with .Values.readinessProbe }}
|
|
readinessProbe:
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.containerSecurityContext.enabled }}
|
|
{{- with .Values.containerSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.resources }}
|
|
resources: {{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.volumeMounts }}
|
|
volumeMounts:
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
envFrom:
|
|
{{ include "baserow.envFrom" . | nindent 12 }}
|
|
env:
|
|
- name: K8S_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: K8S_POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: K8S_POD_UID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: K8S_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: OTEL_RESOURCE_ATTRIBUTES
|
|
value: "k8s.container.name=$(K8S_POD_NAME),k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME),k8s.pod.uid=$(K8S_POD_UID),k8s.namespace.name=$(K8S_POD_NAMESPACE),k8s.resource.type=container"
|
|
- name: HOST_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.hostIP
|
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
|
value: "http://$(HOST_IP):4318"
|
|
{{- range .Values.extraEnv }}
|
|
{{- if and (.name) (.value) }}
|
|
- name: {{ .name | quote }}
|
|
value: {{ .value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|