Skip to content

Commit

Permalink
Change object storage monitor service from prometheus to vm (#4727)
Browse files Browse the repository at this point in the history
* change prometheus probe to vm probe

* Deprecate prometheus in objectstorage cluster image
  • Loading branch information
nowinkeyy authored May 11, 2024
1 parent 4c3fac7 commit f04556b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
4 changes: 2 additions & 2 deletions deploy/objectstorage/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# 1. create minio instance
bash scripts/minio.sh
# 2. create prometheus instance
bash scripts/prometheus.sh
# 2. create prometheus instance (Deprecated, now use vm)
# bash scripts/prometheus.sh
# 3. run objectstorage controller
sealos run tars/objectstorage-controller.tar -e cloudDomain=${cloudDomain}
# 4. run objectstorage frontend
Expand Down
41 changes: 32 additions & 9 deletions service/minio/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
apiVersion: monitoring.coreos.com/v1
kind: Probe
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMProbe
metadata:
labels:
namespace: objectstorage-system
release: prometheus
name: object-storage
name: object-storage-cluster
namespace: objectstorage-system
spec:
jobName: object-storage-job
bearerTokenSecret:
name: object-storage-probe
key: token
prober:
path: /minio/v2/metrics/bucket
name: object-storage-probe
jobName: object-storage-cluster-job
targets:
staticConfig:
targets:
- object-storage.objectstorage-system.svc.cluster.local:80
vmProberSpec:
path: /minio/v2/metrics/cluster
scheme: http
url: object-storage.objectstorage-system.svc.cluster.local:80

---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMProbe
metadata:
labels:
namespace: objectstorage-system
release: prometheus
name: object-storage-bucket
namespace: objectstorage-system
spec:
bearerTokenSecret:
key: token
name: object-storage-probe
jobName: object-storage-bucket-job
targets:
staticConfig:
static:
targets:
- object-storage.objectstorage-system.svc.cluster.local:80
vmProberSpec:
path: /minio/v2/metrics/bucket
scheme: http
url: object-storage.objectstorage-system.svc.cluster.local:80
---
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -70,7 +93,7 @@ spec:
- name: OBJECT_STORAGE_INSTANCE
value: object-storage.objectstorage-system.svc.cluster.local:80
- name: PROMETHEUS_SERVICE_HOST
value: http://prometheus-object-storage.objectstorage-system.svc.cluster.local:9090
value: http://vmselect-victoria-metrics-k8s-stack.vm.svc:8481/select/0/prometheus/
image: ghcr.io/labring/sealos-minio-service:latest
imagePullPolicy: Always
name: object-storage-monitor
Expand Down

0 comments on commit f04556b

Please sign in to comment.