Documentation ¶
Index ¶
- Constants
- Variables
- func CheckComponentStatus(componentEnv string) error
- func ClusterConfirm(clusterData map[string]string) ([]byte, error)
- func ClusterOperations(clusterAction atype.Action) (*unstructured.Unstructured, error)
- func ClusterRegister(accessKey string) (bool, error)
- func CreatePodLog(podLog types.PodLogRequest) (types.PodLog, error)
- func GenerateKubeObject(cid string, accessKey, version string, kubeObjectRequest types.KubeObjRequest) ([]byte, error)
- func GenerateLogPayload(cid, accessKey, version string, podLog types.PodLogRequest) ([]byte, error)
- func GetDynamicAndDiscoveryClient() (discovery.DiscoveryInterface, dynamic.Interface, error)
- func GetGenericK8sClient() (*kubernetes.Clientset, error)
- func GetKubeConfig() (*rest.Config, error)
- func GetKubernetesObjects(request types.KubeObjRequest) ([]*types.KubeObject, error)
- func GetLogs(podName, namespace, container string) (string, error)
- func GetObjectDataByNamespace(namespace string, dynamicClient dynamic.Interface, ...) ([]types.ObjectData, error)
- func IsClusterConfirmed() (bool, string, error)
- func SendKubeObjects(clusterData map[string]string, kubeObjectRequest types.KubeObjRequest) error
- func SendPodLogs(clusterData map[string]string, podLog types.PodLogRequest)
- type AgentComponents
Constants ¶
View Source
const ( AgentConfigName = "agent-config" AgentSecretName = "agent-secret" LiveCheckMaxTries = 6 )
Variables ¶
View Source
var ( AgentNamespace = os.Getenv("AGENT_NAMESPACE") AgentScope = os.Getenv("AGENT_SCOPE") )
View Source
var (
Ctx = context.Background()
)
View Source
var KubeConfig *string
Functions ¶
func CheckComponentStatus ¶
func ClusterOperations ¶
func ClusterOperations(clusterAction atype.Action) (*unstructured.Unstructured, error)
ClusterOperations handles cluster operations
func ClusterRegister ¶
ClusterRegister function creates litmus-portal config map in the litmus namespace
func CreatePodLog ¶
func CreatePodLog(podLog types.PodLogRequest) (types.PodLog, error)
CreatePodLog creates pod log for normal pods and chaos-engine pods
func GenerateKubeObject ¶
func GenerateLogPayload ¶
func GenerateLogPayload(cid, accessKey, version string, podLog types.PodLogRequest) ([]byte, error)
func GetDynamicAndDiscoveryClient ¶
func GetDynamicAndDiscoveryClient() (discovery.DiscoveryInterface, dynamic.Interface, error)
GetDynamicAndDiscoveryClient returns dynamic client and discovery client
func GetGenericK8sClient ¶
func GetGenericK8sClient() (*kubernetes.Clientset, error)
func GetKubeConfig ¶
GetKubeConfig sets up the config for access cluster resource
func GetKubernetesObjects ¶
func GetKubernetesObjects(request types.KubeObjRequest) ([]*types.KubeObject, error)
GetKubernetesObjects is used to get the Kubernetes Object details according to the request type
func GetObjectDataByNamespace ¶
func GetObjectDataByNamespace(namespace string, dynamicClient dynamic.Interface, gvrList []schema.GroupVersionResource) ([]types.ObjectData, error)
GetObjectDataByNamespace uses dynamic client to fetch Kubernetes Objects data.
func IsClusterConfirmed ¶
func SendKubeObjects ¶
func SendKubeObjects(clusterData map[string]string, kubeObjectRequest types.KubeObjRequest) error
SendKubeObjects generates graphql mutation to send kubernetes objects data to graphql server
func SendPodLogs ¶
func SendPodLogs(clusterData map[string]string, podLog types.PodLogRequest)
SendPodLogs generates graphql mutation to send events updates to graphql server
Types ¶
Click to show internal directories.
Click to hide internal directories.