Giter VIP home page Giter VIP logo

Comments (3)

mattmoor avatar mattmoor commented on June 4, 2024

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.

ensonic avatar ensonic commented on June 4, 2024

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.

mattmoor avatar mattmoor commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.