canonical / cos-lite-bundle

Canonical Observability Stack Lite, or COS Lite, is a light-weight, highly-integrated, Juju-based observability suite running on Kubernetes.
https://charmhub.io/cos-lite
Apache License 2.0
10 stars 10 forks source link

`storage-small-overlay.yaml` has bigger size than the default #86

Closed nobuto-m closed 10 months ago

nobuto-m commented 11 months ago

Bug Description

The following two documents suggest to apply storage-small-overlay.yaml for a small setup.

https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s#heading--deploy-the-cos-lite-bundle-with-overlays

the storage-small overlay applies some defaults for the various storages used by the COS Lite components.

https://github.com/canonical/cos-lite-bundle/blob/fbfe8bd8769fb711695d5dbfbcff6b43bcf28ddc/README.md#overlays

storage-small: provides a setup of the various storages for the COS Lite charms for a small setup. Using an overlay for storage is fundamental for a productive setup, as you cannot change the amount of storage assigned to the various charms after the deployment of COS Lite.

However, the default size of Juju storage is 1GiB if I'm not mistaken so it doesn't make much sense to have bigger size (2G, 10G) in the "small" overlay.

https://juju.is/docs/juju/storage-constraint

<size>: determined from the charm’s minimum storage size, or 1GiB if the charmed operator does not specify a minimum

To Reproduce

  1. Follow the tutorial https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s

Environment

latest/stable of cos-lite bundle.

latest/stable: 11 2022-10-21 (11) 6kB @

Relevant log output

1Gi without the storage-small overlay.

$ kubectl get pvc -n cos
NAME                                          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
alertmanager-data-68d6b87a-alertmanager-0     Bound    pvc-239703cd-f2d4-4067-a4af-5e795ef775d4   1Gi        RWO            microk8s-hostpath   14h
grafana-database-bcc2ac5f-grafana-0           Bound    pvc-7673d498-55f7-495a-9888-7e1806ce8149   1Gi        RWO            microk8s-hostpath   14h
loki-active-index-directory-15d17a1f-loki-0   Bound    pvc-3355eea3-57f9-4f75-9a1a-a97b7a1a0f84   1Gi        RWO            microk8s-hostpath   14h
loki-loki-chunks-15d17a1f-loki-0              Bound    pvc-320fd438-338f-4b18-8c8c-ad06d56b45c0   1Gi        RWO            microk8s-hostpath   14h
prometheus-database-b2afe454-prometheus-0     Bound    pvc-c3ee21e2-11d2-4545-87c3-67ef44c8713b   1Gi        RWO            microk8s-hostpath   14h
traefik-configurations-45747e2e-traefik-0     Bound    pvc-00da7694-3b53-4e5a-a279-c640cfd0770a   1Gi        RWO            microk8s-hostpath   14h

Bigger sizes like 2Gi or 10Gi when overlay was applied.

$ kubectl get pvc -n cos
NAME                                          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
alertmanager-data-d1a74255-alertmanager-0     Bound    pvc-6ad038f4-6853-47ad-a27c-b2ab410f34c3   2Gi        RWO            microk8s-hostpath   65m
grafana-database-02c4415a-grafana-0           Bound    pvc-abd920da-5870-44ca-b194-0c8528a244ad   2Gi        RWO            microk8s-hostpath   65m
loki-active-index-directory-4234c5e0-loki-0   Bound    pvc-c111064b-5cd1-46b5-b677-b5f7a5d1c5b3   2Gi        RWO            microk8s-hostpath   65m
loki-loki-chunks-4234c5e0-loki-0              Bound    pvc-43376e03-15b1-473f-90ea-ebae1ba29ce1   10Gi       RWO            microk8s-hostpath   65m
prometheus-database-d3dff8a1-prometheus-0     Bound    pvc-b6b4f8ee-18f0-4fc0-b07c-b3cf247ba7c9   10Gi       RWO            microk8s-hostpath   64m
traefik-configurations-9d719ca9-traefik-0     Bound    pvc-4de44324-c1f4-4591-acbd-13b84ce21319   1Gi        RWO            microk8s-hostpath   64m

Additional context

No response

Abuelodelanada commented 10 months ago
  1. Currently we are using hostpath storage so the capacity limit is not enforced.
  2. The charms does not specify the limit, this comes from Juju, anyway 1Gi is too small.

Feel free to re-open if you have any other suggestions.