aboutsummaryrefslogtreecommitdiff
path: root/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet')
-rw-r--r--deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet29
1 files changed, 29 insertions, 0 deletions
diff --git a/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet b/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet
new file mode 100644
index 0000000..6a6f149
--- /dev/null
+++ b/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/kausal.libsonnet
@@ -0,0 +1,29 @@
+// kausal.libsonnet provides a backwards compatible way as many libraries leverage kausal.libsonnet.
+// Ideally util.libsonnet is consumed separately.
+
+(import 'grafana.libsonnet')
++ {
+ local this = self,
+ _config+:: {
+ enable_rbac: true,
+ enable_pod_priorities: false,
+ namespace: error 'Must define a namespace',
+ },
+
+ util+::
+ (import 'util.libsonnet').withK(this)
+ + {
+ rbac(name, rules)::
+ if $._config.enable_rbac
+ then super.rbac(name, rules, $._config.namespace)
+ else {},
+ namespacedRBAC(name, rules)::
+ if $._config.enable_rbac
+ then super.namespacedRBAC(name, rules, $._config.namespace)
+ else {},
+ podPriority(p):
+ if $._config.enable_pod_priorities
+ then super.podPriority(p)
+ else {},
+ },
+}