{{- 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: {{- 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 }} - name: relayer-configmap mountPath: /relayer-configmap ports: - name: metrics containerPort: {{ .Values.hyperlane.metrics.port }} 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 }}