Skip to content

Commit

Permalink
Mark thanos storegateway size immutable
Browse files Browse the repository at this point in the history
The `k8s-service-layer.prometheus.thanos_storegateway_size` yk8s config
 setting feeds into the `storegateway.persistence.size` parameter of the
 bitnami/thanos helm chart which feeds into the `volumeClaimTemplates` field of
 the `thanos-storegateway` statefulset created. That field is currently
 immutable making helm updates with the parameter fail.

Related-to: kubernetes/enhancements#4650
  • Loading branch information
Bruno Schubert committed Sep 26, 2024
1 parent 804b5bb commit 2a5b9a7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Marked the ``k8s-service-layer.prometheus.thanos_storegateway_size`` config setting immutable
and outlined a manual workaround to increase the size nonetheless.
24 changes: 24 additions & 0 deletions docs/user/reference/cluster-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,19 @@ The used rook setup is explained in more detail

</details>

.. attention::

The following settings are immutable:
- ``mon_volume_storage_class``
- ``mon_volume_size``
- ``osd_volume_size``
- ``osd_storage_class``

If you still want to change them, follow these manual steps:
1. Increase the size of the corresponding PVC
2. Delete the stateful set: ``kubectl delete -n monitoring sts --cascade=false <statefulset_name>``
3. Re-deploy it with the LCM: ``AFLAGS="--diff --tags rook --tags rook_v2" bash managed-k8s/actions/apply-k8s-supplements.sh``

|
.. _cluster-configuration.prometheus-configuration:
Expand Down Expand Up @@ -518,6 +531,17 @@ size for each component like in the following.
thanos_query_size = "ZGi"
# [...]
.. attention::

The following options are immutable:
- ``thanos_storegateway_size``
- ``thanos_compactor_size``

If you still want to increase it, follow these manual steps:
1. Increase the size of the corresponding PVC
2. Delete the stateful set: ``kubectl delete -n monitoring sts --cascade=false thanos-<storegateway|compactor>``
3. Re-deploy it with the LCM: ``AFLAGS="--diff --tags thanos" bash managed-k8s/actions/apply-k8s-supplements.sh``

|
.. _cluster-configuration.nginx-ingress-configuration:
Expand Down
8 changes: 4 additions & 4 deletions templates/config.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ cluster_name = "rook-ceph" # •ᴗ•
# storage class you have configured in the kubernetes.local_storage section (or
# you should know what your are doing). Note that this is not the storage class
# name that rook will provide.
#mon_volume_storage_class = "local-storage"
#mon_volume_storage_class = "local-storage" # immutable when deployed

# Enables rook to use the host network.
#use_host_networking = false
Expand Down Expand Up @@ -496,7 +496,7 @@ cluster_name = "rook-ceph" # •ᴗ•
#nosds = 3

# The size of the storage backing each OSD.
#osd_volume_size = "90Gi"
#osd_volume_size = "90Gi" # immutable when deployed

# Enable the rook toolbox, which is a pod with ceph tools installed to
# introspect the cluster state.
Expand Down Expand Up @@ -636,8 +636,8 @@ cluster_name = "rook-ceph" # •ᴗ•
#thanos_storage_class = null
# You can explicitly set the PV size for each component.
# If left undefined, the helm chart defaults will be used
#thanos_storegateway_size = null
#thanos_compactor_size = null
#thanos_storegateway_size = null # immutable when deployed
#thanos_compactor_size = null # immutable when deployed

# By default, the monitoring will capture all namespaces. If this is not
# desired, the following switch can be turned off. In that case, only the
Expand Down

0 comments on commit 2a5b9a7

Please sign in to comment.