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/main/helm/hyperlane-agent/templates/relayer-statefulset.yaml

104 lines
3.6 KiB

{{- if .Values.hyperlane.relayer.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "agent-common.fullname" . }}-relayer
labels:
{{- include "agent-common.labels" . | nindent 4 }}
app.kubernetes.io/component: relayer
spec:
selector:
matchLabels:
{{- include "agent-common.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: relayer
replicas: 1
serviceName: {{ include "agent-common.fullname" . }}-relayer
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/relayer-configmap: {{ include (print $.Template.BasePath "/relayer-configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hyperlane.relayer.podAnnotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "agent-common.labels" . | nindent 8 }}
app.kubernetes.io/component: relayer
{{- with .Values.podCommonLabels }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hyperlane.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 "agent-common.fullname" . }}
- secretRef:
name: {{ include "agent-common.fullname" . }}-secret
- secretRef:
name: {{ include "agent-common.fullname" . }}-relayer-secret
env:
feat: relayer app contexts use warp route artifacts from the registry (#4845) ### Description This PR aims to solve 2 problems: forgetting to add warp routes as app contexts in the relayer, and deduplicating artifacts that live in infra and the registry - Removes a bunch of the duplicated warp route artifacts in infra, in favor of getting them from the registry - Now all WarpRouteIds defined in infra will be auto-populated into the mainnet3 relayers as app contexts, with the label as the warp route ID - This significantly increased the size of the metric app context configuration, which was previously supplied as an env var to the relayers. This caused the env var size limit to be hit. As a workaround, larger configuration strings are now moved into a configmap that will be read in as a JSON by the relayer. I intentionally kept some of the configs as env vars, e.g. the relayChains, because this is much more ergonomic to change on the fly and many of us have operational muscle memory around this that I didn't want to break. - Note one consequence of this is that merkly's ETH app is prone to running out of ETH and causing prep queues to rise. Because of this, I'll ignore merkly eth from our high urgency alert ### Drive-by changes - There are a few places we were whitelisting warp routes in the gas config that I've now removed. From what I can tell none of these are necessary anymore as they were intended to be temporary workarounds. - Updated the addresses for merkly from here https://minter.merkly.com/hyperlane/docs ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
2 weeks ago
{{- include "agent-common.config-env-vars" (dict "config" .Values.hyperlane.relayer.envConfig) | nindent 10 }}
- name: CONFIG_FILES
value: "/relayer-configmap/relayer-config.json"
resources:
{{- toYaml .Values.hyperlane.relayer.resources | nindent 10 }}
volumeMounts:
- name: state
mountPath: {{ .Values.hyperlane.dbPath }}
feat: relayer app contexts use warp route artifacts from the registry (#4845) ### Description This PR aims to solve 2 problems: forgetting to add warp routes as app contexts in the relayer, and deduplicating artifacts that live in infra and the registry - Removes a bunch of the duplicated warp route artifacts in infra, in favor of getting them from the registry - Now all WarpRouteIds defined in infra will be auto-populated into the mainnet3 relayers as app contexts, with the label as the warp route ID - This significantly increased the size of the metric app context configuration, which was previously supplied as an env var to the relayers. This caused the env var size limit to be hit. As a workaround, larger configuration strings are now moved into a configmap that will be read in as a JSON by the relayer. I intentionally kept some of the configs as env vars, e.g. the relayChains, because this is much more ergonomic to change on the fly and many of us have operational muscle memory around this that I didn't want to break. - Note one consequence of this is that merkly's ETH app is prone to running out of ETH and causing prep queues to rise. Because of this, I'll ignore merkly eth from our high urgency alert ### Drive-by changes - There are a few places we were whitelisting warp routes in the gas config that I've now removed. From what I can tell none of these are necessary anymore as they were intended to be temporary workarounds. - Updated the addresses for merkly from here https://minter.merkly.com/hyperlane/docs ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
2 weeks ago
- name: relayer-configmap
mountPath: /relayer-configmap
ports:
- name: metrics
containerPort: {{ .Values.hyperlane.metrics.port }}
feat: relayer app contexts use warp route artifacts from the registry (#4845) ### Description This PR aims to solve 2 problems: forgetting to add warp routes as app contexts in the relayer, and deduplicating artifacts that live in infra and the registry - Removes a bunch of the duplicated warp route artifacts in infra, in favor of getting them from the registry - Now all WarpRouteIds defined in infra will be auto-populated into the mainnet3 relayers as app contexts, with the label as the warp route ID - This significantly increased the size of the metric app context configuration, which was previously supplied as an env var to the relayers. This caused the env var size limit to be hit. As a workaround, larger configuration strings are now moved into a configmap that will be read in as a JSON by the relayer. I intentionally kept some of the configs as env vars, e.g. the relayChains, because this is much more ergonomic to change on the fly and many of us have operational muscle memory around this that I didn't want to break. - Note one consequence of this is that merkly's ETH app is prone to running out of ETH and causing prep queues to rise. Because of this, I'll ignore merkly eth from our high urgency alert ### Drive-by changes - There are a few places we were whitelisting warp routes in the gas config that I've now removed. From what I can tell none of these are necessary anymore as they were intended to be temporary workarounds. - Updated the addresses for merkly from here https://minter.merkly.com/hyperlane/docs ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
2 weeks ago
volumes:
- name: relayer-configmap
configMap:
name: {{ include "agent-common.fullname" . }}-relayer-configmap
{{- 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.hyperlane.relayer.storage.snapshot.enabled }}
dataSource:
name: {{ .Values.hyperlane.relayer.storage.snapshot.name }}
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
{{- end }}
resources:
requests:
storage: {{ .Values.hyperlane.relayer.storage.size }}
{{- end }}