Versions in this module Expand all Collapse all v0 v0.1.0 Jun 22, 2024 Changes in this version + type DeploymentState struct + AvailableRelicas int32 + CreatedAt time.Time + Labels map[string]string + Name string + ReadyReplicas int32 + Replicas int32 + Status string + type KubeClient struct + Client *kubernetes.Clientset + Config *rest.Config + Logger *slog.Logger + func NewInClusterKube(logger *slog.Logger) *KubeClient + func NewOutClusterKube(logger *slog.Logger) *KubeClient + func (k *KubeClient) CreateService(ctx context.Context, svc *ServiceOptions) (*corev1.Service, error) + func (k *KubeClient) DeleteServiceByName(ctx context.Context, ns string, name string) error + func (k *KubeClient) GetAllPodsInfo(ctx context.Context) ([]PodInfo, error) + func (k *KubeClient) GetAllServicesByNs(ctx context.Context, ns string) ([]ServiceInfo, error) + func (k *KubeClient) GetConfigMapByName(ctx context.Context, ns string, name string) (map[string]string, error) + func (k *KubeClient) GetConfigMaps(ctx context.Context, ns string) ([]string, error) + func (k *KubeClient) GetContainersInDeployment(ctx context.Context, ns string, name string) ([]PodDetails, error) + func (k *KubeClient) GetCronJobs() + func (k *KubeClient) GetDeploymentLogs(ctx context.Context, ns string, name string) ([]*rest.Request, error) + func (k *KubeClient) GetDeploymentYaml(ctx context.Context, ns string, name string) (string, error) + func (k *KubeClient) GetNamespaces(ctx context.Context) ([]string, error) + func (k *KubeClient) GetNodesInfo(ctx context.Context) ([]NodeInfo, error) + func (k *KubeClient) GetPodLogs(ctx context.Context, ns string, name string) *rest.Request + func (k *KubeClient) ListDeploymentsByNamespace(ctx context.Context, ns string) ([]DeploymentState, error) + func (k *KubeClient) ScaleDeploymentsByName(ctx context.Context, ns string, name string, replicas int32) (DeploymentState, error) + func (k *KubeClient) SetConfigMapByName(ctx context.Context, ns string, name string, data map[string]string) error + func (k *KubeClient) UpdateDeploymentYaml(ctx context.Context, ns string, name string, updatedSpecYaml string) (string, error) + type NSListOpts struct + type NodeCondition struct + LastHeartBeat time.Time + Message string + Status string + Type string + type NodeInfo struct + Conditions []NodeCondition + ContainerCount int + CpuQuantity float64 + CpuUsage float64 + MemoryQuantity float64 + MemoryUsage float64 + NodeName string + PodQuantity float64 + Ready bool + type PodDetails struct + Name string + Status []corev1.ContainerStatus + type PodInfo struct + CPU float64 + Memory float64 + Name string + Namespace string + Restarts int32 + Status string + type ServiceInfo struct + ClusterIp string + CreatedAt v1.Time + ExternalIp string + Name string + Ports string + Type string + type ServiceOptions struct + ContainerPort int + Labels map[string]string + Name string + Namespace string + Protocol string + Selector map[string]string + ServicePort int + Type string