|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* MinIO Cloud Storage, (C) 2015, 2016, 2017 MinIO, Inc. |
|
|
|
* MinIO Cloud Storage, (C) 2015-2020 MinIO, Inc. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -163,8 +163,8 @@ func IsKubernetes() bool { |
|
|
|
if env.Get("MINIO_CI_CD", "") == "" { |
|
|
|
if env.Get("MINIO_CI_CD", "") == "" { |
|
|
|
// Kubernetes env used to validate if we are
|
|
|
|
// Kubernetes env used to validate if we are
|
|
|
|
// indeed running inside a kubernetes pod
|
|
|
|
// indeed running inside a kubernetes pod
|
|
|
|
// is KUBERNETES_SERVICE_HOST but in future
|
|
|
|
// is KUBERNETES_SERVICE_HOST
|
|
|
|
// we might need to enhance this.
|
|
|
|
// https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_pods.go#L541
|
|
|
|
return env.Get("KUBERNETES_SERVICE_HOST", "") != "" |
|
|
|
return env.Get("KUBERNETES_SERVICE_HOST", "") != "" |
|
|
|
} |
|
|
|
} |
|
|
|
return false |
|
|
|
return false |
|
|
@ -274,6 +274,15 @@ func getUserAgent(mode string) string { |
|
|
|
if helmChartVersion != "" { |
|
|
|
if helmChartVersion != "" { |
|
|
|
uaAppend(" MinIO/helm-", helmChartVersion) |
|
|
|
uaAppend(" MinIO/helm-", helmChartVersion) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// In Kubernetes environment, try to fetch the Operator, VSPHERE plugin version
|
|
|
|
|
|
|
|
opVersion := env.Get("MINIO_OPERATOR_VERSION", "") |
|
|
|
|
|
|
|
if opVersion != "" { |
|
|
|
|
|
|
|
uaAppend(" MinIO/operator-", opVersion) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
vsphereVersion := env.Get("MINIO_VSPHERE_PLUGIN_VERSION", "") |
|
|
|
|
|
|
|
if vsphereVersion != "" { |
|
|
|
|
|
|
|
uaAppend(" MinIO/vsphere-plugin-", vsphereVersion) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pcfTileVersion := env.Get("MINIO_PCF_TILE_VERSION", "") |
|
|
|
pcfTileVersion := env.Get("MINIO_PCF_TILE_VERSION", "") |
|
|
|