aboutsummaryrefslogtreecommitdiff
path: root/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-05-16 00:31:24 +0200
committerMax Audron <audron@cocaine.farm>2021-05-16 00:31:24 +0200
commitbda302df12856879fd78efad1569135b1706973b (patch)
treebca8e41eb6965c0cfcda2277cc13b0f949ca253a /deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet
parentadd container build (diff)
add deployment stuff
Diffstat (limited to 'deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet')
-rw-r--r--deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet22
1 files changed, 22 insertions, 0 deletions
diff --git a/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet b/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet
new file mode 100644
index 0000000..65b5b6e
--- /dev/null
+++ b/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/k-compat.libsonnet
@@ -0,0 +1,22 @@
+// k-compat.libsonnet provides a compatibility layer between k8s-alpha and ksonnet-lib. As ksonnet-lib has been
+// abandoned, we consider it deprecated. This layer will generate a deprecation warning to those that still use it.
+local k = import 'k.libsonnet';
+
+k
++ (
+ if std.objectHas(k, '__ksonnet')
+ then
+ std.trace(
+ 'Deprecated: ksonnet-lib has been abandoned, please consider using https://github.com/jsonnet-libs/k8s-alpha.',
+ (import 'legacy-types.libsonnet')
+ + (import 'legacy-custom.libsonnet')
+ + (import 'legacy-noname.libsonnet')({
+ new(name=''):: super.new() + (if name != '' then super.mixin.metadata.withName(name) else {}),
+ })
+ )
+ else
+ (import 'legacy-subtypes.libsonnet')
+ + (import 'legacy-noname.libsonnet')({
+ new(name=''):: super.new(name),
+ })
+)