-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remote_tag can be used as image ref (#103)
I would like to suggest some enhancements regarding `oci_push` image referencing and replacements in chart files. Sometimes it's more convenient to see meaningful Docker image tag in k8s specs instead of sha256 (otherwise we didn't add these tags to Docker images). In our case these tags are available from `oci_push` target (along with repository file). So we can try to use them in chart files replacements. Besides that a lot of existing charts have separated settings for image repository and image tag. ``` image: repository: docker.io/busybox tag: v1.2.3 ``` So it would be useful to add separate replacements for these parameters so that people don't need to change structure of theirs charts in order to make them correctly packaged by `rules_helm`. Moreover, there are charts exist that use `image.tag` as a value for labels and annotations. The proposed solution works as follows: * if there is remote tags file in `oci_push` target, these information is included into `ImageInfo` * in a replacement group corresponding to `oci_push` target added next replacements: * `[@@]@<target name>.digest` * `[@@]@<target name>.repository` * `[@@]@<target name>.tag` * besides that in case of single `oci_push` target "well-known" substitution added * `bazel.image.url` * `bazel.image.repository` * `bazel.image.digest` * `bazel.image.tag` So that it's up to a user what substitution to use. Please, have a look at PR and thanks in advance! --------- Co-authored-by: Dmitrii Shchitinin <[email protected]>
- Loading branch information
Showing
5 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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