rules_k8s - k8s_deploy template away images
The solution I found to get the container registry names out of the build step, was to use bazel for build and skaffold for deploy. Both steps are performed in the same CI pipeline.
My skaffold.yaml is very simple, and provides the mapping of bazel targets to gcr names.
apiVersion: skaffold/v2alpha4kind: Configmetadata: name: my_servicesbuild: tagPolicy: gitCommit: variant: AbbrevCommitSha artifacts: - image: gcr.io/jumemo-dev/service1 bazel: target: //server1/src/main/java/server1:server1.tar - image: gcr.io/jumemo-dev/service2 bazel: target: //server2/src/main/java/server2:server2.tar
It is invoked using:
$ skaffold build