Grafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
Writing Jsonnet
Advanced features
Configuration ReferenceFile formatJsonnet accessDirectory structureEnvironment variablesCommand-line completionDiff strategiesNamespacesFormatting
Frequently asked questionsKnown issues

Configuration Reference

Tanka's behavior can be customized per Environment using a file called spec.json

File format

  // Config format revision. Currently only "v1alpha1"
  "apiVersion": "v1alpha1",
  // Always "Environment". Reserved for future use
  "kind": "Environment",

  // Descriptive fields
  "metadata": {
    // Name of the Environment. Automatically set to the relative
    // path from the project root
    "name": "<string>",

    // Arbitrary key:value string pairs. Not parsed by Tanka
    "labels": { "<string>": "<string>" }

  // Properties influencing Tanka's behavior
  "spec": {
    // The Kubernetes cluster to use.
    // Must be the full URL, e.g. https://cluster.fqdn:6443

Jsonnet access

It is possible to access above data from Jsonnet:

local tk = import "tk";

  // The cluster IP
  cluster: tk.env.spec.apiServer,
  // The labels of your Environment
  labels: tk.env.metadata.labels,