Comments (3)
At least today XXXX
has to be a well-formed and fully-qualified image name. This means, there must be a domain part (e.g. gcr.io
) and a tag (e.g. :latest
). We could conceivably relax this by disabling strictness in the docker_name.Tag
, or allowing the keys to replace arbitrary strings. If this sounds appealing let's fork another issue for that piece?
I think the crux of this is that you want this:
I also tried
$(GCP_REGISTRY)/$ (GCP_PROJECT)/web-frontend ...
These rules currently support stamp variables (IIRC), but not make variables (which I find annoying without vardef
for defaults). That said, stamp variables in the key of images={}
isn't super useful without a templating system with similar stamping support (related).
... where GCP_REGISTRY and GCP_PROJECT are defines in my bazelrc
This is where image_chroot
comes in. It allows you to rewrite an embedded reference into a developer namespace. It's a bit ugly with strict names, but you can insert a dummy name and aways chroot it. We do this in the examples (in part) for integration testing these features.
Let me know if there is anything I didn't speak to.
from rules_k8s.
Using image_chroot result in extra folders in the registry, right? I would add
image_chroot = "$(GCP_REGISTRY)/$(GCP_PROJECT)/"
into the k8s_defaults in workspace and use
image: gcr.io/robco:latest
in my deployment.yaml. This would then create gcr.io/robco
folders in the registry. I agree that by this we can probably "make thinks work"™, I would not be fond of it.
1.) the extra folders are confusing especially if one is called gcr.io and located on eu.gci.io.
2.) the fact that things get replaced in the yaml file are not obvious, becasue we replace a plaintext string
from rules_k8s.
So this is sort of an artifact of how this grew up, and it certainly isn't immovable :)
Essentially, we started from a point where the yaml templates basically had to be independently useful, since the only modifications we performed were tag => digest. With chrooting, the game changes considerably.
Let me TAL to confirm that this is a simple change (ideally by making it), and then we can replace arbitrary strings with digests.
from rules_k8s.
Related Issues (20)
- How to resolve locally built images? HOT 2
- `@platforms` should be explicitly imported HOT 1
- Cutting a new release HOT 2
- io_kubernetes_build seems to not exist? HOT 3
- [Condition Fields] Is it possible to support some conditional field in yaml file?
- Cannot run delete with host_platform=osx and platform=linux HOT 4
- Update kubectl from source documentation
- move to GCP prow instead of kubernetes prow
- kubectl toolchain for Apple M1 (cpu: arm64) on os:macos
- v0.7: Error in fail: go_register_toolchains: version set after go sdk rule declared (go_sdk) HOT 3
- Python Toolchain Included in `.delete` Target
- Add rules_k8s to the bzlmod registry
- Missing header when uploading a blob to a registry
- kubectl defaults seem to be stale/broken HOT 4
- Unable to publish images: unable to push image grc.io/foo/bar:latest: Get "https://grc.io/v2/": dial tcp 216.40.34.41:443: i/o timeout HOT 2
- `':foo.describe': no such target` error HOT 1
- Support rules_oci HOT 7
- Drop dependency on rules_docker HOT 2
- objects being applied even if underlying dependencies did not change
- Stamp substitution in image names does not work as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_k8s.