From f2bd331db58f00a8a75ed2a24a24128059874c19 Mon Sep 17 00:00:00 2001 From: Mike Kennedy Date: Mon, 16 May 2022 08:52:10 -0700 Subject: [PATCH] Author: Michael Kennedy Committer: Michael Kennedy Signed-off-by: Michael Kennedy Adding support for VMware as a Cloud Provider returned by GetCloudProvider(ctx). --- CHANGELOG-7.md | 1 + system/system.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG-7.md b/CHANGELOG-7.md index 0c8c0a794f..7704b62e64 100644 --- a/CHANGELOG-7.md +++ b/CHANGELOG-7.md @@ -25,6 +25,7 @@ software is upgraded when there are active keepalive failures. entity subscriptions and/or a check named `deregistration`. - Upgraded Go version from 1.17.1 to 1.18.1. - Changed sensu-backend etcd configuration options. +- Added VMware as a value return in `GetCloudProvider` function. ### Removed - Removed sensu-backend upgrade command. May make an appearance again in later versions. diff --git a/system/system.go b/system/system.go index 572766776f..12f33e76a1 100644 --- a/system/system.go +++ b/system/system.go @@ -148,6 +148,10 @@ func GetCloudProvider(ctx context.Context) string { logger.Debug("Running on Azure") return "Azure" } + if strings.Contains(text, "vmware") { + logger.Debug("Running on VMware") + return "VMware" + } case "windows": return cloudMetadataFallback(ctx) }