#pragma once #include "kubecontrol/KubernetesAPI.hpp" #include #include #include #include #include #include namespace kubecontrol { class PodController { public: PodController(std::string pathToKubectlConfig); std::string getServerAddress(); void startPod(KubePod Pod,bool WaitTillRunning = true ); void startPod(std::shared_ptr Pod,bool WaitTillRunning = true ); void stopPod(std::string uuid); void stopAllPods(); std::vector getInfoForAllPods(); PodInfos getInfoForPod(std::string uuid); KubernetesAPI getKubernetesAPI(); private: KubernetesAPI APIInterface_; std::vector> PodList_; std::string Namespace_; std::string ApiCall_; PodInfos extractInfosFromKubePod(KubePod *pod); mutable std::mutex mx_; }; } // namespace ku