apiVersion: v1
kind: Secret
metadata:
  labels:
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: promtail
    app.kubernetes.io/version: 2.4.2
    helm.sh/chart: promtail-3.10.0
  name: RELEASE-NAME-promtail
  namespace: default
stringData:
  promtail.yaml: "server:\n  log_level: info\n  http_listen_port: 3101\n\nclient:\n
    \ url: http://loki-gateway/loki/api/v1/push\n  \n\npositions:\n  filename: /run/promtail/positions.yaml\n\nscrape_configs:\n
    \ # See also https://github.com/grafana/loki/blob/master/production/ksonnet/promtail/scrape_config.libsonnet
    for reference\n  - job_name: kubernetes-pods\n    pipeline_stages:\n      - cri:
    {}\n    kubernetes_sd_configs:\n      - role: pod\n    relabel_configs:\n      -
    source_labels:\n          - __meta_kubernetes_pod_controller_name\n        regex:
    ([0-9a-z-.]+?)(-[0-9a-f]{8,10})?\n        action: replace\n        target_label:
    __tmp_controller_name\n      - source_labels:\n          - __meta_kubernetes_pod_label_app_kubernetes_io_name\n
    \         - __meta_kubernetes_pod_label_app\n          - __tmp_controller_name\n
    \         - __meta_kubernetes_pod_name\n        regex: ^;*([^;]+)(;.*)?$\n        action:
    replace\n        target_label: app\n      - source_labels:\n          - __meta_kubernetes_pod_label_app_kubernetes_io_component\n
    \         - __meta_kubernetes_pod_label_component\n        regex: ^;*([^;]+)(;.*)?$\n
    \       action: replace\n        target_label: component\n      - action: replace\n
    \       source_labels:\n        - __meta_kubernetes_pod_node_name\n        target_label:
    node_name\n      - action: replace\n        source_labels:\n        - __meta_kubernetes_namespace\n
    \       target_label: namespace\n      - action: replace\n        replacement:
    $1\n        separator: /\n        source_labels:\n        - namespace\n        -
    app\n        target_label: job\n      - action: replace\n        source_labels:\n
    \       - __meta_kubernetes_pod_name\n        target_label: pod\n      - action:
    replace\n        source_labels:\n        - __meta_kubernetes_pod_container_name\n
    \       target_label: container\n      - action: replace\n        replacement:
    /var/log/pods/*$1/*.log\n        separator: /\n        source_labels:\n        -
    __meta_kubernetes_pod_uid\n        - __meta_kubernetes_pod_container_name\n        target_label:
    __path__\n      - action: replace\n        regex: true/(.*)\n        replacement:
    /var/log/pods/*$1/*.log\n        separator: /\n        source_labels:\n        -
    __meta_kubernetes_pod_annotationpresent_kubernetes_io_config_hash\n        - __meta_kubernetes_pod_annotation_kubernetes_io_config_hash\n
    \       - __meta_kubernetes_pod_container_name\n        target_label: __path__\n"
