rustfs-monitoring tenant to replace minio-monitoring tenant (Thanos) and cleanup of minio-monitoring

Related to #3289 (closed)

Closes #4620 (closed)

What does this MR do and why?

Following !8703 (merged) we have rustfs-operator available.

This MR introduces rustfs-monitoring tenant to replace minio-monitoring tenant.

New units :

| **rustfs-monitoring** | create rustfs-operator tenant monitoring | Kustomization |
| **rustfs-monitoring-init** | create rustfs-monitoring tenant secrets admin and user (password in Vault) | Kustomization |
| **rustfs-monitoring-migrate** | one-shot migrate job of bucket data from MinIO monitoring pools to RustFS monitoring pools. Until this job finished, pre-upgrade metrics are not queryable. | Kustomization |
| **cleanup-namespaces-minio** | strip prune-disabled protection and delete the minio-monitoring and/or minio-logging namespace(s) once their corresponding unit is disabled after migration to rustfs. | Kustomization |

Other changes:

Tune redundancy-related parameters with :

monitoring:
  rustfs:
    servers_count: 4
    volumes_per_server: 4
    volumes_size: 10Gi
    server_resources:
      limits:
        cpu: 1000m
        memory: 256Mi
      requests:
        cpu: 250m
        memory: 512Mi

Use https://rustfs.com/erasure-code-calculator/ for values on servers_count and volumes_per_server. (after the deployment/upgrade these values become immutable)

New secrets :

root@bootsrap:~# k get secrets -n rustfs-monitoring
NAME                           TYPE                DATA   AGE
minio-monitoring-user          Opaque              2      22h #minio user for migrating data from minio to rustfs monitoring tenants
rustfs-monitoring-admin        Opaque              2      22h #admin user used for login to UI rustfs-monitoring-console.sylva
rustfs-monitoring-server-tls   kubernetes.io/tls   3      22h #certificate managed by the rustfs-monitoring tenant for it's ingresses
rustfs-monitoring-user         Opaque              2      22h #rustfs user used for migrating data from minio to rustfs monitoring tenants; no UI access

Login in UI using secret rustfs-monitoring-admin . OIDC login coming soon with #4533

77F16301-8822-492A-B195-F44FB9BE56F5

Fresh deployment will install rustfs-monitoring and dependencies , and skip minio-monitoring and dependencies.

Upgrade will install rustfs-monitoring and dependencies, leaving minio-monitoring and dependencies present as well. rustfs-monitoring-migrate job checks if this is an upgrade, and if it is, will migrate data from minio monitoring tenant buckets to rustfs monitoring tenant buckets using rclone copy https://rclone.org/commands/rclone_copy/. After the migration, grafana UI/ rustfs-monitoring UI needs a little time to load data from rustfs tenant buckets, but all the previous data is read correctly in grafana dashboards. (any on-going data is not affected by this migration) .

If and only if rustfs-monitoring-migrate job succeed, sylva-unit-status will report this one-shot unit as completed, and start a new reconciliation with that unit disabled, as well as minio-monitoring. This will also trigger the cleanup-namespaces-minio kustomization unit that cleans the minio-monitoring namespace

Grafana graph example for thanos data, at 09/01 12:00 - it is the time of the migration from minio to rustfs , when the endpoint is moved from minio to rustfs :

78664472-B01E-4DA9-8217-4E1677F9D076

