-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix long validator name for polygonzkevmtestnet (#2832)
### Description * polygonzkevmtestnet's validator name was too long because of the `controller-revision-hash` label, see kubernetes/kubernetes#64023 * Seeks to preserve the `-validator` suffix in the name, but truncates the earlier bit - in practice this results in validator pods like `polygonzkevmtestnet-validator-hyperlane-ag-validator-0`. This felt like the most backward compatible change -- of course we could consider trying to get a name like `polygonzkevmtestnet-hyperlane-agent-validator-0` but this would break backward compatibility more dramatically because we'd need to change all the other validator pods. Imo we should just really avoid long chain names or consider a more breaking change to our infra ### Drive-by changes n/a ### Related issues n/a ### Backward compatibility Mostly ### Testing Deployed
- Loading branch information
Showing
4 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters