Open
Description
We use Jsonnet to express the Kubernetes API objects. The namespace is quite dense, so we end up with a lot of imports, something like [EDITED FOR CLARITY]:
local core = import "core.libsonnet";
local container = core.v1.container;
local claim = core.v1.volume.claim;
local probe = core.v1.probe;
local service = core.v1.service;
local secret = core.v1.secret;
local volume = core.v1.volume;
local configMap = core.v1.configMap;
It would be great to have sugar for this, e.g., JavaScript-style import * from "core.libsonnet"
, which would generate local
definitions similar to those above.
Would doing this upend some important part of the language?