The home for Hyperlane core contracts, sdk packages, and other infrastructure
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.
hyperlane-monorepo/rust/helm/abacus-agent/templates/relayer-statefulset.yaml

102 lines
3.6 KiB

{{- if .Values.abacus.relayer.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "abacus-agent.fullname" . }}-relayer
labels:
{{- include "abacus-agent.labels" . | nindent 4 }}
app.kubernetes.io/component: relayer
spec:
selector:
matchLabels:
{{- include "abacus-agent.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: relayer
replicas: 1
serviceName: {{ include "abacus-agent.fullname" . }}-relayer
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.abacus.relayer.podAnnotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "abacus-agent.labels" . | nindent 8 }}
app.kubernetes.io/component: relayer
{{- with .Values.podCommonLabels }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.abacus.relayer.podLabels }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: agent
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["./relayer"]
envFrom:
- configMapRef:
name: {{ include "abacus-agent.fullname" . }}
- secretRef:
name: {{ include "abacus-agent.fullname" . }}-secret
- secretRef:
name: {{ include "abacus-agent.fullname" . }}-relayer-secret
env:
{{- include "abacus-agent.config-env-vars" (dict "config" .Values.abacus.relayer.config "agent_name" "relayer") | indent 10 }}
{{- range .Values.abacus.relayer.signers }}
{{- include "abacus-agent.config-env-vars" (dict "config" .keyConfig "agent_name" "base" "key_name_prefix" (printf "SIGNERS_%s_" (.name | upper))) | indent 10 }}
{{- end }}
{{- if .Values.abacus.tracing.uri }}
- name: OPT_BASE_TRACING_JAEGER_NAME
value: {{ include "abacus-agent.fullname" . }}-relayer
{{- end }}
resources:
{{- toYaml .Values.abacus.relayer.resources | nindent 10 }}
volumeMounts:
- name: state
mountPath: {{ .Values.abacus.dbPath }}
ports:
- name: metrics
containerPort: {{ .Values.abacus.metrics.port }}
{{- 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:
storageClassName: {{ .Values.storage.storageClass }}
accessModes: [ {{ .Values.storage.accessModes }} ]
{{- if .Values.abacus.relayer.storage.snapshot.enabled }}
dataSource:
name: {{ .Values.abacus.relayer.storage.snapshot.name }}
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
{{- end }}
resources:
requests:
storage: {{ .Values.abacus.relayer.storage.size }}
{{- end }}