canonical / grafana-agent-operator

This charmed operator automates the operational procedures of running Grafana Agent, an open-soruce telemetry collector.
https://charmhub.io/grafana-agent
Apache License 2.0
4 stars 8 forks source link

Revert "bump cert_handler to v1 (#94)" #106

Closed sed-i closed 2 months ago

sed-i commented 2 months ago

Issue

Grafana agent must also work with juju 2.9, but certhandler v1 uses secrets.

Solution

Switch back to certhandler v0.

This reverts commit 0cfca69ac1b60cec4761b6817830e93a743bec7c.

Fixes #105.

In tandem with:

Testing

graph LR

subgraph lxd/juju-2.9.49
ubuntu --- grafana-agent
end

subgraph microk8s/juju-3.4.2
prometheus --- self-signed-certificates
traefik --- self-signed-certificates
prometheus --- traefik
end

grafana-agent --- self-signed-certificates
grafana-agent --- prometheus

"cos" model, Juju 3.4:

bundle: kubernetes
saas:
applications:
  prom:
    charm: prometheus-k8s
    channel: latest/edge
    revision: 182
    base: ubuntu@20.04/stable
    scale: 1
    trust: true
  ssc:
    charm: self-signed-certificates
    channel: latest/edge
    revision: 137
    scale: 1
  trfk:
    charm: traefik-k8s
    channel: latest/stable
    revision: 176
    base: ubuntu@20.04/stable
    scale: 1
    trust: true
relations:
- - prom:certificates
  - ssc:certificates
- - trfk:ingress-per-unit
  - prom:ingress
- - trfk:certificates
  - ssc:certificates
--- # overlay.yaml
applications:
  prom:
    offers:
      prom:
        endpoints:
        - receive-remote-write
        acl:
          admin: admin
  ssc:
    offers:
      certs:
        endpoints:
        - certificates
        - send-ca-cert
        acl:
          admin: admi

LXD model, Juju 2.9.49:

series: jammy
saas:
  certs:
    url: j34:admin/rwdrop.certs
  prom:
    url: j34:admin/rwdrop.prom
applications:
  ga:
    charm: ./grafana-agent_ubuntu-22.04-amd64.charm
  ub:
    # In cli I had to specify --series jammy
    charm: ubuntu
    channel: stable
    revision: 24
    num_units: 1
relations:
- - ga:juju-info
  - ub:juju-info
- - prom:receive-remote-write
  - ga:send-remote-write
- - ga:certificates
  - certs:certificates
- - ga:receive-ca-cert
  - certs:send-ca-cer