github.com/grafana/pyroscope@v1.18.0/examples/grafana-alloy-auto-instrumentation/java/kubernetes/grafana.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    name: grafana
     5  spec:
     6    replicas: 1
     7    selector:
     8      matchLabels:
     9        app: grafana
    10    template:
    11      metadata:
    12        labels:
    13          app: grafana
    14      spec:
    15        containers:
    16          - name: grafana
    17            image: grafana/grafana:latest
    18            env:
    19              - name: GF_PLUGINS_PREINSTALL_SYNC
    20                value: grafana-pyroscope-app
    21              - name: GF_AUTH_ANONYMOUS_ENABLED
    22                value: "true"
    23              - name: GF_AUTH_ANONYMOUS_ORG_ROLE
    24                value: Admin
    25              - name: GF_AUTH_DISABLE_LOGIN_FORM
    26                value: "true"
    27            ports:
    28              - containerPort: 3000
    29            volumeMounts:
    30              - name: grafana-provisioning
    31                mountPath: /etc/grafana/provisioning
    32        volumes:
    33          - name: grafana-provisioning
    34            configMap:
    35              name: grafana-provisioning
    36              items:
    37                - key: datasources
    38                  path: datasources/datasources.yaml
    39                - key: plugins
    40                  path: plugins/plugins.yaml
    41  ---
    42  apiVersion: v1
    43  kind: Service
    44  metadata:
    45    name: grafana
    46  spec:
    47    selector:
    48      app: grafana
    49    ports:
    50      - protocol: TCP
    51        port: 3000
    52        targetPort: 3000
    53  ---
    54  apiVersion: v1
    55  kind: ConfigMap
    56  metadata:
    57    name: grafana-provisioning
    58  data:
    59    "datasources": |
    60      apiVersion: 1
    61      datasources:
    62        - uid: local-pyroscope
    63          type: grafana-pyroscope-datasource
    64          name: Pyroscope
    65          url: http://pyroscope:4040
    66          jsonData:
    67            keepCookies: [pyroscope_git_session]
    68  
    69    "plugins": |
    70      apiVersion: 1
    71      apps:
    72        - type: grafana-pyroscope-app
    73          jsonData:
    74            backendUrl: http://pyroscope:4040
    75          secureJsonData: