Giter Club home page Giter Club logo

Comments (11)

mattmoor avatar mattmoor commented on June 12, 2024

@damienmg Who owns this repo?

from rules_jsonnet.

damienmg avatar damienmg commented on June 12, 2024

@davidzchen

from rules_jsonnet.

mattmoor avatar mattmoor commented on June 12, 2024

@mmikulicic It seems like what you have in https://github.com/mmikulicic/rules_ksonnet would be a great extension to this repo (and foundation for this bug). Any interest in reconciling these two repos via a PR?

My goal is to add samples to rules_k8s that use jsonnet templating, fed into a k8s_object rules for some of its capabilities around image integration and various action commands.

WDYT?

from rules_jsonnet.

mkmik avatar mkmik commented on June 12, 2024

Any interest in reconciling these two repos via a PR?

@mattmoor yeah sure. I have no good idea about how to proceed though.

from rules_jsonnet.

mattmoor avatar mattmoor commented on June 12, 2024

@mmikulicic For this logic here

I'm wondering it it is feasible to make ksonnet-lib available as a jsonnet_library to these rules, and achieve what it does via jsonnet_to_json?

from rules_jsonnet.

mattmoor avatar mattmoor commented on June 12, 2024

To be clear, I'm not 100% clear on what functionality of kubecfg you are relying on vs. pure jsonnet, so call me crazy if this is crazy :)

from rules_jsonnet.

mkmik avatar mkmik commented on June 12, 2024

IIRC that part was pure jsonnet. I planned to also have kubecfg handy to do updates and diffs, but this can be done after the evaluation step is done

from rules_jsonnet.

mattmoor avatar mattmoor commented on June 12, 2024

@mmikulicic I think those are both generally useful independent of jsonnet, and rules_k8s already supports kubectl replace.

What I had in mind was:

jsonnet_to_json(
    name = "foo",
    srcs = [...]
    out = "foo.json",
    deps = [...]
)

k8s_object(
    name = "bar",
    template = ":foo.json",
    images = { ... },
)

You can then run: bazel run :bar.replace for replacement today, but I think bazel run :bar.diff sounds interesting too.

Does this seem like a reasonable goal to you? What might you change?

from rules_jsonnet.

anzdaddy avatar anzdaddy commented on June 12, 2024

These projects are clearly complementary, but I'm not sure that justifies merging them into a single repo. Perhaps there's an argument to be made for refactoring rules_ksonnet to leverage rules_jsonnet, but I don't see much benefit in mashing the two into one.

from rules_jsonnet.

mattmoor avatar mattmoor commented on June 12, 2024

I think the pertinent question is whether we should even have ksonnet rules, or just strong examples of how to use ksonnet-lib with rules_jsonnet.

I definitely think we could encapsulate the example flow in macros in rules_ksonnet, but I'm wondering how much it would really save.

from rules_jsonnet.

sparkprime avatar sparkprime commented on June 12, 2024

Let's keep k8s rules & examples out of this repo, but obviously using this repo in tools that marry k8s with Jsonnet makes sense.

from rules_jsonnet.

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.