labels:
  io.cattle.role: cluster # options are cluster/project
rancher_min_version: 2.3.0
questions:
#image configurations
- variable: defaultImage
  default: true
  description: "Use default Datadog image or specify a custom one"
  label: Use Default Datadog Image
  type: boolean
  show_subquestion_if: false
  group: "Container Images"
  subquestions:
  - variable: image.repository
    default: "ranchercharts/datadog-agent"
    description: "Datadog image name"
    type: string
    label: Datadog Image Name
  - variable: image.tag
    default: "6.13.0"
    description: "Datadog Image Tag"
    type: string
    label: Datadog Image Tag
  - variable: clusterAgent.image.repository
    default: "ranchercharts/datadog-cluster-agent"
    description: "Datadog clusterAgent image name"
    type: string
    label: Datadog ClusterAgent Image Name
  - variable: clusterAgent.image.tag
    default: "1.3.2"
    description: "Datadog ClusterAgent Image Tag"
    type: string
    label: Datadog ClusterAgent Image Tag
  - variable: kube-state-metrics.image.repository
    default: "ranchercharts/coreos-kube-state-metrics"
    description: "KubeState image name"
    type: string
    label: KubeState Image Name
    show_if: "kubeStateMetrics.enabled=true&&defaultImage=false"
  - variable: kube-state-metrics.image.tag
    default: "v1.7.2"
    description: "KubeState Image Tag"
    type: string
    label: KubeState Image Tag
    show_if: "kubeStateMetrics.enabled=true&&defaultImage=false"
#cluster agent configurations
- variable: clusterAgent.enabled
  default: false
  description: "Use the cluster-agent for cluster metrics (Kubernetes 1.10+ only), https://docs.datadoghq.com/agent/kubernetes/cluster/"
  type: boolean
  label: Enable Cluster Agent Metrics(Kubernetes 1.10+ only)
  group: "Cluster Agent"
- variable: clusterAgent.metricsProvider.enabled
  default: true
  description: "Enable the metricsProvider to be able to scale based on metrics in Datadog"
  type: boolean
  label: Enable the metricsProvider
  show_if: "clusterAgent.enabled=true"
  group: "Cluster Agent"
- variable: datadog.appKey
  default: ""
  description: "Datadog App key required to use metricsProvider"
  type: string
  required: true
  label: Datadog Metrics App Key
  group: "Cluster Agent"
  show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true&&datadog.appKeyExistingSecret="
- variable: datadog.appKeyExistingSecret
  default: ""
  description: "If set, use the secret with a provided name instead of creating a new appKey secret."
  type: secret
  label: Select Existing Datadog App Key(Secret)
  group: "Cluster Agent"
  show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true&&datadog.appKey="
#datadog agent configurations
- variable: datadog.apiKey
  default: ""
  description: "Enter your Datadog API Key."
  type: string
  label: Datadog API Key
  group: "Agent Configuration"
  required: true
  show_if: "datadog.apiKeyExistingSecret="
- variable: datadog.apiKeyExistingSecret
  default: ""
  description: "If set, use the secret with a provided name instead of creating a new apiKey secret."
  type: secret
  label: Select Existing Datadog API Key(Secret)
  group: "Agent Configuration"
  show_if: "datadog.apiKey="
- variable: datadog.site
  default: "datadoghq.com"
  description: "The site of the Datadog intake to send Agent data to"
  type: enum
  label: Datadog Site URL
  group: "Agent Configuration"
  required: true
  options:
    - "datadoghq.com"
    - "datadoghq.eu"
    - "custom"
- variable: datadog.dd_url
  required: true
  default: ""
  description: "The host of the Datadog intake server to send Agent data to, only set this option if you need the Agent to send data to a custom URL"
  type: string
  label: Datadog Custom Site URL
  group: "Agent Configuration"
  show_if: "datadog.site=custom"
- variable: datadog.logLevel
  default: "warn"
  description: "Set Agent logging verbosity"
  type: enum
  options:
    - "trace"
    - "debug"
    - "info"
    - "warn"
    - "error"
    - "critical"
    - "off"
  label: Log Level
  group: "Agent Configuration"
- variable: datadog.tags
  default: ""
  description: "Host tags, separated by spaces. For example: 'simple-tag-0 tag-key-1:tag-value-1'"
  type: string
  label: Host Tags
  group: "Agent Configuration"
- variable: datadog.useCriSocketVolume
  default: true
  description: "Enable container runtime socket volume mounting"
  type: boolean
  label: Enable Mounting The Container Runtime Socket In Agent Containers
  group: "Agent Configuration"
- variable: datadog.criSocketPath
  default: ""
  description: "Path to the container runtime socket (if different from Docker), default to `/var/run/docker.sock`"
  type: string
  label: Path To The Container Runtime Socket(Optional)
  group: "Agent Configuration"
  show_if: "datadog.useCriSocketVolume=true"
- variable: datadog.nonLocalTraffic
  default: false
  description: "Whether DogStatsD should listen to non local UDP traffic, required to send custom metrics"
  type: boolean
  label: DogStatsD Non-Local Traffic
  group: "Agent Configuration"
- variable: datadog.collectEvents
  default: false
  description: "Enable event collection from the kubernetes API"
  type: boolean
  label: Collect Events
  group: "Agent Configuration"
# Datadog Tagging 
- variable: datadog.podLabelsAsTags
  default: ""
  description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
  type: string
  label: Extract Pod Labels as Tags
  group: "Datadog Tagging"
- variable: datadog.podAnnotationsAsTags
  default: ""
  description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
  type: string
  label: Extract Pod Annotations as Tags
  group: "Datadog Tagging"
- variable: datadog.nodeLabelsAsTags
  default: ""
  description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
  type: string
  label: Extract Node Labels As Tags
  group: "Datadog Tagging"
# DaemonSet configurations
- variable: daemonset.rkeETCDControlPlane
  default: true
  description: "Configure Datadog Agent pods with the required tolerations to be deployed on the RKE etcd and control plane."
  type: boolean
  label: Run datadog pod on RKE Control Plane Nodes
  group: "Daemonset Configuration"
- variable: daemonset.useHostNetwork
  default: false
  description: "Bind ports on the hostNetwork. Useful for CNI networking where hostPort might not be supported. The ports will need to be available on all hosts"
  type: boolean
  label: Use HostNetwork
  group: "Daemonset Configuration"
- variable: daemonset.useHostPort
  default: false
  description: "Sets the hostPort to the same value of the container port"
  type: boolean
  label: Use HostPort
  group: "Daemonset Configuration"
- variable: daemonset.useHostPID
  default: false
  description: "Run the agent in the host's PID namespace"
  type: boolean
  label: Use HostPID
  group: "Daemonset Configuration"
#proxy configurations
- variable: datadog.httpProxy
  default: ""
  description: "An http URL to use as a proxy for http requests"
  type: string
  label: Datadog Proxy for HTTP Requests
  group: "Proxy Configuration"
- variable: datadog.httpsProxy
  default: ""
  description: "An http URL to use as a proxy for https requests"
  type: string
  label: Datadog Proxy for HTTPS Requests
  group: "Proxy Configuration"
- variable: datadog.noProxy
  default: ""
  description: "a space-separated list of URLs for which no proxy should be used"
  type: string
  label: Datadog No-Proxy List(separated by a space)
  group: "Proxy Configuration"
# Optional Collection agents
- variable: datadog.apmEnabled
  default: false
  description: "Run the trace-agent along with the infrastructure agent, allowing the container to accept traces on 8126/tcp"
  type: boolean
  label: Enable APM
  group: "Optional Collection Agents"
- variable: datadog.apmNonLocalTraffic
  default: false
  description: "Allow non-local traffic when tracing from other containers"
  type: boolean
  label: Allow APM Non-local Traffic
  group: "Optional Collection Agents"
- variable: datadog.processAgentEnabled
  default: false
  description: "Enable live process collection in the process-agent"
  type: boolean
  label: Enable Live Process Agent
  group: "Optional Collection Agents"
- variable: datadog.logsEnabled
  default: false
  description: "Run the log-agent along with the infrastructure agent"
  type: boolean
  label: Collect Logs
  group: "Optional Collection Agents"

#Kube State Metrics
- variable: kubeStateMetrics.enabled
  default: true
  description: "Create a kube-state-metrics deployment"
  type: boolean
  label: Deployment KubeState Metrics Deployment
  group: "Kube-State-Metrics"
