{{- if .Values.hyperlane.scraper.enabled }} apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "agent-common.fullname" . }}-scraper3 labels: {{- include "agent-common.labels" . | nindent 4 }} app.kubernetes.io/component: scraper3 spec: selector: matchLabels: {{- include "agent-common.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: scraper3 replicas: 1 serviceName: {{ include "agent-common.fullname" . }}-scraper3 template: metadata: annotations: checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.hyperlane.scraper.podAnnotations }} {{ toYaml . | nindent 8 }} {{- end }} labels: {{- include "agent-common.labels" . | nindent 8 }} app.kubernetes.io/component: scraper3 {{- with .Values.podCommonLabels }} {{ toYaml . | nindent 8 }} {{- end }} {{- with .Values.hyperlane.scraper.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: ["./scraper"] envFrom: - configMapRef: name: {{ include "agent-common.fullname" . }} - secretRef: name: {{ include "agent-common.fullname" . }}-secret - secretRef: name: {{ include "agent-common.fullname" . }}-scraper3-secret env: {{- $scraperChainNames := list }} {{- range .Values.hyperlane.chains }} {{- if not .disabled }} {{- $scraperChainNames = append $scraperChainNames .name }} {{- end }} {{- end }} - name: HYP_SCRAPER_CHAINSTOSCRAPE value: {{ $scraperChainNames | join "," }} {{- if .Values.hyperlane.tracing.uri }} - name: HYP_BASE_TRACING_JAEGER_NAME value: {{ include "agent-common.fullname" . }}-scraper3 {{- end }} resources: {{- toYaml .Values.hyperlane.scraper.resources | nindent 10 }} ports: - name: metrics containerPort: {{ .Values.hyperlane.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 }} {{- end }}