-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't truncate names too arbitrarily
The problem with selecting the last 63 characters of the image name for a k8s label is that there's no guarantee that the result will respect the other contraints. In particular, us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101411.4-rc.4 yields .pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101411.4-rc.4 which is invalid because it starts with a dot. So the net outcome is that valid images fail to deploy because of an invalid attached label. This change select the longest prefix available while breaking only at / So for the image above, the label would be oplabs-tools-artifacts/images/op-geth:v1.101411.4-rc.4
- Loading branch information
Showing
8 changed files
with
44 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,3 @@ VOLUME_SIZE = { | |
"hildr_volume_size": 1000, # 1GB | ||
}, | ||
} | ||
|
||
MAX_LABEL_LENGTH = 63 |
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