Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change object storage monitor service from prometheus to vm #4727

Merged
merged 2 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading