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.
118 lines
4.2 KiB
118 lines
4.2 KiB
2 years ago
|
{{- if .Values.hyperlane.validator.enabled }}
|
||
3 years ago
|
apiVersion: apps/v1
|
||
|
kind: StatefulSet
|
||
|
metadata:
|
||
2 years ago
|
name: {{ include "agent-common.fullname" . }}-validator
|
||
3 years ago
|
labels:
|
||
2 years ago
|
{{- include "agent-common.labels" . | nindent 4 }}
|
||
3 years ago
|
app.kubernetes.io/component: validator
|
||
3 years ago
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
2 years ago
|
{{- include "agent-common.selectorLabels" . | nindent 6 }}
|
||
3 years ago
|
app.kubernetes.io/component: validator
|
||
2 years ago
|
replicas: {{ len .Values.hyperlane.validator.configs }}
|
||
2 years ago
|
serviceName: {{ include "agent-common.fullname" . }}-validator
|
||
3 years ago
|
template:
|
||
|
metadata:
|
||
|
annotations:
|
||
3 years ago
|
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||
3 years ago
|
checksum/validator-configmap: {{ include (print $.Template.BasePath "/validator-configmap.yaml") . | sha256sum }}
|
||
3 years ago
|
{{- with .Values.podAnnotations }}
|
||
3 years ago
|
{{- toYaml . | nindent 8 }}
|
||
3 years ago
|
{{- end }}
|
||
2 years ago
|
{{- with .Values.hyperlane.validator.podAnnotations }}
|
||
3 years ago
|
{{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
3 years ago
|
labels:
|
||
2 years ago
|
{{- include "agent-common.labels" . | nindent 8 }}
|
||
3 years ago
|
app.kubernetes.io/component: validator
|
||
3 years ago
|
{{- with .Values.podCommonLabels }}
|
||
|
{{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
2 years ago
|
{{- with .Values.hyperlane.validator.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 }}
|
||
3 years ago
|
command: ["/bin/sh", "-c"]
|
||
|
args:
|
||
|
- |
|
||
|
RID=$(echo $REPLICA_NAME | grep -Eo '[0-9]+$')
|
||
|
env $(cat /config-env-vars/validator-$RID.env /secret-env-vars/validator-$RID.env | xargs) ./validator
|
||
3 years ago
|
envFrom:
|
||
|
- configMapRef:
|
||
2 years ago
|
name: {{ include "agent-common.fullname" . }}
|
||
3 years ago
|
- secretRef:
|
||
2 years ago
|
name: {{ include "agent-common.fullname" . }}-secret
|
||
3 years ago
|
- secretRef:
|
||
2 years ago
|
name: {{ include "agent-common.fullname" . }}-validator-secret
|
||
3 years ago
|
env:
|
||
|
- name: REPLICA_NAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.name
|
||
2 years ago
|
{{- if .Values.hyperlane.tracing.uri }}
|
||
2 years ago
|
- name: HYP_BASE_TRACING_JAEGER_NAME
|
||
2 years ago
|
value: {{ include "agent-common.fullname" . }}-validator
|
||
3 years ago
|
{{- end }}
|
||
|
resources:
|
||
2 years ago
|
{{- toYaml .Values.hyperlane.validator.resources | nindent 10 }}
|
||
3 years ago
|
volumeMounts:
|
||
|
- name: state
|
||
2 years ago
|
mountPath: {{ .Values.hyperlane.dbPath }}
|
||
3 years ago
|
- name: config-env-vars
|
||
|
mountPath: /config-env-vars
|
||
|
- name: secret-env-vars
|
||
|
mountPath: /secret-env-vars
|
||
3 years ago
|
ports:
|
||
|
- name: metrics
|
||
2 years ago
|
containerPort: {{ .Values.hyperlane.metrics.port }}
|
||
3 years ago
|
volumes:
|
||
|
- name: config-env-vars
|
||
|
configMap:
|
||
2 years ago
|
name: {{ include "agent-common.fullname" . }}-validator
|
||
3 years ago
|
- name: secret-env-vars
|
||
|
secret:
|
||
2 years ago
|
secretName: {{ include "agent-common.fullname" . }}-validator-secret
|
||
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 }} ]
|
||
2 years ago
|
{{- if .Values.hyperlane.validator.storage.snapshot.enabled }}
|
||
3 years ago
|
dataSource:
|
||
2 years ago
|
name: {{ .Values.hyperlane.validator.storage.snapshot.name }}
|
||
3 years ago
|
kind: VolumeSnapshot
|
||
|
apiGroup: snapshot.storage.k8s.io
|
||
|
{{- end }}
|
||
3 years ago
|
resources:
|
||
|
requests:
|
||
2 years ago
|
storage: {{ .Values.hyperlane.validator.storage.size }}
|
||
3 years ago
|
{{- end }}
|