ADD: added more labels to identifiy pods

This commit is contained in:
Henry Winkel
2023-08-14 17:09:55 +02:00
parent f767307987
commit 6c2f8f1eb6
3 changed files with 92 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "nlohmann/json_fwd.hpp"
#include "yaml-cpp/node/node.h"
#include <map>
#include <string>
#include <vector>
@@ -23,9 +24,11 @@ namespace kubecontrol
class KubePod
{
public:
KubePod(std::string Label, std::string Uuid, std::string ContainerImage);
KubePod(std::string Owner, std::string Uuid, std::string ContainerImage);
KubePod(std::string Owner, std::string Uuid, std::string Component, std::string ContainerImage);
std::string getUUID();
std::string getLabel();
std::string getOwner();
void setEnvironmentVar(std::string key, std::string val);
std::map<std::string, std::string> GetEnvironmentVars();
@@ -37,6 +40,9 @@ namespace kubecontrol
void setCommand(std::string command);
std::string getCommand();
void setComponent(std::string component);
std::string getComponent();
std::string createYAML();
std::string start(std::string apiAddress,std::string token);
@@ -46,13 +52,17 @@ namespace kubecontrol
private:
std::string Label_;
std::string Owner_;
std::string Uuid_;
std::string Component_;
std::string ContainerImage_;
std::string ContainerRegistry_;
std::string PathToYaml_;
std::string PodCommand_;
YAML::Node YAMLNode_;
std::map<std::string, std::string> EnvirmonentVars_;
std::vector<std::string> Args_;