You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
3.8 KiB
112 lines
3.8 KiB
3 years ago
|
{{- if .Values.abacus.relayer.enabled }}
|
||
3 years ago
|
apiVersion: apps/v1
|
||
|
kind: StatefulSet
|
||
|
metadata:
|
||
3 years ago
|
name: {{ include "abacus-agent.fullname" . }}-relayer
|
||
3 years ago
|
labels:
|
||
3 years ago
|
{{- include "abacus-agent.labels" . | nindent 4 }}
|
||
3 years ago
|
app.kubernetes.io/component: relayer
|
||
3 years ago
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
3 years ago
|
{{- include "abacus-agent.selectorLabels" . | nindent 6 }}
|
||
3 years ago
|
app.kubernetes.io/component: relayer
|
||
3 years ago
|
replicas: 1
|
||
3 years ago
|
serviceName: {{ include "abacus-agent.fullname" . }}-relayer
|
||
3 years ago
|
template:
|
||
|
metadata:
|
||
|
annotations:
|
||
3 years ago
|
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||
|
{{- with .Values.podAnnotations }}
|
||
3 years ago
|
{{- toYaml . | nindent 8 }}
|
||
3 years ago
|
{{- end }}
|
||
3 years ago
|
{{- with .Values.abacus.relayer.podAnnotations }}
|
||
3 years ago
|
{{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
3 years ago
|
labels:
|
||
3 years ago
|
{{- include "abacus-agent.labels" . | nindent 8 }}
|
||
3 years ago
|
app.kubernetes.io/component: relayer
|
||
|
{{- with .Values.podCommonLabels }}
|
||
|
{{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
3 years ago
|
{{- with .Values.abacus.relayer.podLabels }}
|
||
3 years ago
|
{{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
3 years ago
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
terminationGracePeriodSeconds: 10
|
||
3 years ago
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
3 years ago
|
containers:
|
||
|
- name: agent
|
||
|
securityContext:
|
||
3 years ago
|
{{- toYaml .Values.securityContext | nindent 10 }}
|
||
3 years ago
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
command: ["./relayer"]
|
||
3 years ago
|
envFrom:
|
||
|
- configMapRef:
|
||
3 years ago
|
name: {{ include "abacus-agent.fullname" . }}
|
||
3 years ago
|
- secretRef:
|
||
3 years ago
|
name: {{ include "abacus-agent.fullname" . }}-secret
|
||
3 years ago
|
- secretRef:
|
||
3 years ago
|
name: {{ include "abacus-agent.fullname" . }}-relayer-secret
|
||
3 years ago
|
env:
|
||
3 years ago
|
{{- if .Values.abacus.relayer.pollingInterval }}
|
||
3 years ago
|
- name: OPT_RELAYER_INTERVAL
|
||
3 years ago
|
value: {{ .Values.abacus.relayer.pollingInterval | quote }}
|
||
3 years ago
|
{{- end }}
|
||
3 years ago
|
{{- range .Values.abacus.relayer.transactionSigners }}
|
||
3 years ago
|
{{- if (hasKey . "aws") }}
|
||
3 years ago
|
- name: OPT_BASE_SIGNERS_{{ .name | upper }}_TYPE
|
||
|
value: "aws"
|
||
3 years ago
|
- name: OPT_BASE_SIGNERS_{{ .name | upper }}_ID
|
||
3 years ago
|
value: {{ .aws.keyId }}
|
||
3 years ago
|
- name: OPT_BASE_SIGNERS_{{ .name | upper }}_REGION
|
||
3 years ago
|
value: {{ .aws.region }}
|
||
3 years ago
|
{{- end }}
|
||
3 years ago
|
{{- end }}
|
||
3 years ago
|
{{- if .Values.abacus.tracing.uri }}
|
||
3 years ago
|
- name: OPT_BASE_TRACING_JAEGER_NAME
|
||
3 years ago
|
value: {{ include "abacus-agent.fullname" . }}-relayer
|
||
3 years ago
|
{{- end }}
|
||
|
resources:
|
||
3 years ago
|
{{- toYaml .Values.abacus.relayer.resources | nindent 10 }}
|
||
3 years ago
|
volumeMounts:
|
||
|
- name: state
|
||
3 years ago
|
mountPath: {{ .Values.abacus.dbPath }}
|
||
3 years ago
|
ports:
|
||
|
- name: metrics
|
||
3 years ago
|
containerPort: {{ .Values.abacus.metrics.port }}
|
||
3 years ago
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
volumeClaimTemplates:
|
||
|
- metadata:
|
||
|
name: state
|
||
|
spec:
|
||
3 years ago
|
storageClassName: {{ .Values.storage.storageClass }}
|
||
|
accessModes: [ {{ .Values.storage.accessModes }} ]
|
||
3 years ago
|
{{- if .Values.abacus.relayer.storage.snapshot.enabled }}
|
||
3 years ago
|
dataSource:
|
||
3 years ago
|
name: {{ .Values.abacus.relayer.storage.snapshot.name }}
|
||
3 years ago
|
kind: VolumeSnapshot
|
||
|
apiGroup: snapshot.storage.k8s.io
|
||
|
{{- end }}
|
||
3 years ago
|
resources:
|
||
|
requests:
|
||
3 years ago
|
storage: {{ .Values.abacus.relayer.storage.size }}
|
||
3 years ago
|
{{- end }}
|