canonical / prometheus-k8s-operator

This charmed operator automates the operational procedures of running Prometheus, an open-source metrics backend.
https://charmhub.io/prometheus-k8s
Apache License 2.0
21 stars 34 forks source link

Fix handling of tls config #524

Closed sed-i closed 1 year ago

sed-i commented 1 year ago

Issue

TLS config is written and workload restarted, before the cert is written to disk.

Solution

Depends on:

Fixes https://github.com/canonical/prometheus-k8s-operator/issues/521

Testing Instructions

bundle: kubernetes
applications:
  ca:
    charm: self-signed-certificates
    channel: edge
    scale: 1
  prom:
    charm: ./prometheus-k8s_ubuntu-20.04-amd64.charm
    series: focal
    scale: 1
    trust: true
    resources:
        prometheus-image: ghcr.io/canonical/prometheus:dev
relations:
- - ca:certificates
  - prom:certificates
bundle: kubernetes
applications:
  ca:
    charm: self-signed-certificates
    channel: edge
    scale: 1
  cat:
    charm: catalogue-k8s
    channel: edge
    series: focal
    scale: 1
  prom:
    charm: ./prometheus-k8s_ubuntu-20.04-amd64.charm
    series: focal
    scale: 1
    trust: true
    resources:
        prometheus-image: ghcr.io/canonical/prometheus:dev
  trfk:
    charm: traefik-k8s
    channel: edge
    series: focal
    scale: 1
relations:
- - cat:catalogue
  - prom:catalogue
- - ca:certificates
  - prom:certificates
- - prom:ingress
  - trfk:ingress-per-unit
- - trfk:certificates
  - ca:certificates

Release Notes

Fix handling of tls config.

sed-i commented 1 year ago

@PietroPasotti, check-libs complains:

Library charms.tempo_k8s.v0.charm_tracing has local changes, cannot be updated.

Haven't checked but might be a LIBPATCH bump issue.

PietroPasotti commented 1 year ago

@PietroPasotti, check-libs complains:

Library charms.tempo_k8s.v0.charm_tracing has local changes, cannot be updated.

Haven't checked but might be a LIBPATCH bump issue.

given https://github.com/canonical/prometheus-k8s-operator/pull/523 , the lib should be up to date? If the issue persists we could try deleting it manually and re-fetching it? Maybe the linter did some minor change to it?