Skip to content

Commit

Permalink
Merge branch 'v3' into verify-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Oct 23, 2023
2 parents 0d1661e + b71050a commit edff603
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions rust/helm/hyperlane-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{/*
We truncate at 63 chars - (11 + (len $suffix)) because the controller-revision-hash label adds an 11 character suffix
to the pod name, and we want the -validator suffix to still be present, but are happy to truncate the preceding name.
See https://github.com/kubernetes/kubernetes/issues/64023 for controller-revision-hash details.
*/}}
{{- define "validator.fullname" -}}
{{- $suffix := "-validator" }}
{{- include "agent-common.fullname" . | trunc (int (sub 63 (add 11 (len $suffix)))) | trimSuffix "-" }}{{ print $suffix }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "agent-common.fullname" . }}-validator
name: {{ include "validator.fullname" . }}
labels:
{{- include "agent-common.labels" . | nindent 4 }}
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ include "agent-common.fullname" . }}-validator-external-secret
name: {{ include "validator.fullname" . }}-external-secret
labels:
{{- include "agent-common.labels" . | nindent 4 }}
annotations:
Expand All @@ -14,7 +14,7 @@ spec:
refreshInterval: "1h"
# The secret that will be created
target:
name: {{ include "agent-common.fullname" . }}-validator-secret
name: {{ include "validator.fullname" . }}-secret
template:
type: Opaque
metadata:
Expand Down
10 changes: 5 additions & 5 deletions rust/helm/hyperlane-agent/templates/validator-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "agent-common.fullname" . }}-validator
name: {{ include "validator.fullname" . }}
labels:
{{- include "agent-common.labels" . | nindent 4 }}
app.kubernetes.io/component: validator
Expand All @@ -12,7 +12,7 @@ spec:
{{- include "agent-common.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: validator
replicas: {{ len .Values.hyperlane.validator.configs }}
serviceName: {{ include "agent-common.fullname" . }}-validator
serviceName: {{ include "validator.fullname" . }}
template:
metadata:
annotations:
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
- secretRef:
name: {{ include "agent-common.fullname" . }}-secret
- secretRef:
name: {{ include "agent-common.fullname" . }}-validator-secret
name: {{ include "validator.fullname" . }}-secret
env:
- name: REPLICA_NAME
valueFrom:
Expand All @@ -79,10 +79,10 @@ spec:
volumes:
- name: config-env-vars
configMap:
name: {{ include "agent-common.fullname" . }}-validator
name: {{ include "validator.fullname" . }}
- name: secret-env-vars
secret:
secretName: {{ include "agent-common.fullname" . }}-validator-secret
secretName: {{ include "validator.fullname" . }}-secret
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit edff603

Please sign in to comment.