apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "besu.fullname" . }} labels: {{- include "besu.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "besu.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "besu.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "besu.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /bin/sh - -c - | besu --data-path={{ .Values.config.dataDir }} \ --network={{ .Values.config.network }} \ --rpc-http-enabled={{ .Values.config.rpcHttpEnabled }} \ --rpc-http-host={{ .Values.config.rpcHttpHost }} \ --rpc-http-port={{ .Values.config.rpcHttpPort }} \ --rpc-http-apis={{ join "," .Values.config.rpcHttpApis }} \ --rpc-ws-enabled={{ .Values.config.rpcWsEnabled }} \ --rpc-ws-host={{ .Values.config.rpcWsHost }} \ --rpc-ws-port={{ .Values.config.rpcWsPort }} \ --p2p-enabled={{ .Values.config.p2pEnabled }} \ --p2p-port={{ .Values.config.p2pPort }} \ --metrics-enabled={{ .Values.config.metricsEnabled }} \ --metrics-port={{ .Values.config.metricsPort }} ports: - name: http-rpc containerPort: {{ .Values.service.rpcPort }} protocol: TCP - name: ws-rpc containerPort: {{ .Values.service.wsPort }} protocol: TCP - name: p2p containerPort: {{ .Values.service.p2pPort }} protocol: TCP - name: metrics containerPort: {{ .Values.config.metricsPort }} protocol: TCP livenessProbe: httpGet: path: /liveness port: http-rpc initialDelaySeconds: 60 periodSeconds: 30 readinessProbe: httpGet: path: /readiness port: http-rpc initialDelaySeconds: 30 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: data mountPath: {{ .Values.config.dataDir }} volumes: - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: claimName: {{ include "besu.fullname" . }}-data {{- else }} emptyDir: {} {{- 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 }}