canonical / grafana-agent-operator

https://charmhub.io/grafana-agent
Apache License 2.0
4 stars 11 forks source link

update cloud_config_requirer lib #205

Closed Abuelodelanada closed 1 week ago

Abuelodelanada commented 1 week ago

Issue

This PR fixes #203

Testing Instructions

Pack the charm, and deploy this bundle:

default-base: ubuntu@22.04/stable
applications:
  agent:
    charm: local:grafana-agent-0
  grafana-cloud-integrator:
    charm: grafana-cloud-integrator
    channel: latest/edge
    revision: 21
    num_units: 1
    to:
    - "1"
    options:
      loki-url: http://loki.com
      password: Password
      username: Username
    constraints: arch=amd64
  ubuntu:
    charm: ubuntu
    channel: latest/stable
    revision: 25
    num_units: 3
    to:
    - "2"
    - "3"
    - "4"
    constraints: arch=amd64
    storage:
      block: loop,100M
      files: rootfs,100M
machines:
  "1":
    constraints: arch=amd64
  "2":
    constraints: arch=amd64
  "3":
    constraints: arch=amd64
  "4":
    constraints: arch=amd64
relations:
- - ubuntu:juju-info
  - agent:juju-info
- - grafana-cloud-integrator:grafana-cloud-config
  - agent:grafana-cloud-config

then, verify that in every grafana-agent config file, username and password are inside logs section, for instance:

logs:
  configs:
  - clients:
    - basic_auth:
        password: Password
        username: Username
      headers:
        Content-Encoding: snappy
      tls_config:
        insecure_skip_verify: false
      url: http://loki.com