# Default values for spring-cloud-data-flow.
rbac:
  # Specifies whether RBAC resources should be created
  create: true

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the serviceAccountName template
  name:

initContainers:
  dbWait:
    image: "busybox"
    tag: "1.30.1"
    imagePullPolicy: IfNotPresent

server:
  image: springcloud/spring-cloud-dataflow-server
  version: 2.6.0
  imagePullPolicy: IfNotPresent
  platformName: default
  trustCerts: false
  service:
    type: LoadBalancer
    externalPort: 80
    annotations: {}
    labels: {}
    loadBalancerSourceRanges: []
  configMap:
  resources: {}
  #  limits:
  #    cpu: 1.0
  #    memory: 2048Mi
  #  requests:
  #    cpu: 0.5
  #    memory: 640Mi
  extraEnv: {}
  containerConfiguration: {}
  #  container:
  #    registry-configurations:
  #      default:
  #        registry-host: registry-1.docker.io
  #        authorization-type: dockeroauth2

skipper:
  enabled: true
  image: springcloud/spring-cloud-skipper-server
  version: 2.5.0
  imagePullPolicy: IfNotPresent
  platformName: default
  trustCerts: false
  service:
    type: ClusterIP
    annotations: {}
    labels: {}
  configMap:
  resources: {}
  #  limits:
  #    cpu: 1.0
  #    memory: 1024Mi
  #  requests:
  #    cpu: 0.5
  #    memory: 640Mi
  extraEnv: {}

deployer:
  resourceLimits:
    cpu: 500m
    memory: 1024Mi
  readinessProbe:
    initialDelaySeconds: 120
  livenessProbe:
    initialDelaySeconds: 90

rabbitmq:
  enabled: true
  rabbitmq:
    username: user
    # this value will be encoded into a secret
    password: changeme

rabbitmq-ha:
  enabled: false
  rabbitmqUsername: user

kafka:
  enabled: false
  replicas: 1
  configurationOverrides:
    "offsets.topic.replication.factor": 1
    "confluent.support.metrics.enable": false
  zookeeper:
    replicaCount: 1

mysql:
  enabled: true
  mysqlDatabase: dataflow

## If you are using an external database,
## you must specify the following database details
database:
  driver:
  scheme:
  host:
  port:
  user: scdf
  password:
  dataflow: dataflow
  skipper: skipper

features:
  streaming:
    enabled: true
  batch:
    enabled: true
  monitoring:
    enabled: false

## If you are using an ingress server then you can override the following
## default values to create an Ingress resource
ingress:
  enabled: false
  server:
    host: data-flow.local
  grafana:
    host: grafana.local
  protocol: https

grafana:
  service:
    type: LoadBalancer
  admin:
    existingSecret: scdf-grafana-secret
    userKey: admin-user
    passwordKey: admin-password
    defaultUsername: YWRtaW4=
    defaultPassword: cGFzc3dvcmQ=
  extraConfigmapMounts:
    - name: scdf-grafana-ds-cm
      mountPath: /etc/grafana/provisioning/datasources/datasources.yaml
      subPath: datasources.yaml
      configMap: scdf-grafana-ds-cm
      readOnly: true
  dashboardProviders:
    dashboardproviders.yaml:
      apiVersion: 1
      providers:
        - name: default
          orgId: 1
          folder:
          type: file
          disableDeletion: true
          editable: false
          options:
            path: /var/lib/grafana/dashboards/default
  dashboards:
    default:
      scdf-applications:
        url: https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/src/grafana/prometheus/docker/grafana/dashboards/scdf-applications.json
      scdf-streams:
        url: https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/src/grafana/prometheus/docker/grafana/dashboards/scdf-streams.json
      scdf-task-batch:
        url: https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/src/grafana/prometheus/docker/grafana/dashboards/scdf-task-batch.json

prometheus:
  podSecurityPolicy:
    enabled: true
  alertmanager:
    enabled: false
  kubeStateMetrics:
    enabled: false
  nodeExporter:
    enabled: false
  pushgateway:
    enabled: false
  server:
    global:
      scrape_interval: 10s
      scrape_timeout: 9s
      evaluation_interval: 10s
  extraScrapeConfigs: |
    - job_name: 'proxied-applications'
      metrics_path: '/metrics/connected'
      kubernetes_sd_configs:
        - role: pod
          namespaces:
            names:
              - {{ .Release.Namespace }}
      relabel_configs:
        - source_labels: [__meta_kubernetes_pod_label_app]
          action: keep
          regex: prometheus-proxy
        - source_labels: [__meta_kubernetes_pod_container_port_number]
          action: keep
          regex: 8080
    - job_name: 'proxies'
      metrics_path: '/metrics/proxy'
      kubernetes_sd_configs:
        - role: pod
          namespaces:
            names:
              - {{ .Release.Namespace }}
      relabel_configs:
        - source_labels: [__meta_kubernetes_pod_label_app]
          action: keep
          regex: prometheus-proxy
        - source_labels: [__meta_kubernetes_pod_container_port_number]
          action: keep
          regex: 8080
        - action: labelmap
          regex: __meta_kubernetes_pod_label_(.+)
        - source_labels: [__meta_kubernetes_pod_name]
          action: replace
          target_label: kubernetes_pod_name
  proxy:
    service:
      type: LoadBalancer
