-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
containerInfo Plugin: list the Docker and Kubernetes containers in a …
…guest VM. Added code for a new open-vm-tools plugin, containerInfo. - Added a new configure option --disable-containerinfo to disable building the containerinfo plugin. --disable-containerinfo : Will not check for any dependent packages and will not build the containerinfo plugin. --enable-containerinfo=no : Same as --disable-containerinfo --enable-containerinfo=auto : Checks for the dependent packages. If they are available, then the containerinfo plugin will be built. Otherwise, a warning is printeds and the containerinfo plugin will be skipped. --enable-containerinfo --enable-containerinfo=yes : Checks for the dependent packages. If they are available, then the containerinfo plugin will be built. Otherwise, the configure will terminate with an error. - Updated the sample tools.conf file with various settings related to the containerinfo plugin. - Due to an issue reported in protocolbuffers/protobuf#9184, implemented a workaround by changing 'import weak ' to 'import ' in the .proto files while generating the header files. Build dependencies: (packages names may vary with Linux release). - or - - libcurl4-openssl-dev libcurl-devel - protobuf-compiler protobuf-compiler - libprotobuf-dev protobuf-devel - protobuf-compiler-grpc grpc-plugins - libgrpc++-dev grpc-devel - golang-github-containerd-containerd-dev containerd-devel - golang-github-gogo-protobuf-dev Runtime requirements: - curl, protobug and grpc-cpp
- Loading branch information
Showing
11 changed files
with
2,553 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/********************************************************* | ||
* Copyright (C) 2021 VMware, Inc. All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published | ||
* by the Free Software Foundation version 2.1 and no later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
*********************************************************/ | ||
|
||
#ifndef _CONTAINERINFO_H_ | ||
#define _CONTAINERINFO_H_ | ||
|
||
/** | ||
* @file containerInfo.h | ||
* | ||
* Common declarations that aid in sending container information | ||
* from 'containerInfo' plugin in 'VMware Tools' to the host. | ||
*/ | ||
|
||
/* | ||
Sample JSON published to the guestinfo variable. | ||
$ vmtoolsd --cmd "info-get guestinfo.vmtools.containerInfo" | jq | ||
{ | ||
"version": "1", | ||
"updateCounter": "11", | ||
"publishTime": "2021-10-27T18:18:00.855Z", | ||
"containerinfo": { | ||
"k8s.io": [ | ||
{ | ||
"i": "k8s.gcr.io/pause" | ||
} | ||
] | ||
} | ||
} | ||
*/ | ||
|
||
/* clang-format off */ | ||
|
||
#define CONTAINERINFO_KEY "containerinfo" | ||
#define CONTAINERINFO_GUESTVAR_KEY "vmtools." CONTAINERINFO_KEY | ||
#define CONTAINERINFO_VERSION_1 1 | ||
#define CONTAINERINFO_KEY_VERSION "version" | ||
#define CONTAINERINFO_KEY_UPDATE_COUNTER "updateCounter" | ||
#define CONTAINERINFO_KEY_PUBLISHTIME "publishTime" | ||
#define CONTAINERINFO_KEY_IMAGE "i" | ||
|
||
/* clang-format on */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.