495 lines
33 KiB
Go
495 lines
33 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: kubernetes.proto
|
|
|
|
package kubernetesclient
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-participant-kubernetes/kubernetes"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
APIGroup = kubernetes.APIGroup
|
|
APIGroupList = kubernetes.APIGroupList
|
|
APIResource = kubernetes.APIResource
|
|
APIResourceList = kubernetes.APIResourceList
|
|
APIVersions = kubernetes.APIVersions
|
|
AWSElasticBlockStoreVolumeSource = kubernetes.AWSElasticBlockStoreVolumeSource
|
|
Affinity = kubernetes.Affinity
|
|
AppDetail = kubernetes.AppDetail
|
|
AppDetailReq = kubernetes.AppDetailReq
|
|
AppDetailResp = kubernetes.AppDetailResp
|
|
AppPodResp = kubernetes.AppPodResp
|
|
ApplyOptions = kubernetes.ApplyOptions
|
|
ApplyReq = kubernetes.ApplyReq
|
|
ApplyResp = kubernetes.ApplyResp
|
|
AttachedVolume = kubernetes.AttachedVolume
|
|
AvoidPods = kubernetes.AvoidPods
|
|
AzureDiskVolumeSource = kubernetes.AzureDiskVolumeSource
|
|
AzureFilePersistentVolumeSource = kubernetes.AzureFilePersistentVolumeSource
|
|
AzureFileVolumeSource = kubernetes.AzureFileVolumeSource
|
|
Binding = kubernetes.Binding
|
|
CSIPersistentVolumeSource = kubernetes.CSIPersistentVolumeSource
|
|
CSIVolumeSource = kubernetes.CSIVolumeSource
|
|
Capabilities = kubernetes.Capabilities
|
|
CephFSPersistentVolumeSource = kubernetes.CephFSPersistentVolumeSource
|
|
CephFSVolumeSource = kubernetes.CephFSVolumeSource
|
|
CinderPersistentVolumeSource = kubernetes.CinderPersistentVolumeSource
|
|
CinderVolumeSource = kubernetes.CinderVolumeSource
|
|
ClaimSource = kubernetes.ClaimSource
|
|
ClientIPConfig = kubernetes.ClientIPConfig
|
|
ComponentCondition = kubernetes.ComponentCondition
|
|
ComponentStatus = kubernetes.ComponentStatus
|
|
ComponentStatusList = kubernetes.ComponentStatusList
|
|
Condition = kubernetes.Condition
|
|
ConfigMap = kubernetes.ConfigMap
|
|
ConfigMapEnvSource = kubernetes.ConfigMapEnvSource
|
|
ConfigMapKeySelector = kubernetes.ConfigMapKeySelector
|
|
ConfigMapList = kubernetes.ConfigMapList
|
|
ConfigMapNodeConfigSource = kubernetes.ConfigMapNodeConfigSource
|
|
ConfigMapProjection = kubernetes.ConfigMapProjection
|
|
ConfigMapVolumeSource = kubernetes.ConfigMapVolumeSource
|
|
Container = kubernetes.Container
|
|
ContainerImage = kubernetes.ContainerImage
|
|
ContainerPort = kubernetes.ContainerPort
|
|
ContainerResizePolicy = kubernetes.ContainerResizePolicy
|
|
ContainerState = kubernetes.ContainerState
|
|
ContainerStateRunning = kubernetes.ContainerStateRunning
|
|
ContainerStateTerminated = kubernetes.ContainerStateTerminated
|
|
ContainerStateWaiting = kubernetes.ContainerStateWaiting
|
|
ContainerStatus = kubernetes.ContainerStatus
|
|
CreateOptions = kubernetes.CreateOptions
|
|
CrossVersionObjectReference = kubernetes.CrossVersionObjectReference
|
|
DaemonEndpoint = kubernetes.DaemonEndpoint
|
|
DataSet = kubernetes.DataSet
|
|
DeleteOptions = kubernetes.DeleteOptions
|
|
Deployment = kubernetes.Deployment
|
|
DeploymentCondition = kubernetes.DeploymentCondition
|
|
DeploymentDetailReq = kubernetes.DeploymentDetailReq
|
|
DeploymentDetailResp = kubernetes.DeploymentDetailResp
|
|
DeploymentList = kubernetes.DeploymentList
|
|
DeploymentListReq = kubernetes.DeploymentListReq
|
|
DeploymentListResp = kubernetes.DeploymentListResp
|
|
DeploymentResp = kubernetes.DeploymentResp
|
|
DeploymentSpec = kubernetes.DeploymentSpec
|
|
DeploymentStatus = kubernetes.DeploymentStatus
|
|
DeploymentStrategy = kubernetes.DeploymentStrategy
|
|
DownwardAPIProjection = kubernetes.DownwardAPIProjection
|
|
DownwardAPIVolumeFile = kubernetes.DownwardAPIVolumeFile
|
|
DownwardAPIVolumeSource = kubernetes.DownwardAPIVolumeSource
|
|
Duration = kubernetes.Duration
|
|
EmptyDirVolumeSource = kubernetes.EmptyDirVolumeSource
|
|
EndpointAddress = kubernetes.EndpointAddress
|
|
EndpointPort = kubernetes.EndpointPort
|
|
EndpointSubset = kubernetes.EndpointSubset
|
|
Endpoints = kubernetes.Endpoints
|
|
EndpointsList = kubernetes.EndpointsList
|
|
EnvFromSource = kubernetes.EnvFromSource
|
|
EnvVar = kubernetes.EnvVar
|
|
EnvVarSource = kubernetes.EnvVarSource
|
|
EphemeralContainer = kubernetes.EphemeralContainer
|
|
EphemeralContainerCommon = kubernetes.EphemeralContainerCommon
|
|
EphemeralVolumeSource = kubernetes.EphemeralVolumeSource
|
|
Event = kubernetes.Event
|
|
EventList = kubernetes.EventList
|
|
EventSeries = kubernetes.EventSeries
|
|
EventSource = kubernetes.EventSource
|
|
ExecAction = kubernetes.ExecAction
|
|
FCVolumeSource = kubernetes.FCVolumeSource
|
|
FieldsV1 = kubernetes.FieldsV1
|
|
FlexPersistentVolumeSource = kubernetes.FlexPersistentVolumeSource
|
|
FlexVolumeSource = kubernetes.FlexVolumeSource
|
|
FlockerVolumeSource = kubernetes.FlockerVolumeSource
|
|
GCEPersistentDiskVolumeSource = kubernetes.GCEPersistentDiskVolumeSource
|
|
GRPCAction = kubernetes.GRPCAction
|
|
GetOptions = kubernetes.GetOptions
|
|
GetReq = kubernetes.GetReq
|
|
GitRepoVolumeSource = kubernetes.GitRepoVolumeSource
|
|
GlusterfsPersistentVolumeSource = kubernetes.GlusterfsPersistentVolumeSource
|
|
GlusterfsVolumeSource = kubernetes.GlusterfsVolumeSource
|
|
GroupKind = kubernetes.GroupKind
|
|
GroupResource = kubernetes.GroupResource
|
|
GroupVersion = kubernetes.GroupVersion
|
|
GroupVersionForDiscovery = kubernetes.GroupVersionForDiscovery
|
|
GroupVersionKind = kubernetes.GroupVersionKind
|
|
GroupVersionResource = kubernetes.GroupVersionResource
|
|
HTTPGetAction = kubernetes.HTTPGetAction
|
|
HTTPHeader = kubernetes.HTTPHeader
|
|
HTTPIngressPath = kubernetes.HTTPIngressPath
|
|
HTTPIngressRuleValue = kubernetes.HTTPIngressRuleValue
|
|
HorizontalPodAutoscaler = kubernetes.HorizontalPodAutoscaler
|
|
HorizontalPodAutoscalerSpec = kubernetes.HorizontalPodAutoscalerSpec
|
|
HorizontalPodAutoscalerStatus = kubernetes.HorizontalPodAutoscalerStatus
|
|
HostAlias = kubernetes.HostAlias
|
|
HostIP = kubernetes.HostIP
|
|
HostPathVolumeSource = kubernetes.HostPathVolumeSource
|
|
ISCSIPersistentVolumeSource = kubernetes.ISCSIPersistentVolumeSource
|
|
ISCSIVolumeSource = kubernetes.ISCSIVolumeSource
|
|
Ingress = kubernetes.Ingress
|
|
IngressBackend = kubernetes.IngressBackend
|
|
IngressList = kubernetes.IngressList
|
|
IngressLoadBalancerIngress = kubernetes.IngressLoadBalancerIngress
|
|
IngressLoadBalancerStatus = kubernetes.IngressLoadBalancerStatus
|
|
IngressPortStatus = kubernetes.IngressPortStatus
|
|
IngressRule = kubernetes.IngressRule
|
|
IngressRuleValue = kubernetes.IngressRuleValue
|
|
IngressServiceBackend = kubernetes.IngressServiceBackend
|
|
IngressSpec = kubernetes.IngressSpec
|
|
IngressStatus = kubernetes.IngressStatus
|
|
IngressTLS = kubernetes.IngressTLS
|
|
IntOrString = kubernetes.IntOrString
|
|
Job = kubernetes.Job
|
|
JobCondition = kubernetes.JobCondition
|
|
JobDetailReq = kubernetes.JobDetailReq
|
|
JobDetailResp = kubernetes.JobDetailResp
|
|
JobSpec = kubernetes.JobSpec
|
|
JobStatus = kubernetes.JobStatus
|
|
KeyToPath = kubernetes.KeyToPath
|
|
LabelSelector = kubernetes.LabelSelector
|
|
LabelSelectorRequirement = kubernetes.LabelSelectorRequirement
|
|
Lifecycle = kubernetes.Lifecycle
|
|
LifecycleHandler = kubernetes.LifecycleHandler
|
|
LimitRange = kubernetes.LimitRange
|
|
LimitRangeItem = kubernetes.LimitRangeItem
|
|
LimitRangeList = kubernetes.LimitRangeList
|
|
LimitRangeSpec = kubernetes.LimitRangeSpec
|
|
List = kubernetes.List
|
|
ListMeta = kubernetes.ListMeta
|
|
ListOptions = kubernetes.ListOptions
|
|
ListPodResp = kubernetes.ListPodResp
|
|
ListReq = kubernetes.ListReq
|
|
LoadBalancerIngress = kubernetes.LoadBalancerIngress
|
|
LoadBalancerStatus = kubernetes.LoadBalancerStatus
|
|
LocalObjectReference = kubernetes.LocalObjectReference
|
|
LocalVolumeSource = kubernetes.LocalVolumeSource
|
|
ManagedFieldsEntry = kubernetes.ManagedFieldsEntry
|
|
MicroTime = kubernetes.MicroTime
|
|
NFSVolumeSource = kubernetes.NFSVolumeSource
|
|
Namespace = kubernetes.Namespace
|
|
NamespaceCondition = kubernetes.NamespaceCondition
|
|
NamespaceList = kubernetes.NamespaceList
|
|
NamespaceListReq = kubernetes.NamespaceListReq
|
|
NamespaceSpec = kubernetes.NamespaceSpec
|
|
NamespaceStatus = kubernetes.NamespaceStatus
|
|
Node = kubernetes.Node
|
|
NodeAddress = kubernetes.NodeAddress
|
|
NodeAffinity = kubernetes.NodeAffinity
|
|
NodeCondition = kubernetes.NodeCondition
|
|
NodeConfigSource = kubernetes.NodeConfigSource
|
|
NodeConfigStatus = kubernetes.NodeConfigStatus
|
|
NodeDaemonEndpoints = kubernetes.NodeDaemonEndpoints
|
|
NodeList = kubernetes.NodeList
|
|
NodeProxyOptions = kubernetes.NodeProxyOptions
|
|
NodeResources = kubernetes.NodeResources
|
|
NodeSelector = kubernetes.NodeSelector
|
|
NodeSelectorRequirement = kubernetes.NodeSelectorRequirement
|
|
NodeSelectorTerm = kubernetes.NodeSelectorTerm
|
|
NodeSpec = kubernetes.NodeSpec
|
|
NodeStatus = kubernetes.NodeStatus
|
|
NodeSystemInfo = kubernetes.NodeSystemInfo
|
|
ObjectFieldSelector = kubernetes.ObjectFieldSelector
|
|
ObjectMeta = kubernetes.ObjectMeta
|
|
ObjectReference = kubernetes.ObjectReference
|
|
OwnerReference = kubernetes.OwnerReference
|
|
PartialObjectMetadata = kubernetes.PartialObjectMetadata
|
|
PartialObjectMetadataList = kubernetes.PartialObjectMetadataList
|
|
Patch = kubernetes.Patch
|
|
PatchOptions = kubernetes.PatchOptions
|
|
PersistentVolume = kubernetes.PersistentVolume
|
|
PersistentVolumeClaim = kubernetes.PersistentVolumeClaim
|
|
PersistentVolumeClaimCondition = kubernetes.PersistentVolumeClaimCondition
|
|
PersistentVolumeClaimList = kubernetes.PersistentVolumeClaimList
|
|
PersistentVolumeClaimSpec = kubernetes.PersistentVolumeClaimSpec
|
|
PersistentVolumeClaimStatus = kubernetes.PersistentVolumeClaimStatus
|
|
PersistentVolumeClaimTemplate = kubernetes.PersistentVolumeClaimTemplate
|
|
PersistentVolumeClaimVolumeSource = kubernetes.PersistentVolumeClaimVolumeSource
|
|
PersistentVolumeList = kubernetes.PersistentVolumeList
|
|
PersistentVolumeSource = kubernetes.PersistentVolumeSource
|
|
PersistentVolumeSpec = kubernetes.PersistentVolumeSpec
|
|
PersistentVolumeStatus = kubernetes.PersistentVolumeStatus
|
|
PhotonPersistentDiskVolumeSource = kubernetes.PhotonPersistentDiskVolumeSource
|
|
Pod = kubernetes.Pod
|
|
PodAffinity = kubernetes.PodAffinity
|
|
PodAffinityTerm = kubernetes.PodAffinityTerm
|
|
PodAntiAffinity = kubernetes.PodAntiAffinity
|
|
PodAttachOptions = kubernetes.PodAttachOptions
|
|
PodCondition = kubernetes.PodCondition
|
|
PodDNSConfig = kubernetes.PodDNSConfig
|
|
PodDNSConfigOption = kubernetes.PodDNSConfigOption
|
|
PodDetail = kubernetes.PodDetail
|
|
PodDetailResp = kubernetes.PodDetailResp
|
|
PodExecOptions = kubernetes.PodExecOptions
|
|
PodFailurePolicy = kubernetes.PodFailurePolicy
|
|
PodFailurePolicyOnExitCodesRequirement = kubernetes.PodFailurePolicyOnExitCodesRequirement
|
|
PodFailurePolicyOnPodConditionsPattern = kubernetes.PodFailurePolicyOnPodConditionsPattern
|
|
PodFailurePolicyRule = kubernetes.PodFailurePolicyRule
|
|
PodIP = kubernetes.PodIP
|
|
PodList = kubernetes.PodList
|
|
PodListReq = kubernetes.PodListReq
|
|
PodLogOptions = kubernetes.PodLogOptions
|
|
PodOS = kubernetes.PodOS
|
|
PodPortForwardOptions = kubernetes.PodPortForwardOptions
|
|
PodProxyOptions = kubernetes.PodProxyOptions
|
|
PodReadinessGate = kubernetes.PodReadinessGate
|
|
PodResourceClaim = kubernetes.PodResourceClaim
|
|
PodResourceClaimStatus = kubernetes.PodResourceClaimStatus
|
|
PodSchedulingGate = kubernetes.PodSchedulingGate
|
|
PodSecurityContext = kubernetes.PodSecurityContext
|
|
PodSignature = kubernetes.PodSignature
|
|
PodSpec = kubernetes.PodSpec
|
|
PodStatus = kubernetes.PodStatus
|
|
PodStatusResult = kubernetes.PodStatusResult
|
|
PodTemplate = kubernetes.PodTemplate
|
|
PodTemplateList = kubernetes.PodTemplateList
|
|
PodTemplateSpec = kubernetes.PodTemplateSpec
|
|
PortStatus = kubernetes.PortStatus
|
|
PortworxVolumeSource = kubernetes.PortworxVolumeSource
|
|
Preconditions = kubernetes.Preconditions
|
|
PreferAvoidPodsEntry = kubernetes.PreferAvoidPodsEntry
|
|
PreferredSchedulingTerm = kubernetes.PreferredSchedulingTerm
|
|
Probe = kubernetes.Probe
|
|
ProbeHandler = kubernetes.ProbeHandler
|
|
ProjectedVolumeSource = kubernetes.ProjectedVolumeSource
|
|
Quantity = kubernetes.Quantity
|
|
QuantityValue = kubernetes.QuantityValue
|
|
QuobyteVolumeSource = kubernetes.QuobyteVolumeSource
|
|
RBDPersistentVolumeSource = kubernetes.RBDPersistentVolumeSource
|
|
RBDVolumeSource = kubernetes.RBDVolumeSource
|
|
RangeAllocation = kubernetes.RangeAllocation
|
|
RawExtension = kubernetes.RawExtension
|
|
ReplicationController = kubernetes.ReplicationController
|
|
ReplicationControllerCondition = kubernetes.ReplicationControllerCondition
|
|
ReplicationControllerList = kubernetes.ReplicationControllerList
|
|
ReplicationControllerSpec = kubernetes.ReplicationControllerSpec
|
|
ReplicationControllerStatus = kubernetes.ReplicationControllerStatus
|
|
ResourceClaim = kubernetes.ResourceClaim
|
|
ResourceFieldSelector = kubernetes.ResourceFieldSelector
|
|
ResourceQuota = kubernetes.ResourceQuota
|
|
ResourceQuotaList = kubernetes.ResourceQuotaList
|
|
ResourceQuotaSpec = kubernetes.ResourceQuotaSpec
|
|
ResourceQuotaStatus = kubernetes.ResourceQuotaStatus
|
|
ResourceRequirements = kubernetes.ResourceRequirements
|
|
Resp = kubernetes.Resp
|
|
RollbackConfig = kubernetes.RollbackConfig
|
|
RollingUpdateDeployment = kubernetes.RollingUpdateDeployment
|
|
RollingUpdateStatefulSetStrategy = kubernetes.RollingUpdateStatefulSetStrategy
|
|
RootPaths = kubernetes.RootPaths
|
|
SELinuxOptions = kubernetes.SELinuxOptions
|
|
ScaleIOPersistentVolumeSource = kubernetes.ScaleIOPersistentVolumeSource
|
|
ScaleIOVolumeSource = kubernetes.ScaleIOVolumeSource
|
|
ScopeSelector = kubernetes.ScopeSelector
|
|
ScopedResourceSelectorRequirement = kubernetes.ScopedResourceSelectorRequirement
|
|
SeccompProfile = kubernetes.SeccompProfile
|
|
Secret = kubernetes.Secret
|
|
SecretEnvSource = kubernetes.SecretEnvSource
|
|
SecretKeySelector = kubernetes.SecretKeySelector
|
|
SecretList = kubernetes.SecretList
|
|
SecretProjection = kubernetes.SecretProjection
|
|
SecretReference = kubernetes.SecretReference
|
|
SecretVolumeSource = kubernetes.SecretVolumeSource
|
|
SecurityContext = kubernetes.SecurityContext
|
|
SerializedReference = kubernetes.SerializedReference
|
|
ServerAddressByClientCIDR = kubernetes.ServerAddressByClientCIDR
|
|
Service = kubernetes.Service
|
|
ServiceAccount = kubernetes.ServiceAccount
|
|
ServiceAccountList = kubernetes.ServiceAccountList
|
|
ServiceAccountTokenProjection = kubernetes.ServiceAccountTokenProjection
|
|
ServiceBackendPort = kubernetes.ServiceBackendPort
|
|
ServiceList = kubernetes.ServiceList
|
|
ServicePort = kubernetes.ServicePort
|
|
ServiceProxyOptions = kubernetes.ServiceProxyOptions
|
|
ServiceSpec = kubernetes.ServiceSpec
|
|
ServiceStatus = kubernetes.ServiceStatus
|
|
SessionAffinityConfig = kubernetes.SessionAffinityConfig
|
|
StatefulSet = kubernetes.StatefulSet
|
|
StatefulSetCondition = kubernetes.StatefulSetCondition
|
|
StatefulSetOrdinals = kubernetes.StatefulSetOrdinals
|
|
StatefulSetPersistentVolumeClaimRetentionPolicy = kubernetes.StatefulSetPersistentVolumeClaimRetentionPolicy
|
|
StatefulSetSpec = kubernetes.StatefulSetSpec
|
|
StatefulSetStatus = kubernetes.StatefulSetStatus
|
|
StatefulSetUpdateStrategy = kubernetes.StatefulSetUpdateStrategy
|
|
Status = kubernetes.Status
|
|
StatusCause = kubernetes.StatusCause
|
|
StatusDetails = kubernetes.StatusDetails
|
|
StorageOSPersistentVolumeSource = kubernetes.StorageOSPersistentVolumeSource
|
|
StorageOSVolumeSource = kubernetes.StorageOSVolumeSource
|
|
Sysctl = kubernetes.Sysctl
|
|
TCPSocketAction = kubernetes.TCPSocketAction
|
|
TableOptions = kubernetes.TableOptions
|
|
Taint = kubernetes.Taint
|
|
Tenant = kubernetes.Tenant
|
|
TenantListResp = kubernetes.TenantListResp
|
|
Time = kubernetes.Time
|
|
Timestamp = kubernetes.Timestamp
|
|
Toleration = kubernetes.Toleration
|
|
TopologySelectorLabelRequirement = kubernetes.TopologySelectorLabelRequirement
|
|
TopologySelectorTerm = kubernetes.TopologySelectorTerm
|
|
TopologySpreadConstraint = kubernetes.TopologySpreadConstraint
|
|
TypeMeta = kubernetes.TypeMeta
|
|
TypedLocalObjectReference = kubernetes.TypedLocalObjectReference
|
|
TypedObjectReference = kubernetes.TypedObjectReference
|
|
UncountedTerminatedPods = kubernetes.UncountedTerminatedPods
|
|
Unknown = kubernetes.Unknown
|
|
UpdateDeploymentReplicaReq = kubernetes.UpdateDeploymentReplicaReq
|
|
UpdateOptions = kubernetes.UpdateOptions
|
|
Verbs = kubernetes.Verbs
|
|
Volume = kubernetes.Volume
|
|
VolumeDevice = kubernetes.VolumeDevice
|
|
VolumeMount = kubernetes.VolumeMount
|
|
VolumeNodeAffinity = kubernetes.VolumeNodeAffinity
|
|
VolumeProjection = kubernetes.VolumeProjection
|
|
VolumeResourceRequirements = kubernetes.VolumeResourceRequirements
|
|
VolumeSource = kubernetes.VolumeSource
|
|
VsphereVirtualDiskVolumeSource = kubernetes.VsphereVirtualDiskVolumeSource
|
|
WatchEvent = kubernetes.WatchEvent
|
|
WeightedPodAffinityTerm = kubernetes.WeightedPodAffinityTerm
|
|
WindowsSecurityContextOptions = kubernetes.WindowsSecurityContextOptions
|
|
|
|
Kubernetes interface {
|
|
ApplyYaml(ctx context.Context, in *ApplyReq, opts ...grpc.CallOption) (*ApplyResp, error)
|
|
DeleteYaml(ctx context.Context, in *ApplyReq, opts ...grpc.CallOption) (*Resp, error)
|
|
Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Resp, error)
|
|
List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*Resp, error)
|
|
PodList(ctx context.Context, in *PodListReq, opts ...grpc.CallOption) (*ListPodResp, error)
|
|
JobDetail(ctx context.Context, in *JobDetailReq, opts ...grpc.CallOption) (*JobDetailResp, error)
|
|
DeploymentDetail(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*DeploymentDetailResp, error)
|
|
// 暂停POD
|
|
PauseDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error)
|
|
// 启动deployment
|
|
StartDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error)
|
|
// 重启deployment
|
|
RestartDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error)
|
|
// 删除deployment
|
|
DeleteDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error)
|
|
// 列表deployment
|
|
ListDeployment(ctx context.Context, in *DeploymentListReq, opts ...grpc.CallOption) (*DeploymentListResp, error)
|
|
// 删除App (sealos)
|
|
DelApp(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error)
|
|
// 获取应用pod
|
|
GetAppPod(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*AppPodResp, error)
|
|
// 更新应用实例数
|
|
UpdateDeploymentReplica(ctx context.Context, in *UpdateDeploymentReplicaReq, opts ...grpc.CallOption) (*DeploymentResp, error)
|
|
// 查询所有namespace输出转换为tenant (sealos)
|
|
ListNamespace(ctx context.Context, in *NamespaceListReq, opts ...grpc.CallOption) (*TenantListResp, error)
|
|
// 查询app详情
|
|
GetAppDetail(ctx context.Context, in *AppDetailReq, opts ...grpc.CallOption) (*AppDetailResp, error)
|
|
// 获取应用的Pod
|
|
GetAppPodsByAppName(ctx context.Context, in *AppDetailReq, opts ...grpc.CallOption) (*PodDetailResp, error)
|
|
}
|
|
|
|
defaultKubernetes struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewKubernetes(cli zrpc.Client) Kubernetes {
|
|
return &defaultKubernetes{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultKubernetes) ApplyYaml(ctx context.Context, in *ApplyReq, opts ...grpc.CallOption) (*ApplyResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.ApplyYaml(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) DeleteYaml(ctx context.Context, in *ApplyReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.DeleteYaml(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.Get(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.List(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) PodList(ctx context.Context, in *PodListReq, opts ...grpc.CallOption) (*ListPodResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.PodList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) JobDetail(ctx context.Context, in *JobDetailReq, opts ...grpc.CallOption) (*JobDetailResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.JobDetail(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultKubernetes) DeploymentDetail(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*DeploymentDetailResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.DeploymentDetail(ctx, in, opts...)
|
|
}
|
|
|
|
// 暂停POD
|
|
func (m *defaultKubernetes) PauseDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.PauseDeployment(ctx, in, opts...)
|
|
}
|
|
|
|
// 启动deployment
|
|
func (m *defaultKubernetes) StartDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.StartDeployment(ctx, in, opts...)
|
|
}
|
|
|
|
// 重启deployment
|
|
func (m *defaultKubernetes) RestartDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.RestartDeployment(ctx, in, opts...)
|
|
}
|
|
|
|
// 删除deployment
|
|
func (m *defaultKubernetes) DeleteDeployment(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.DeleteDeployment(ctx, in, opts...)
|
|
}
|
|
|
|
// 列表deployment
|
|
func (m *defaultKubernetes) ListDeployment(ctx context.Context, in *DeploymentListReq, opts ...grpc.CallOption) (*DeploymentListResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.ListDeployment(ctx, in, opts...)
|
|
}
|
|
|
|
// 删除App (sealos)
|
|
func (m *defaultKubernetes) DelApp(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*Resp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.DelApp(ctx, in, opts...)
|
|
}
|
|
|
|
// 获取应用pod
|
|
func (m *defaultKubernetes) GetAppPod(ctx context.Context, in *DeploymentDetailReq, opts ...grpc.CallOption) (*AppPodResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.GetAppPod(ctx, in, opts...)
|
|
}
|
|
|
|
// 更新应用实例数
|
|
func (m *defaultKubernetes) UpdateDeploymentReplica(ctx context.Context, in *UpdateDeploymentReplicaReq, opts ...grpc.CallOption) (*DeploymentResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.UpdateDeploymentReplica(ctx, in, opts...)
|
|
}
|
|
|
|
// 查询所有namespace输出转换为tenant (sealos)
|
|
func (m *defaultKubernetes) ListNamespace(ctx context.Context, in *NamespaceListReq, opts ...grpc.CallOption) (*TenantListResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.ListNamespace(ctx, in, opts...)
|
|
}
|
|
|
|
// 查询app详情
|
|
func (m *defaultKubernetes) GetAppDetail(ctx context.Context, in *AppDetailReq, opts ...grpc.CallOption) (*AppDetailResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.GetAppDetail(ctx, in, opts...)
|
|
}
|
|
|
|
// 获取应用的Pod
|
|
func (m *defaultKubernetes) GetAppPodsByAppName(ctx context.Context, in *AppDetailReq, opts ...grpc.CallOption) (*PodDetailResp, error) {
|
|
client := kubernetes.NewKubernetesClient(m.cli.Conn())
|
|
return client.GetAppPodsByAppName(ctx, in, opts...)
|
|
}
|