Documentation ¶
Index ¶
- Constants
- Variables
- type ActionHandle
- type ApplyParams
- type ApplyResource
- type BuildCluster
- type BuildConfigMap
- type BuildContainer
- type BuildCronJob
- type BuildDaemonSet
- type BuildDeployment
- type BuildEndpoints
- type BuildEvent
- type BuildHorizontalPodAutoscaler
- type BuildIngress
- type BuildJob
- type BuildNamespace
- type BuildNetworkPolicy
- type BuildNewIngress
- type BuildNode
- type BuildPersistentVolume
- type BuildPersistentVolumeClaim
- type BuildPod
- type BuildRole
- type BuildRoleBinding
- type BuildSecret
- type BuildService
- type BuildServiceAccount
- type BuildStatefulSet
- type BuildStorageClass
- type Cluster
- type ClusterQueryParams
- type ClusterRole
- type ClusterRoleBinding
- type Configmap
- type CronJob
- type CustomResource
- type CustomResourceDefinition
- type CustomResourceDeleteParams
- type CustomResourceParam
- type CustomResourceQueryParams
- type DaemonSet
- type DeleteCustomResource
- type DeleteParamResource
- type DeleteParams
- type Deployment
- type Endpoints
- type Event
- type Helm
- func (h *Helm) Create(requestParams interface{}) *utils.Response
- func (h *Helm) Delete(requestParams interface{}) *utils.Response
- func (h *Helm) Get(params interface{}) *utils.Response
- func (h *Helm) GetReleaseObjects(release *release.Release) []*unstructured.Unstructured
- func (h *Helm) GetReleaseRuntimeState(rel *release.Release, withResource bool) (*ReleaseRuntimeState, error)
- func (h *Helm) List(params interface{}) *utils.Response
- func (h *Helm) Update(requestParams interface{}) *utils.Response
- type HelmGetParams
- type HelmListParams
- type HelmObjectParams
- type HorizontalPodAutoscaler
- type Ingress
- type Job
- type Namespace
- type NetworkPolicy
- type Node
- type OutWriter
- type PatchParams
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- func (p *Pod) Exec(params interface{}, writer OutWriter) *utils.Response
- func (p *Pod) ExecStdIn(params interface{}) *utils.Response
- func (p *Pod) Log(params interface{}, writer OutWriter) *utils.Response
- func (p *Pod) ToBuildContainer(statuses []corev1.ContainerStatus, container *corev1.Container) *BuildContainer
- func (p *Pod) ToBuildPod(pod *corev1.Pod) *BuildPod
- type PodExecParams
- type PodLogParams
- type QueryParams
- type ReleaseRuntimeState
- type Resource
- func (r *Resource) Apply(params interface{}) *utils.Response
- func (r *Resource) Delete(params interface{}) *utils.Response
- func (r *Resource) Get(params interface{}) *utils.Response
- func (r *Resource) Handle(action string, params interface{}) *utils.Response
- func (r *Resource) List(params interface{}) *utils.Response
- func (r *Resource) Patch(params interface{}) *utils.Response
- func (r *Resource) Update(params interface{}) *utils.Response
- func (r *Resource) Watch(params interface{}, writer OutWriter) *utils.Response
- type Role
- type RoleBinding
- type Secret
- type Service
- type ServiceAccount
- type StatefulSet
- type StdInParams
- type StorageClass
- type UpdateCustomResourceParams
- type UpdateParams
Constants ¶
View Source
const ( ReleaseStatusRunning = "Running" ReleaseStatusNotReady = "NotReady" ReleaseStatusRunningFault = "RunningFault" )
Variables ¶
View Source
var ( NetworkIngressGVR = &schema.GroupVersionResource{ Group: "networking.k8s.io", Version: "v1", Resource: "ingresses", } ExtensionIngressGVR = &schema.GroupVersionResource{ Group: "extensions", Version: "v1beta1", Resource: "ingresses", } )
View Source
var ( RoleGVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "roles", } RoleV1Beta1GVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "roles", } ClusterRoleGVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterroles", } ClusterRoleV1Beta1GVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterroles", } )
View Source
var ( RoleBindingGVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "rolebindings", } RoleBindingV1Beta1GVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "rolebindings", } ClusterRoleBindingGVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterrolebindings", } ClusterRoleBindingV1Beta1GVR = &schema.GroupVersionResource{ Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterrolebindings", } )
View Source
var ConfigmapGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "configmaps",
}
View Source
var CronJobGVR = &schema.GroupVersionResource{
Group: "batch",
Version: "v1beta1",
Resource: "cronjobs",
}
View Source
var CronJobV1GVR = &schema.GroupVersionResource{
Group: "batch",
Version: "v1",
Resource: "cronjobs",
}
View Source
var CustomResourceDefinitionGVR = &schema.GroupVersionResource{
Group: "apiextensions.k8s.io",
Version: "v1",
Resource: "customresourcedefinitions",
}
View Source
var CustomResourceDefinitionV1beta1GVR = &schema.GroupVersionResource{
Group: "apiextensions.k8s.io",
Version: "v1beta1",
Resource: "customresourcedefinitions",
}
View Source
var DaemonSetGVR = &schema.GroupVersionResource{
Group: "apps",
Version: "v1",
Resource: "daemonsets",
}
View Source
var DeploymentGVR = &schema.GroupVersionResource{
Group: "apps",
Version: "v1",
Resource: "deployments",
}
View Source
var EndpointsGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "endpoints",
}
View Source
var EventGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "namespaces",
}
View Source
var HorizontalPodAutoscalerGVR = &schema.GroupVersionResource{
Group: "autoscaling",
Version: "v2beta1",
Resource: "horizontalpodautoscalers",
}
View Source
var HorizontalPodAutoscalerV1GVR = &schema.GroupVersionResource{
Group: "autoscaling",
Version: "v1",
Resource: "horizontalpodautoscalers",
}
View Source
var JobGVR = &schema.GroupVersionResource{
Group: "batch",
Version: "v1",
Resource: "jobs",
}
View Source
var NamespaceGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "namespaces",
}
View Source
var NetworkPolicyGVR = &schema.GroupVersionResource{
Group: "networking.k8s.io",
Version: "v1",
Resource: "networkpolicies",
}
View Source
var NodeGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "nodes",
}
View Source
var PersistentVolumeClaimGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "persistentvolumeclaims",
}
View Source
var PersistentVolumeGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "persistentvolumes",
}
View Source
var PodGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "pods",
}
View Source
var SecretGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "secrets",
}
View Source
var ServiceAccountGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "serviceaccounts",
}
View Source
var ServiceGVR = &schema.GroupVersionResource{
Group: "",
Version: "v1",
Resource: "services",
}
View Source
var StatefulSetGVR = &schema.GroupVersionResource{
Group: "apps",
Version: "v1",
Resource: "statefulsets",
}
View Source
var StorageClassGVR = &schema.GroupVersionResource{
Group: "storage.k8s.io",
Version: "v1",
Resource: "storageclasses",
}
View Source
var StorageClassV1Beta1GVR = &schema.GroupVersionResource{
Group: "storage.k8s.io",
Version: "v1beta1",
Resource: "storageclasses",
}
View Source
var WorkloadGVRMap = map[string]*schema.GroupVersionResource{ "Deployment": DeploymentGVR, "StatefulSet": StatefulSetGVR, "DaemonSet": DaemonSetGVR, "Job": JobGVR, "CronJob": CronJobGVR, }
Functions ¶
This section is empty.
Types ¶
type ActionHandle ¶
type ApplyParams ¶
type ApplyResource ¶
type BuildCluster ¶
type BuildCluster struct { ClusterVersion string `json:"cluster_version"` ClusterCpu string `json:"cluster_cpu"` ClusterMemory string `json:"cluster_memory"` NodeNum int `json:"node_num"` NamespaceNum int `json:"namespace_num"` EventNum int `json:"event_num"` CrdNum int `json:"crd_num"` ServiceaccountNum int `json:"serviceaccount_num"` PodNum int `json:"pod_num"` PodRunningNum int `json:"pod_running_num"` PodSucceededNum int `json:"pod_succeeded_num"` PodPendingNum int `json:"pod_pending_num"` PodFailedNum int `json:"pod_failed_num"` DeploymentNum int `json:"deployment_num"` StatefulSetNum int `json:"statefulset_num"` DaemonSetNum int `json:"daemonset_num"` JobNum int `json:"job_num"` CronjobNum int `json:"cronjob_num"` ServiceNum int `json:"service_num"` IngressNum int `json:"ingress_num"` StorageClassNum int `json:"storageclass_num"` PVNum int `json:"pv_num"` PVAvailableNum int `json:"pv_available_num"` PVReleasedNum int `json:"pv_released_num"` PVBoundNum int `json:"pv_bound_num"` PVFailedNum int `json:"pv_failed_num"` PVCNum int `json:"pvc_num"` ConfigMapNum int `json:"config_map_num"` SecretNum int `json:"secret_num"` }
type BuildConfigMap ¶
type BuildContainer ¶
type BuildCronJob ¶
type BuildCronJob struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Active []corev1.ObjectReference `json:"active"` LastScheduleTime *metav1.Time `json:"last_schedule_time"` Schedule string `json:"schedule"` ConcurrencyPolicy string `json:"concurrency_policy"` ResourceVersion string `json:"resource_version"` Suspend string `json:"suspend"` Created metav1.Time `json:"created"` }
type BuildDaemonSet ¶
type BuildDaemonSet struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` DesiredNumberScheduled int32 `json:"desired_number_scheduled"` NumberReady int32 `json:"number_ready"` ResourceVersion string `json:"resource_version"` Strategy string `json:"strategy"` Conditions []string `json:"conditions"` NodeSelector map[string]string `json:"node_selector"` Created metav1.Time `json:"created"` }
type BuildDeployment ¶
type BuildDeployment struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Replicas int32 `json:"replicas"` StatusReplicas int32 `json:"status_replicas"` ReadyReplicas int32 `json:"ready_replicas"` UpdatedReplicas int32 `json:"updated_replicas"` AvailableReplicas int32 `json:"available_replicas"` ResourceVersion string `json:"resource_version"` Strategy string `json:"strategy"` Conditions []string `json:"conditions"` Created metav1.Time `json:"created"` }
type BuildEndpoints ¶
type BuildEvent ¶
type BuildEvent struct { UID string `json:"uid"` Namespace string `json:"namespace"` Reason string `json:"reason"` Message string `json:"message"` Type string `json:"type"` Object *corev1.ObjectReference `json:"object"` Source *corev1.EventSource `json:"source"` EventTime metav1.Time `json:"event_time"` Count int32 `json:"count"` ResourceVersion string `json:"resource_version"` }
type BuildHorizontalPodAutoscaler ¶
type BuildHorizontalPodAutoscaler struct { Name string `json:"name"` NameSpace string `json:"namespace"` MinPods *int32 `json:"min_pods"` MaxPods int32 `json:"max_pods"` Replicas int32 `json:"replicas"` //Status autoscalingv2beta1.HorizontalPodAutoscalerStatus `json:"status"` CreateTime metav1.Time `json:"create_time"` TargetCpuPer *int32 `json:"target_cpu_per"` CurrentCpuPer *int32 `json:"current_cpu_per"` }
type BuildIngress ¶
type BuildIngress struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Backend *extv1betav1.IngressBackend `json:"backend"` TLS []extv1betav1.IngressTLS `json:"tls"` Rules []extv1betav1.IngressRule `json:"rules"` Created metav1.Time `json:"created"` ResourceVersion string `json:"resource_version"` }
type BuildJob ¶
type BuildJob struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Completions *int32 `json:"completions"` Active int32 `json:"active"` Succeeded int32 `json:"succeeded"` Failed int32 `json:"failed"` ResourceVersion string `json:"resource_version"` Conditions []string `json:"conditions"` NodeSelector map[string]string `json:"node_selector"` Created metav1.Time `json:"created"` }
type BuildNamespace ¶
type BuildNetworkPolicy ¶
type BuildNewIngress ¶
type BuildNewIngress struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Backend *networkingv1.IngressBackend `json:"backend"` TLS []networkingv1.IngressTLS `json:"tls"` Rules []networkingv1.IngressRule `json:"rules"` Created metav1.Time `json:"created"` ResourceVersion string `json:"resource_version"` }
type BuildNode ¶
type BuildNode struct { UID string `json:"uid"` Name string `json:"name"` Taints int `json:"taints"` Roles string `json:"roles"` Version string `json:"version"` Age string `json:"age"` Status string `json:"status"` OS string `json:"os"` OSImage string `json:"os_image"` KernelVersion string `json:"kernel_version"` ContainerRuntime string `json:"container_runtime"` Labels map[string]string `json:"labels"` TotalCPU string `json:"total_cpu"` AllocatableCpu string `json:"allocatable_cpu"` TotalMem string `json:"total_mem"` AllocatableMem string `json:"allocatable_mem"` InternalIP string `json:"internal_ip"` Created metav1.Time `json:"created"` }
type BuildPersistentVolume ¶
type BuildPersistentVolume struct { UID string `json:"uid"` Name string `json:"name"` Status string `json:"status"` Claim string `json:"claim"` ClaimNamespace string `json:"claim_namespace"` StorageClass string `json:"storage_class"` Capacity string `json:"capacity"` AccessModes []corev1.PersistentVolumeAccessMode `json:"access_modes"` CreateTime metav1.Time `json:"create_time"` ReclaimPolicy corev1.PersistentVolumeReclaimPolicy `json:"reclaim_policy"` }
type BuildPersistentVolumeClaim ¶
type BuildPersistentVolumeClaim struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Status string `json:"status"` StorageClass *string `json:"storage_class"` Capacity string `json:"capacity"` AccessModes []corev1.PersistentVolumeAccessMode `json:"access_modes"` CreateTime metav1.Time `json:"create_time"` ReclaimPolicy corev1.PersistentVolumeReclaimPolicy `json:"reclaim_policy"` }
type BuildPod ¶
type BuildPod struct { UID string `json:"uid"` Labels map[string]string `json:"labels"` Name string `json:"name"` Namespace string `json:"namespace"` Containers []*BuildContainer `json:"containers"` InitContainers []*BuildContainer `json:"init_containers"` Controlled string `json:"controlled"` ControlledName string `json:"controlled_name"` Qos string `json:"qos"` Created metav1.Time `json:"created"` Status string `json:"status"` Ip string `json:"ip"` NodeName string `json:"node_name"` ResourceVersion string `json:"resource_version"` ContainerNum int `json:"containerNum"` Restarts int32 `json:"restarts"` }
type BuildRoleBinding ¶
type BuildRoleBinding struct { UID string `json:"uid"` Kind string `json:"kind"` Name string `json:"name"` Namespace string `json:"namespace"` Subjects []rbacv1.Subject `json:"subjects"` Role rbacv1.RoleRef `json:"role"` ResourceVersion string `json:"resource_version"` Created metav1.Time `json:"created"` }
type BuildSecret ¶
type BuildService ¶
type BuildService struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Type string `json:"type"` ClusterIP string `json:"cluster_ip"` Ports []corev1.ServicePort `json:"ports"` ExternalIP []string `json:"external_ip"` Selector map[string]string `json:"selector"` ResourceVersion string `json:"resource_version"` Created metav1.Time `json:"created"` }
type BuildServiceAccount ¶
type BuildStatefulSet ¶
type BuildStatefulSet struct { UID string `json:"uid"` Name string `json:"name"` Namespace string `json:"namespace"` Replicas int32 `json:"replicas"` StatusReplicas int32 `json:"status_replicas"` ReadyReplicas int32 `json:"ready_replicas"` UpdatedReplicas int32 `json:"updated_replicas"` ResourceVersion string `json:"resource_version"` Strategy string `json:"strategy"` Conditions []string `json:"conditions"` Created metav1.Time `json:"created"` }
type BuildStorageClass ¶
type BuildStorageClass struct { UID string `json:"uid"` Name string `json:"name"` CreateTime metav1.Time `json:"create_time"` Provisioner string `json:"provisioner"` ReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"reclaim_policy"` VolumeBindingMode string `json:"binding_mode"` ResourceVersion string `json:"resource_version"` }
type Cluster ¶
type Cluster struct {
*Resource
}
func NewCluster ¶
func NewCluster(config *config.KubeConfig) *Cluster
func (*Cluster) WorkspaceOverview ¶
func (c *Cluster) WorkspaceOverview(queryParams *ClusterQueryParams) *utils.Response
type ClusterQueryParams ¶
type ClusterRole ¶
type ClusterRole struct {
*Resource
}
func NewClusterRole ¶
func NewClusterRole(config *config.KubeConfig) *ClusterRole
func (*ClusterRole) ToBuildClusterRole ¶
func (s *ClusterRole) ToBuildClusterRole(role *rbacv1.ClusterRole) *BuildRole
type ClusterRoleBinding ¶
type ClusterRoleBinding struct {
*Resource
}
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(config *config.KubeConfig) *ClusterRoleBinding
func (*ClusterRoleBinding) ToBuildClusterRoleBinding ¶
func (s *ClusterRoleBinding) ToBuildClusterRoleBinding(roleBinding *rbacv1.ClusterRoleBinding) *BuildRoleBinding
type Configmap ¶
type Configmap struct {
*Resource
}
func NewConfigmap ¶
func NewConfigmap(config *config.KubeConfig) *Configmap
func (*Configmap) ToBuildConfigMap ¶
func (c *Configmap) ToBuildConfigMap(cm *corev1.ConfigMap) *BuildConfigMap
type CronJob ¶
type CronJob struct {
*Resource
}
func NewCronJob ¶
func NewCronJob(config *config.KubeConfig) *CronJob
func (*CronJob) ToBuildCronJob ¶
func (c *CronJob) ToBuildCronJob(cronjob *batchv1.CronJob) *BuildCronJob
type CustomResource ¶
type CustomResource struct {
*Resource
}
func NewCustomResource ¶
func NewCustomResource(config *config.KubeConfig) *CustomResource
func (*CustomResource) Delete ¶
func (c *CustomResource) Delete(params interface{}) *utils.Response
func (*CustomResource) Get ¶
func (c *CustomResource) Get(params interface{}) *utils.Response
func (*CustomResource) List ¶
func (c *CustomResource) List(params interface{}) *utils.Response
func (*CustomResource) Update ¶
func (c *CustomResource) Update(params interface{}) *utils.Response
type CustomResourceDefinition ¶
type CustomResourceDefinition struct {
*Resource
}
func NewCustomResourceDefinition ¶
func NewCustomResourceDefinition(config *config.KubeConfig) *CustomResourceDefinition
type CustomResourceDeleteParams ¶
type CustomResourceDeleteParams struct { CustomResourceParam Resources []*DeleteCustomResource `json:"resources"` }
type CustomResourceParam ¶
type CustomResourceQueryParams ¶
type CustomResourceQueryParams struct { CustomResourceParam Namespace string `json:"namespace" form:"namespace"` Name string `json:"name" form:"name"` Output string `json:"output" form:"output"` }
type DaemonSet ¶
type DaemonSet struct {
*Resource
}
func NewDaemonSet ¶
func NewDaemonSet(config *config.KubeConfig) *DaemonSet
func (*DaemonSet) ToBuildDaemonSet ¶
func (d *DaemonSet) ToBuildDaemonSet(ds *appsv1.DaemonSet) *BuildDaemonSet
type DeleteCustomResource ¶
type DeleteParamResource ¶
type DeleteParams ¶
type DeleteParams struct { Namespace string `json:"namespace"` Resources []*DeleteParamResource `json:"resources"` LabelSelector *metav1.LabelSelector `json:"label_selector" form:"label_selector"` }
type Deployment ¶
type Deployment struct {
*Resource
}
func NewDeployment ¶
func NewDeployment(config *config.KubeConfig) *Deployment
func (*Deployment) ToBuildDeployment ¶
func (d *Deployment) ToBuildDeployment(dp *appsv1.Deployment) *BuildDeployment
type Endpoints ¶
type Endpoints struct {
*Resource
}
func NewEndpoints ¶
func NewEndpoints(config *config.KubeConfig) *Endpoints
func (*Endpoints) ToBuildEndpoints ¶
func (e *Endpoints) ToBuildEndpoints(endpoints *corev1.Endpoints) *BuildEndpoints
type Event ¶
type Event struct {
*Resource
}
func NewEvent ¶
func NewEvent(config *config.KubeConfig) *Event
func (*Event) ToBuildEvent ¶
func (e *Event) ToBuildEvent(event *corev1.Event) *BuildEvent
type Helm ¶
type Helm struct {
*Resource
}
func NewHelm ¶
func NewHelm(conf *config.KubeConfig) *Helm
func (*Helm) GetReleaseObjects ¶
func (h *Helm) GetReleaseObjects(release *release.Release) []*unstructured.Unstructured
func (*Helm) GetReleaseRuntimeState ¶
type HelmGetParams ¶
type HelmListParams ¶
type HelmObjectParams ¶
type HorizontalPodAutoscaler ¶
type HorizontalPodAutoscaler struct {
*Resource
}
func NewHorizontalPodAutoscaler ¶
func NewHorizontalPodAutoscaler(config *config.KubeConfig) *HorizontalPodAutoscaler
func (*HorizontalPodAutoscaler) ToBuildHorizontalPodAutoscaler ¶
func (h *HorizontalPodAutoscaler) ToBuildHorizontalPodAutoscaler(hpa *autoscalingv2beta1.HorizontalPodAutoscaler) *BuildHorizontalPodAutoscaler
func (*HorizontalPodAutoscaler) ToBuildV1HorizontalPodAutoscaler ¶
func (h *HorizontalPodAutoscaler) ToBuildV1HorizontalPodAutoscaler(hpa *autoscalingv1.HorizontalPodAutoscaler) *BuildHorizontalPodAutoscaler
type Ingress ¶
type Ingress struct {
*Resource
}
func NewIngress ¶
func NewIngress(config *config.KubeConfig) *Ingress
func (*Ingress) ToBuildIngress ¶
func (i *Ingress) ToBuildIngress(ingress *extv1betav1.Ingress) *BuildIngress
func (*Ingress) ToBuildNewIngress ¶
func (i *Ingress) ToBuildNewIngress(ingress *networkingv1.Ingress) *BuildNewIngress
type Namespace ¶
type Namespace struct {
*Resource
}
func NewNamespace ¶
func NewNamespace(config *config.KubeConfig) *Namespace
func (*Namespace) ToBuildNamespace ¶
func (n *Namespace) ToBuildNamespace(ns *corev1.Namespace) *BuildNamespace
type NetworkPolicy ¶
type NetworkPolicy struct {
*Resource
}
func NewNetworkPolicy ¶
func NewNetworkPolicy(config *config.KubeConfig) *NetworkPolicy
func (*NetworkPolicy) ToBuildNetworkPolicy ¶
func (n *NetworkPolicy) ToBuildNetworkPolicy(networkpolicy *networkv1.NetworkPolicy) *BuildNetworkPolicy
type Node ¶
type Node struct {
*Resource
}
func NewNode ¶
func NewNode(config *config.KubeConfig) *Node
type OutWriter ¶
type OutWriter interface { Write(interface{}) error StopCh() <-chan struct{} Close() }
type PatchParams ¶
type PersistentVolume ¶
type PersistentVolume struct {
*Resource
}
func NewPersistentVolume ¶
func NewPersistentVolume(config *config.KubeConfig) *PersistentVolume
func (*PersistentVolume) ToBuildPersistentVolume ¶
func (p *PersistentVolume) ToBuildPersistentVolume(pv *corev1.PersistentVolume) *BuildPersistentVolume
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct {
*Resource
}
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(config *config.KubeConfig) *PersistentVolumeClaim
func (*PersistentVolumeClaim) ToBuildPersistentVolumeClaim ¶
func (p *PersistentVolumeClaim) ToBuildPersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim) *BuildPersistentVolumeClaim
type Pod ¶
type Pod struct { *Resource // contains filtered or unexported fields }
func NewPod ¶
func NewPod(config *config.KubeConfig) *Pod
func (*Pod) ToBuildContainer ¶
func (p *Pod) ToBuildContainer(statuses []corev1.ContainerStatus, container *corev1.Container) *BuildContainer
type PodExecParams ¶
type PodLogParams ¶
type QueryParams ¶
type QueryParams struct { Kind string `json:"kind" form:"kind"` Name string `json:"name" form:"name"` Namespace string `json:"namespace" form:"namespace"` Output string `json:"output" form:"output"` LabelSelector *metav1.LabelSelector `json:"label_selector" form:"label_selector"` Names []string `json:"names" form:"names"` ResourceVersion string `json:"resourceVersion" form:"resource_version"` OwnerReferenceKind string `json:"owner_reference_kind" form:"owner_reference_kind"` OwnerReferenceName string `json:"owner_reference_name" form:"owner_reference_name"` Process *bool `json:"process" form:"process"` // 是否对查询结果进行处理 }
type ReleaseRuntimeState ¶
type ReleaseRuntimeState struct { Name string `json:"name"` Namespace string `json:"namespace"` Status string `json:"status"` Resources []*unstructured.Unstructured `json:"resources"` PodsNum int `json:"pods_num"` ReadyPodsNum int `json:"ready_pods_num"` }
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResource( config *config.KubeConfig, resType string, gvr *schema.GroupVersionResource, listObjectProcess listObjectProcess) *Resource
type Role ¶
type Role struct {
*Resource
}
func NewRole ¶
func NewRole(config *config.KubeConfig) *Role
type RoleBinding ¶
type RoleBinding struct {
*Resource
}
func NewRoleBinding ¶
func NewRoleBinding(config *config.KubeConfig) *RoleBinding
func (*RoleBinding) ToBuildRoleBinding ¶
func (s *RoleBinding) ToBuildRoleBinding(roleBinding *rbacv1.RoleBinding) *BuildRoleBinding
type Secret ¶
type Secret struct {
*Resource
}
func NewSecret ¶
func NewSecret(config *config.KubeConfig) *Secret
func (*Secret) ToBuildSecret ¶
func (s *Secret) ToBuildSecret(se *corev1.Secret) *BuildSecret
type Service ¶
type Service struct {
*Resource
}
func NewService ¶
func NewService(config *config.KubeConfig) *Service
func (*Service) ToBuildService ¶
func (s *Service) ToBuildService(service *corev1.Service) *BuildService
type ServiceAccount ¶
type ServiceAccount struct {
*Resource
}
func NewServiceAccount ¶
func NewServiceAccount(config *config.KubeConfig) *ServiceAccount
func (*ServiceAccount) ToBuildServiceAccount ¶
func (s *ServiceAccount) ToBuildServiceAccount(serviceAccount *corev1.ServiceAccount) *BuildServiceAccount
type StatefulSet ¶
type StatefulSet struct {
*Resource
}
func NewStatefulSet ¶
func NewStatefulSet(config *config.KubeConfig) *StatefulSet
func (*StatefulSet) ToBuildStatefulSet ¶
func (s *StatefulSet) ToBuildStatefulSet(ss *appsv1.StatefulSet) *BuildStatefulSet
type StdInParams ¶
type StorageClass ¶
type StorageClass struct {
*Resource
}
func NewStorageClass ¶
func NewStorageClass(config *config.KubeConfig) *StorageClass
func (*StorageClass) ToBuildStorageClass ¶
func (s *StorageClass) ToBuildStorageClass(sc *storagev1.StorageClass) *BuildStorageClass
type UpdateCustomResourceParams ¶
type UpdateCustomResourceParams struct { CustomResourceParam Name string `json:"name"` Namespace string `json:"namespace"` YamlStr string `json:"yaml"` }
type UpdateParams ¶
Source Files ¶
- cluster.go
- configmap.go
- crd.go
- cronjob.go
- daemonset.go
- deployment.go
- event.go
- helm.go
- horizontal_pod_autoscaler.go
- ingress.go
- job.go
- namespace.go
- networkpolicy.go
- node.go
- persistent_volume.go
- persistent_volume_claim.go
- pod.go
- resource.go
- role.go
- rolebinding.go
- secret.go
- service.go
- serviceaccount.go
- statefulset.go
- storageclass.go
Click to show internal directories.
Click to hide internal directories.