diff --git a/deploy/objectstorage/scripts/init.sh b/deploy/objectstorage/scripts/init.sh index 30a751dc66f..0c632f0c10e 100644 --- a/deploy/objectstorage/scripts/init.sh +++ b/deploy/objectstorage/scripts/init.sh @@ -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 diff --git a/service/minio/deploy/manifests/deploy.yaml.tmpl b/service/minio/deploy/manifests/deploy.yaml.tmpl index 6f3221e9747..b773484fe9a 100644 --- a/service/minio/deploy/manifests/deploy.yaml.tmpl +++ b/service/minio/deploy/manifests/deploy.yaml.tmpl @@ -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 @@ -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