Local CI Test (couldn't add the login test as well, see task #4565) :

root@bootsrap:/opt/sylva-core/.gitlab/ci/tests/test-framework (ci/rustfs-monitoring)# uv run sylva-test-framework run --     --mgmt-cluster-kubeconfig=$KUBECONFIG     --cluster-kind=management     --phase=install     tests/login/test_login_mgmt.py     -k rustfs     --tb=auto
================================================================================= test session starts =================================================================================
platform linux -- Python 3.13.15, pytest-9.1.1, pluggy-1.6.0
rootdir: /opt/sylva-core/.gitlab/ci/tests/test-framework
configfile: pyproject.toml
plugins: anyio-4.14.1, sylva-test-framework-0.1.0
collected 11 items / 10 deselected / 1 selected

tests/login/test_login_mgmt.py::test_rustfs[rustfs-monitoring] SUBPASSED[api-health]                                                                                            [100%]
tests/login/test_login_mgmt.py::test_rustfs[rustfs-monitoring] SUBPASSED[console-health]                                                                                        [100%]
tests/login/test_login_mgmt.py::test_rustfs[rustfs-monitoring] PASSED                                                                                                           [100%]

================================================================= 1 passed, 10 deselected, 2 subtests passed in 1.24s =================================================================
root@bootsrap:/opt/sylva-core/.gitlab/ci/tests/test-framework (ci/rustfs-monitoring)#

Rustfs-monitoring tenant buckets can be accessed from rustfs-operator UI as well.

Next steps in this order :

  1. minio-logging tenant with migration and cleanup - !9184 (merged)
  2. Documentation -

Test coverage

Fresh deployment in capo with rke2 - done ok.

Upgrade from main sylva-core with migration and cleanup jobs done.

CI configuration

Below you can choose test deployment variants to run in this MR's CI.

Click to open to CI configuration

Legend:

Icon Meaning Available values
☁️ Infra Provider capd, capo, capm3
🚀 Bootstrap Provider kubeadm (alias kadm), rke2, okd, ck8s
🐧 Node OS ubuntu, suse, na, leapmicro
🛠️ Deployment Options Deployment option list and description
🎬 Pipeline Scenarios Available scenario list and description
🟢 Enabled units Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type
🔴 Disabled units Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type
🏗️ Target platform Can be used to select specific deployment environment Available platform list and description
⚡ Pipeline control autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way
  • 🎬 preview ☁️ capd 🚀 kadm 🐧 ubuntu
  • 🎬 preview ☁️ capo 🚀 rke2 🐧 suse
  • 🎬 preview ☁️ capm3 🚀 rke2 🐧 ubuntu
  • ☁️ capd 🚀 kadm 🛠️ light-deploy 🐧 ubuntu
  • ☁️ capd 🚀 rke2 🛠️ light-deploy 🐧 suse
  • ☁️ capo 🚀 rke2 🐧 suse
  • ☁️ capo 🚀 rke2 🐧 leapmicro
  • ☁️ capo 🚀 kadm 🐧 ubuntu 🟢 monitoring
  • ☁️ capo 🚀 kadm 🐧 ubuntu 🟢 neuvector,mgmt:harbor
  • ☁️ capo 🚀 rke2 🎬 rolling-update 🛠️ ha 🐧 ubuntu
  • ☁️ capo 🚀 kadm 🎬 wkld-k8s-upgrade 🐧 ubuntu
  • ☁️ capo 🚀 rke2 🎬 rolling-update-no-wkld 🛠️ ha 🐧 suse
  • ☁️ capo 🚀 rke2 🎬 sylva-upgrade 🛠️ ha 🐧 ubuntu
  • ☁️ capo 🚀 rke2 🎬 sylva-upgrade-from-1.6.x 🛠️ ha,misc 🐧 ubuntu
  • ☁️ capo 🚀 rke2 🛠️ ha,misc 🐧 ubuntu
  • ☁️ capo 🚀 rke2 🛠️ misc 🐧 ubuntu 🟢 mgmt:harbor 🔴 neuvector
  • ☁️ capo 🚀 rke2 🛠️ ha,misc,openbao 🐧 suse
  • ☁️ capo 🚀 rke2 🐧 suse 🎬 upgrade-from-prev-tag
  • ☁️ capm3 🚀 rke2 🎬 sylva-upgrade 🐧 suse
  • ☁️ capm3 🚀 kadm 🐧 ubuntu
  • ☁️ capm3 🚀 ck8s 🐧 ubuntu
  • ☁️ capm3 🚀 kadm 🎬 rolling-update-no-wkld 🛠️ ha,misc 🐧 ubuntu
  • ☁️ capm3 🚀 rke2 🎬 wkld-k8s-upgrade 🛠️ ha 🐧 suse
  • ☁️ capm3 🚀 kadm 🎬 rolling-update 🛠️ ha 🐧 ubuntu
  • ☁️ capm3 🚀 rke2 🎬 upgrade-from-prev-release-branch 🛠️ ha 🐧 suse
  • ☁️ capm3 🚀 rke2 🛠️ misc,ha 🐧 suse
  • ☁️ capm3 🚀 rke2 🎬 sylva-upgrade 🛠️ ha 🐧 suse
  • ☁️ capm3 🚀 kadm 🎬 rolling-update 🛠️ ha 🐧 suse
  • ☁️ capm3 🚀 ck8s 🎬 rolling-update 🛠️ ha 🐧 ubuntu
  • ☁️ capm3 🚀 rke2|okd 🎬 no-update 🐧 ubuntu|na
  • ☁️ capm3 🚀 rke2 🐧 suse 🎬 upgrade-from-release-1.5
  • ☁️ capm3 🚀 rke2 🐧 suse 🎬 upgrade-to-main

Global config for deployment pipelines

  • autorun pipelines

  • allow failure on pipelines

  • record sylvactl events

Notes:

  • Enabling autorun will make deployment pipelines to be run automatically without human interaction
  • Disabling allow failure will make deployment pipelines mandatory for pipeline success.
  • if both autorun and allow failure are disabled, deployment pipelines will need manual triggering but will be blocking the pipeline

Be aware: after configuration change, pipeline is not triggered automatically. Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.

Edited by Thomas Morin

Merge request reports

Loading
Loading