Documentation ¶
Index ¶
- type DeploymentState
- type 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
- type NodeCondition
- type NodeInfo
- type PodDetails
- type PodInfo
- type ServiceInfo
- type ServiceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentState ¶
type KubeClient ¶
func NewInClusterKube ¶
func NewInClusterKube(logger *slog.Logger) *KubeClient
func NewOutClusterKube ¶
func NewOutClusterKube(logger *slog.Logger) *KubeClient
func (*KubeClient) CreateService ¶
func (k *KubeClient) CreateService(ctx context.Context, svc *ServiceOptions) (*corev1.Service, error)
func (*KubeClient) DeleteServiceByName ¶
func (*KubeClient) GetAllPodsInfo ¶
func (k *KubeClient) GetAllPodsInfo(ctx context.Context) ([]PodInfo, error)
func (*KubeClient) GetAllServicesByNs ¶
func (k *KubeClient) GetAllServicesByNs(ctx context.Context, ns string) ([]ServiceInfo, error)
func (*KubeClient) GetConfigMapByName ¶
func (*KubeClient) GetConfigMaps ¶
func (*KubeClient) GetContainersInDeployment ¶
func (k *KubeClient) GetContainersInDeployment(ctx context.Context, ns string, name string) ([]PodDetails, error)
func (*KubeClient) GetCronJobs ¶
func (k *KubeClient) GetCronJobs()
func (*KubeClient) GetDeploymentLogs ¶
func (*KubeClient) GetDeploymentYaml ¶
func (*KubeClient) GetNamespaces ¶
func (k *KubeClient) GetNamespaces(ctx context.Context) ([]string, error)
func (*KubeClient) GetNodesInfo ¶
func (k *KubeClient) GetNodesInfo(ctx context.Context) ([]NodeInfo, error)
func (*KubeClient) GetPodLogs ¶
func (*KubeClient) ListDeploymentsByNamespace ¶
func (k *KubeClient) ListDeploymentsByNamespace(ctx context.Context, ns string) ([]DeploymentState, error)
func (*KubeClient) ScaleDeploymentsByName ¶
func (k *KubeClient) ScaleDeploymentsByName(ctx context.Context, ns string, name string, replicas int32) (DeploymentState, error)
func (*KubeClient) SetConfigMapByName ¶
func (*KubeClient) UpdateDeploymentYaml ¶
type NodeCondition ¶
type NodeInfo ¶
type NodeInfo struct { NodeName string `json:"nodeName"` CpuQuantity float64 `json:"cpuQuantity"` MemoryQuantity float64 `json:"memoryQuantity"` CpuUsage float64 `json:"cpuUsage"` MemoryUsage float64 `json:"memoryUsage"` PodQuantity float64 `json:"podQuantity"` ContainerCount int `json:"containerCount"` Conditions []NodeCondition `json:"conditions"` Ready bool `json:"ready"` }
type PodDetails ¶
type PodDetails struct { Name string `json:"name"` Status []corev1.ContainerStatus `json:"status"` }
type ServiceInfo ¶
type ServiceOptions ¶
type ServiceOptions struct { Name string `json:"name"` Namespace string `json:"namespace"` Labels map[string]string `json:"labels"` ContainerPort int `json:"containerPort"` ServicePort int `json:"servicePort"` Protocol string `json:"protocol"` Selector map[string]string `json:"selector"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.