Deconstruction support for locals
Open
enhancement
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
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?
Contributor guide
Assessment
This issue has not been assessed yet.