From 13441ad0f81b49f4c42d4c8a7c6fc8f465d536d2 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Sat, 18 Dec 2021 04:16:54 +0530 Subject: [PATCH] Add IsKubernetes and IsDocker to health data (#13936) --- cmd/admin-handlers.go | 4 ++++ go.mod | 4 ++-- go.sum | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index fe2cce519..d3362bdcf 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1869,6 +1869,8 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque } tls := getTLSInfo() + isK8s := IsKubernetes() + isDocker := IsDocker() healthInfo.Minio.Info = madmin.MinioInfo{ Mode: infoMessage.Mode, Domain: infoMessage.Domain, @@ -1882,6 +1884,8 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque Backend: infoMessage.Backend, Servers: servers, TLS: &tls, + IsKubernetes: &isK8s, + IsDocker: &isDocker, } partialWrite(healthInfo) } diff --git a/go.mod b/go.mod index 096c5b859..e925a0ec0 100644 --- a/go.mod +++ b/go.mod @@ -49,8 +49,7 @@ require ( github.com/minio/csvparser v1.0.0 github.com/minio/highwayhash v1.0.2 github.com/minio/kes v0.14.0 - github.com/minio/madmin-go v1.1.17 - github.com/minio/mc v0.0.0-20211207230606-23a05f5a17f2 // indirect + github.com/minio/madmin-go v1.1.18 github.com/minio/minio-go/v7 v7.0.17 github.com/minio/parquet-go v1.1.0 github.com/minio/pkg v1.1.9 @@ -168,6 +167,7 @@ require ( github.com/minio/colorjson v1.0.1 // indirect github.com/minio/direct-csi v1.3.5-0.20210601185811-f7776f7961bf // indirect github.com/minio/filepath v1.0.0 // indirect + github.com/minio/mc v0.0.0-20211207230606-23a05f5a17f2 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/operator v0.0.0-20211011212245-31460bbbc4b7 // indirect github.com/minio/operator/logsearchapi v0.0.0-20211011212245-31460bbbc4b7 // indirect diff --git a/go.sum b/go.sum index dafeb1e70..e425b0ba9 100644 --- a/go.sum +++ b/go.sum @@ -1087,8 +1087,9 @@ github.com/minio/kes v0.14.0 h1:plCGm4LwR++T1P1sXsJbyFRX54CE1WRuo9PAPj6MC3Q= github.com/minio/kes v0.14.0/go.mod h1:OUensXz2BpgMfiogslKxv7Anyx/wj+6bFC6qA7BQcfA= github.com/minio/madmin-go v1.0.12/go.mod h1:BK+z4XRx7Y1v8SFWXsuLNqQqnq5BO/axJ8IDJfgyvfs= github.com/minio/madmin-go v1.1.15/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= -github.com/minio/madmin-go v1.1.17 h1:P7my58nSulXawjixhS4S2pT43+3M+Y0P7M43I3YdzGo= github.com/minio/madmin-go v1.1.17/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= +github.com/minio/madmin-go v1.1.18 h1:1jXRb9LTiXqbZWBjXYmlqI5eCWsyZlprrI5CEVQjjqY= +github.com/minio/madmin-go v1.1.18/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= github.com/minio/mc v0.0.0-20211207230606-23a05f5a17f2 h1:xocb1RGyrDJ8PxkNn0NSbaBlfdU6J/Ag9QK62pb7nR8= github.com/minio/mc v0.0.0-20211207230606-23a05f5a17f2/go.mod h1:siI9jWTzj1KsNXgz6NOL/S7OTaAUM0OMi+zEkF08gnA= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=