types

package
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdmissionOperationCreate  = "Create"
	AdmissionOperationUpdate  = "Update"
	AdmissionOperationUnknown = "unknown"
)
View Source
const (
	AdmissionResourcesApplication = "application"
	AdmissionResourcesDeployment  = "deployment"
)
View Source
const (
	WebhookFailurePolicyIgnore = "Ignore"
	WebhookFailurePolicyFail   = "Fail"
)
View Source
const (
	BcsApiHeader_ClusterID = "BCS-ClusterID"
	BcsApiHeader_Operator  = "BCS-Operator"
	BcsApiHeader_UUID      = "BCS-UUID"
)

bcs standard header keys for http api

View Source
const (
	HttpMethod_POST   = "POST"
	HttpMethod_PUT    = "PUT"
	HttpMethod_GET    = "GET"
	HttpMethod_DELETE = "DELETE"
	HttpMethod_PATCH  = "PATCH"
)

bcs http method

View Source
const (
	Constraint_Type_UNIQUE     = "UNIQUE"
	Constraint_Type_CLUSTER    = "CLUSTER"
	Constraint_Type_GROUP_BY   = "GROUPBY"
	Constraint_Type_MAX_PER    = "MAXPER"
	Constraint_Type_LIKE       = "LIKE"
	Constraint_Type_UNLIKE     = "UNLIKE"
	Constraint_Type_EXCLUDE    = "EXCLUDE"
	Constraint_Type_GREATER    = "GREATER"
	Constraint_Type_TOLERATION = "TOLERATION"
)
View Source
const (
	RecreateUpgradeStrategyType      UpgradeStrategyType = "Recreate"
	RollingUpdateUpgradeStrategyType UpgradeStrategyType = "RollingUpdate"

	// ForceUpdate means that all the old pods will be deleted. and then recreate
	// pods with new deployment.
	// ForceUpdate is "valid" only when you call the k8s update restful api.
	ForceUpdateStrategyType UpgradeStrategyType = "ForceUpdate"

	// CreateFirstOrder means that the new pod will be created and then delete the old pod
	// during the whole rolling update operation process. DeleteFirstOrder is quite the opposite.
	CreateFirstOrder RollingOrderType = "CreateFirst"
	DeleteFirstOrder RollingOrderType = "DeleteFirst"
)
View Source
const (
	HttpIngressKind IngressRuleKind = "HTTP"
	TCPIngressKind  IngressRuleKind = "TCP"

	RoundrobinBalanceType BalanceType = "roundrobin"
	SourceBalanceType     BalanceType = "source"
)
View Source
const (
	BCS_SERV_BASEPATH          = "/bcs/services/endpoints"
	BCS_MODULE_APISERVER       = "apiserver"
	BCS_MODULE_USERMGR         = "usermanager"
	BCS_MODULE_CCAPI           = "ccapi"
	BCS_MODULE_MESOSDATAWATCH  = "mesosdatawatch"
	BCS_MODULE_KUBEDATAWATCH   = "kubedatawatch"
	BCS_MODULE_MESOSDRIVER     = "mesosdriver"
	BCS_MODULE_KUBERNETEDRIVER = "kubernetedriver"
	BCS_MODULE_SCHEDULER       = "scheduler"
	BCS_MODULE_CLUSTERKEEPER   = "clusterkeeper"
	BCS_MODULE_HEALTH          = "health"
	BCS_MODULE_LOADBALANCE     = "loadbalance"
	BCS_MODULE_Check           = "check"
	BCS_MODULE_NETSERVICE      = "netservice"
	BCS_MODULE_DNS             = "dns"
	BCS_MODULE_STORAGE         = "storage"
	BCS_MODULE_DISCOVERY       = "discovery"
	BCS_MODULE_METRICSERVICE   = "metricservice"
	BCS_MODULE_METRICCOLLECTOR = "metriccollector"
	BCS_MODULE_EXPORTER        = "exporter"
	BCS_MODULE_DCSERVER        = "dcserver"
	BCS_MODULE_DCCLINET        = "dcclient"
	BCS_MODULE_QCLOUDCLB       = "qcloudclb"
	BCS_MODULE_MESOSSLAVE      = "mesosslave"
	BCS_MODULE_IPSERVICE       = "ipservice"
	BCS_MODULE_MESOSADAPTER    = "mesosadapter"

	//bcstest 2018.11.07
	BCS_MODULE_K8SAPISERVER     = "kubernetedriver"
	BCS_MODULE_MESOSAPISERVER   = "mesosdriver"
	BCS_MODULE_NETWORKDETECTION = "networkdetection"

	//bcs-api-gateway refactor 2020-04-10
	BCS_MODULE_KUBEAGENT        = "kubeagent"
	BCS_MODULE_USERMANAGER      = "usermanager"
	BCS_MODULE_GATEWAYDISCOVERY = "gatewaydiscovery"
	BCS_MODULE_MESOSWEBCONSOLE  = "mesoswebconsole"

	// for bcs-bkcmdb-synchronizer
	BCS_MODULE_BKCMDB_SYNCHRONIZER = "bkcmdb-synchronizer"
)
View Source
const (
	BCSS_SERV_BASEPATH        = "/bcss/services/endpoints"
	BCSS_MODULE_CONTAINERWARE = "containerware"
	BCSS_MODULE_PROXY         = "proxy"
	BCSS_MODULE_CONSOLESERVER = "consoleserver"
	BCSS_MODULE_MESHAPI       = "bcss-mesh-api"
)

bcss modules

View Source
const (
	DefaultAdmissionNamespace = "bkbcs"
)
View Source
const (
	TargetRefStatusNone = "none"
)

Variables

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Result  bool        `json:"result"`
	Code    int         `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

type APIServInfo

type APIServInfo struct {
	ServerInfo
}

APIServInfo apiserver information

type AWSELBInfo

type AWSELBInfo struct {
	ServerInfo
}

AWSELBInfo for aws elb

type AdmissionOperation

type AdmissionOperation string

type AdmissionResourcesKind

type AdmissionResourcesKind string

type AdmissionWebhook

type AdmissionWebhook struct {
	//admission webhook name
	Name string `json:"name"`
	//failurePolicy, if communication with webhook service failed,
	//according to FailurePolicy to decide continue or return fail
	FailurePolicy WebhookFailurePolicyKind `json:"failurePolicy"`
	//webhook http client config
	ClientConfig *WebhookClientConfig `json:"clientConfig"`

	NamespaceSelector *NamespaceSelector `json:"namespaceSelector"`
	//webhook server list, examples: ["https://127.0.0.1:31000","https://127.0.0.1:31001",...]
	WebhookServers []string `json:"-"`
}

func (*AdmissionWebhook) DeepCopy

func (in *AdmissionWebhook) DeepCopy() *AdmissionWebhook

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionWebhook.

func (*AdmissionWebhook) DeepCopyInto

func (in *AdmissionWebhook) DeepCopyInto(out *AdmissionWebhook)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AdmissionWebhookConfiguration

type AdmissionWebhookConfiguration struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`
	//resources ref
	ResourcesRef *ResourcesRef `json:"resourcesRef"`
	//adminssion webhook info
	AdmissionWebhooks []*AdmissionWebhook `json:"admissionWebhooks"`
}

func (*AdmissionWebhookConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionWebhookConfigurationSpec.

func (*AdmissionWebhookConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AuthServInfo

type AuthServInfo struct {
	ServerInfo
}

AuthServInfo auth server information

type AutoscalerMetricCurrent

type AutoscalerMetricCurrent struct {
	Type MetricSourceType
	//metric name
	Name string
	// description info
	Description string
	//autoscaler current metrics
	Current *AutoscalerMetricValue
	//timestamp
	Timestamp time.Time
}

type AutoscalerMetricKind

type AutoscalerMetricKind string
const (
	//describing each pod in the current scale target (e.g. CPU or memory), The values will be averaged
	//together before being compared to the target
	AutoscalerMetricAverageUtilization AutoscalerMetricKind = "AverageUtilization"
	//The values will be averaged together pods before being compared to the target value
	AutoscalerMetricTargetAverageValue AutoscalerMetricKind = "AverageValue"
	//value is the target value of the metric
	AutoscalerMetricTargetValue AutoscalerMetricKind = "Value"
)

type AutoscalerMetricTarget

type AutoscalerMetricTarget struct {
	Type MetricSourceType
	//metric name
	Name string
	// description info
	Description string
	//autoscale metric target value
	Target *AutoscalerMetricValue
}

type AutoscalerMetricValue

type AutoscalerMetricValue struct {
	Type AutoscalerMetricKind

	//kind = AutoscalerMetricAverageUtilization
	AverageUtilization float32 `json:"averageUtilization,omitempty"`
	//kind = AutoscalerMetricTargetAverageValue
	AverageValue float32 `json:"targetAverageValue,omitempty"`
	//kind = AutoscalerMetricTargetValue
	Value float32 `json:"targetValue,omitempty"`
}

type AutoscalerOperatorType

type AutoscalerOperatorType string
const (
	AutoscalerOperatorNone      AutoscalerOperatorType = "none"
	AutoscalerOperatorScaleUp   AutoscalerOperatorType = "scaleUp"
	AutoscalerOperatorScaleDown AutoscalerOperatorType = "scaleDown"
)

type AutoscalerTargetRefKind

type AutoscalerTargetRefKind = string
const (
	AutoscalerTargetRefDeployment  AutoscalerTargetRefKind = "deployment"
	AutoscalerTargetRefApplication AutoscalerTargetRefKind = "application"
)

type BalanceType

type BalanceType string

type BcsAgentAttribute

type BcsAgentAttribute struct {
	Name   string               `json:"name,omitempty"`
	Type   MesosValue_Type      `json:"type,omitempty"`
	Scalar *MesosValue_Scalar   `json:"scalar,omitempty"`
	Ranges []*MesosValue_Ranges `json:"ranges,omitempty"`
	Set    *MesosValue_Set      `json:"set,omitempty"`
	Text   *MesosValue_Text     `json:"text,omitempty"`
}

type BcsAutoscaler

type BcsAutoscaler struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`
	//specification
	Spec *BcsAutoscalerSpec
	//status
	Status *BcsAutoscalerStatus
}

func (*BcsAutoscaler) GetSpecifyCurrentMetrics

func (scaler *BcsAutoscaler) GetSpecifyCurrentMetrics(soucreType MetricSourceType, name string) (*AutoscalerMetricCurrent, error)

func (*BcsAutoscaler) GetUuid

func (scaler *BcsAutoscaler) GetUuid() string

func (*BcsAutoscaler) InitAutoscalerStatus

func (scaler *BcsAutoscaler) InitAutoscalerStatus()

type BcsAutoscalerSpec

type BcsAutoscalerSpec struct {
	//target application
	ScaleTargetRef *TargetRef
	//min instance
	MinInstance uint
	//max instance
	MaxInstance uint
	//autoscale target metric infos
	MetricsTarget []*AutoscalerMetricTarget `json:"metrics"`
}

type BcsAutoscalerStatus

type BcsAutoscalerStatus struct {
	//autoscale application number, default: 0
	ScaleNumber uint
	//last time scale application
	LastScaleTime time.Time

	LastScaleOPeratorType AutoscalerOperatorType
	//current instance numbers
	CurrentInstance uint
	//desired instance numbers
	DesiredInstance uint
	//status
	CurrentMetrics []*AutoscalerMetricCurrent
	//target ref status
	TargetRefStatus string
}

type BcsCheckInfo

type BcsCheckInfo struct {
	ServerInfo
}

type BcsClusterAgentInfo

type BcsClusterAgentInfo struct {
	HostName  string  `json:"hostname"`
	IP        string  `json:"ip"`
	DiskTotal float64 `json:"disktotal"`
	MemTotal  float64 `json:"memtotal"`
	CpuTotal  float64 `json:"cputotal"`
	DiskUsed  float64 `json:"diskused"`
	MemUsed   float64 `json:"memused"`
	CpuUsed   float64 `json:"cpuused"`

	Disabled       bool                 `json:"disabled"`
	HostAttributes []*BcsAgentAttribute `json:"host_attributes"`
	Attributes     []*BcsAgentAttribute `json:"attributes"`

	RegisteredTime   int64 `json:"registered_time"`
	ReRegisteredTime int64 `json:"reregistered_time"`
}

type BcsClusterAgentSetting

type BcsClusterAgentSetting struct {
	//agent ip
	InnerIP string `json:"innerIP"`
	//whether disable scheduler container
	Disabled bool `json:"disabled"`
	//agent settings
	AttrStrings map[string]MesosValue_Text `json:"strings"`
	//agent settings
	AttrScalars map[string]MesosValue_Scalar `json:"scalars"`
	//taint agent
	NoSchedule map[string]string `json:"noSchedule"`
	//Pods index
	Pods []string `json:"pods"`
	//External Resources, key=ExtendedResource.Name
	ExtendedResources map[string]*ExtendedResource
	// Populated by the system.
	// Read-only.
	// Value must be treated as opaque by clients and .
	ResourceVersion string `json:"-"`
}

func (*BcsClusterAgentSetting) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSchedInfoSpec.

func (*BcsClusterAgentSetting) DeepCopyInto

func (in *BcsClusterAgentSetting) DeepCopyInto(out *BcsClusterAgentSetting)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsClusterAgentSettingUpdate

type BcsClusterAgentSettingUpdate struct {
	IPs         []string           `json:"ips"`
	SettingName string             `json:"name"`
	ValueType   MesosValue_Type    `json:"valuetype"`
	ValueText   *MesosValue_Text   `json:"text"`
	ValueScalar *MesosValue_Scalar `json:"scalar"`
}

type BcsClusterResource

type BcsClusterResource struct {
	DiskTotal float64               `json:"disktotal"`
	MemTotal  float64               `json:"memtotal"`
	CpuTotal  float64               `json:"cputotal"`
	DiskUsed  float64               `json:"diskused"`
	MemUsed   float64               `json:"memused"`
	CpuUsed   float64               `json:"cpuused"`
	Agents    []BcsClusterAgentInfo `json:"agents"`
}

type BcsCommand

type BcsCommand struct {
	TypeMeta `json:",inline"`
	//ObjectMeta `json:"metadata"`
	Spec *BcsCommandSpec `json:"spec"`
}

type BcsCommandInfo

type BcsCommandInfo struct {
	Id         string            `json:"id"` //command inspect info id
	CreateTime int64             `json:"createTime"`
	Spec       *BcsCommandSpec   `json:"spec"`
	Status     *BcsCommandStatus `json:"status"`
	// Populated by the system.
	// Read-only.
	// Value must be treated as opaque by clients and .
	ResourceVersion string `json:"-"`
}

func (*BcsCommandInfo) DeepCopy

func (in *BcsCommandInfo) DeepCopy() *BcsCommandInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsCommandInfoSpec.

func (*BcsCommandInfo) DeepCopyInto

func (in *BcsCommandInfo) DeepCopyInto(out *BcsCommandInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsCommandSpec

type BcsCommandSpec struct {
	CommandTargetRef *TargetRef `json:"commandTargetRef"`
	Taskgroups       []string   `json:"taskgroups"`
	Command          []string   `json:"command"` //["/bin/bash","-c","ps -ef |grep gamesvc"]
	//format: ["k1=v1","k2=v2"]
	Env         []string `json:"env"`  //environments
	User        string   `json:"user"` //root or others
	WorkingDir  string   `json:"workingDir"`
	Privileged  bool     `json:"privileged"`
	ReserveTime int      `json:"reserveTime"` //minutes
}

func (*BcsCommandSpec) DeepCopy

func (in *BcsCommandSpec) DeepCopy() *BcsCommandSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsCommandSpec.

func (*BcsCommandSpec) DeepCopyInto

func (in *BcsCommandSpec) DeepCopyInto(out *BcsCommandSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsCommandStatus

type BcsCommandStatus struct {
	Taskgroups []*TaskgroupCommandInfo `json:"taskgroups"`
}

func (*BcsCommandStatus) DeepCopy

func (in *BcsCommandStatus) DeepCopy() *BcsCommandStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsCommandStatus.

func (*BcsCommandStatus) DeepCopyInto

func (in *BcsCommandStatus) DeepCopyInto(out *BcsCommandStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsConfigMap

type BcsConfigMap struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`
	Data       map[string]BcsConfigMapItem `json:"datas"` //map key for index, map value is content
}

BcsConfigMap definition

func (*BcsConfigMap) DeepCopy

func (in *BcsConfigMap) DeepCopy() *BcsConfigMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsConfigMapSpec.

func (*BcsConfigMap) DeepCopyInto

func (in *BcsConfigMap) DeepCopyInto(out *BcsConfigMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsConfigMapItem

type BcsConfigMapItem struct {
	Type         BcsConfigMapSourceType `json:"type"`
	Content      string                 `json:"content"`
	RemoteUser   string                 `josn:"remoteUser,omitempty"`
	RemotePasswd string                 `json:"remotePasswd,omitempty"`
}

BcsConfigMapItem item hold configmap

type BcsConfigMapSourceType

type BcsConfigMapSourceType string
const (
	BcsConfigMapSourceType_FILE  BcsConfigMapSourceType = "file"
	BcsConfigMapSourceType_HTTP  BcsConfigMapSourceType = "http"
	BcsConfigMapSourceType_HTTPS BcsConfigMapSourceType = "https"
	BcsConfigMapSourceType_FTP   BcsConfigMapSourceType = "ftp"
	BcsConfigMapSourceType_FTPS  BcsConfigMapSourceType = "ftps"
)

type BcsContainerStatus

type BcsContainerStatus struct {
	// container name
	Name string `json:"name"`
	// container id
	ContainerID  string `json:"containerID"`
	RestartCount int32  `json:"restartCount,omitempty"`
	// Status is the status of this container
	Status ContainerStatus `json:"status,omitempty"`
	// Status is the last status of this container“
	LastStatus ContainerStatus `json:"lastStatus,omitempty"`
	// exit code
	TerminateExitCode int `json:"exitcode,omitempty"`
	// Image is this container image
	Image string `json:"image"`
	// Message indicating details about why this container“ is in this status
	Message string `json:"message,omitempty"`
	// StartTime is date and time when this container start
	StartTime time.Time `json:"startTime,omitempty"`
	// LastStatus is the last status of Container
	LastUpdateTime time.Time `json:"lastUpdateTime,omitempty"`
	// FinishTime is the finish date and time
	FinishTime time.Time `json:"finishTime,omitempty"`
	// health check status
	HealthCheckStatus []*BcsHealthCheckStatus `json:"healCheckStatus,omitempty"`
	// ports
	Ports []ContainerPort `json:"containerPort,omitempty"`
	//command
	Command string `json:"command,omitempty"`
	// arguments
	Args []string `json:"args,omitempty"`
	//volumes
	Volumes []Volume `json:"volumes,omitempty"`
	// network
	Network string `json:"networkMode,omitempty"`
	// labels
	Labels map[string]string `json:"labels,omitempty"`
	// Resources
	Resources ResourceRequirements `json:"resources,omitempty"`
	//envs
	Env map[string]string `json:"env,omitempty"`
}

BcsContainerStatus define container status

type BcsDaemonset

type BcsDaemonset struct {
	TypeMeta `json:",inline"`
	//AppMeta               `json:",inline"`
	ObjectMeta    `json:"metadata"`
	Spec          ReplicaControllerSpec `json:"spec"`
	RestartPolicy RestartPolicy         `json:"restartPolicy,omitempty"`
	KillPolicy    KillPolicy            `json:"killPolicy,omitempty"`
}

type BcsDataType

type BcsDataType string

BcsDataType data type for bcs-api & client

const (
	BcsDataType_APP              BcsDataType = "application"
	BcsDataType_PROCESS          BcsDataType = "process"
	BcsDataType_POD              BcsDataType = "taskgroup"
	BcsDataType_SECRET           BcsDataType = "secret"
	BcsDataType_CONFIGMAP        BcsDataType = "configmap"
	BcsDataType_SERVICE          BcsDataType = "service"
	BcsDataType_LOADBALANCE      BcsDataType = "loadbalance"
	BcsDataType_HAPROXY          BcsDataType = "haproxy"
	BcsDataType_EXPORTSERVICE    BcsDataType = "exportservice"
	BcsDataType_DEPLOYMENT       BcsDataType = "deployment"
	BcsDataType_CRR              BcsDataType = "crr"
	BcsDataType_WebConsole       BcsDataType = "webconsole"
	BcsDataType_Admissionwebhook BcsDataType = "admissionwebhook"
	BcsDataType_CRD              BcsDataType = "customresourcedefinition"
	BcsDataType_PERMISSION       BcsDataType = "permission"
	BcsDataType_Daemonset        BcsDataType = "daemonset"
)

type BcsDeployment

type BcsDeployment struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`

	Spec BcsDeploymentSpec `json:"spec"`

	UpPolicy      UpdatePolicy  `json:"updatePolicy,omitempty"`
	RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
	KillPolicy    KillPolicy    `json:"killPolicy,omitempty"`
	Constraints   *Constraint   `json:"constraint,omitempty"`
}

type BcsDeploymentSpec

type BcsDeploymentSpec struct {
	Instance int `json:"instance"`
	//RestartPolicy RestartPolicy     `json:"restartPolicy,omitempty"`
	Selector map[string]string `json:"selector,omitempty"`
	Template *PodTemplateSpec  `json:"template"`
	Strategy UpgradeStrategy   `json:"strategy"`

	// pause allows you to pause the rolling update process when you are in it.
	// default value is false.
	PauseDeployment bool `json:"pauseDeployment"`
}

type BcsDeploymentStatus

type BcsDeploymentStatus struct {
	ObjectMeta `json:"metadata"`
	Instance   int32 `json:"instance"`

	// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
	UpdatedInstance int32 `json:"updatedInstance"`

	// Total number of ready pods targeted by this deployment.
	ReadyInstance int32 `json:"readyInstance"`

	// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
	AvailableInstance int32 `json:"availableInstance"`

	// Total number of unavailable pods targeted by this deployment.
	UnavailableInstance int32 `json:"unavailableInstance"`

	Status []*BcsReplicaControllerStatus `json:"deploymentStatus"`
	// ReportTime is the date and time when report status
	ReportTime time.Time `json:"reportTime,omitempty"`
}

type BcsEndpoint

type BcsEndpoint struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Endpoints  []Endpoint `json:"eps"`
}

BcsEndpoint endpoint definition

func (*BcsEndpoint) DeepCopy

func (in *BcsEndpoint) DeepCopy() *BcsEndpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsEndpointSpec.

func (*BcsEndpoint) DeepCopyInto

func (in *BcsEndpoint) DeepCopyInto(out *BcsEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsHealthCheckStatus

type BcsHealthCheckStatus struct {
	// healthcheck type
	Type BcsHealthCheckType `json:"type"`
	// the health check result, ture is ok, false is not good
	Result bool `json:"result"`
	// the health check message. e.g: if health is not good, the message record the reason
	Message string `json:"message,omitempty"`
}

BcsHealthCheckStatus define health status

type BcsHealthCheckType

type BcsHealthCheckType string
const (
	BcsHealthCheckType_COMMAND    BcsHealthCheckType = "COMMAND"
	BcsHealthCheckType_HTTP       BcsHealthCheckType = "HTTP"
	BcsHealthCheckType_TCP        BcsHealthCheckType = "TCP"
	BcsHealthCheckType_REMOTEHTTP BcsHealthCheckType = "REMOTE_HTTP"
	BcsHealthCheckType_REMOTETCP  BcsHealthCheckType = "REMOTE_TCP"
)

type BcsHealthInfo

type BcsHealthInfo struct {
	ServerInfo
}

type BcsIngress

type BcsIngress struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`
	Spec       IngressSpec `json:"spec"`
}

type BcsK8sApiserverInfo

type BcsK8sApiserverInfo struct {
	ServerInfo
	CaCertData string //certificates
	UserToken  string //user token
}

type BcsLoadBalance

type BcsLoadBalance struct {
	TypeMeta `json:",inline"`
	//AppMeta     `json:",inline"`
	ObjectMeta  `json:"metadata"`
	Protocol    string               `json:"protocol"`
	Port        int                  `json:"port"`
	DomainName  string               `json:"domainName,omitempty"`
	ClusterIP   []string             `json:"clusterIP,omitempty"`
	LoadBalance []ServiceLoadBalance `json:"loadBalance"`
}

BcsLoadBalance loadbalance for bcs-api

type BcsMesosApiserverInfo

type BcsMesosApiserverInfo struct {
	ServerInfo
}

type BcsPermission

type BcsPermission struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`

	Spec BcsPermissionSpec `json:"spec"`
}

type BcsPermissionSpec

type BcsPermissionSpec struct {
	Permissions []Permission `json:"permissions"`
}

type BcsPodIndex

type BcsPodIndex struct {
	Name string `json:"name"`
}

type BcsPodStatus

type BcsPodStatus struct {
	ObjectMeta `json:"metadata"`
	// RcName the rc name who create this pod. if this pod is created by pod, RcName is empty
	RcName string `json:"rcname,omitempty"`
	// Status is the status of this pod
	Status PodStatus `json:"status,omitempty"`
	// LastStatus is the last status of this pod
	LastStatus PodStatus `json:"lastStatus,omitempty"`
	// HostIP is the ip address of the host where this pod run
	HostIP string `json:"hostIP,omitempty"`
	// HostName is the hostname where this pod run
	HostName string `json:"hostName"`
	// PodIP is the pod address of this pod
	PodIP string `json:"podIP,omitempty"`
	// Message indicating details about why the pod is in this status
	Message string `json:"message,omitempty"`
	// StartTime is date and time when this pod start
	StartTime time.Time `json:"startTime,omitempty"`
	// LastStatus is the last status of this pod
	LastUpdateTime time.Time `json:"lastUpdateTime,omitempty"`
	// ReportTime is the date and time when report pod status
	ReportTime time.Time `json:"reportTime,omitempty"`
	// KillPolicy
	KillPolicy *KillPolicy `json:"killPolicy,omitempty"`
	// RestartPolicy
	RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty"`
	// ContainerStatus is the container status
	ContainerStatuses []*BcsContainerStatus `json:"containerStatuses,omitempty"`
	//bcs message
	BcsMessage string `json:"bcsMessage,omitempty"`
	// added  20181011, add for differentiate process/application
	Kind BcsDataType `json:"kind"`
}

BcsPodStatus define pod status

type BcsReplicaControllerStatus

type BcsReplicaControllerStatus struct {
	ObjectMeta `json:"metadata"`
	// Instance is the number of requested instance
	Instance int `json:"instance"`
	// BuildedInstance is the number of actual instance
	BuildedInstance int `json:"buildedInstance"`
	// RunningInstance is the number of running status instance
	RunningInstance int `json:"runningInstance"`
	// CreateTime is the date and time of begining to create ReplicaController
	CreateTime time.Time `json:"createTime"`
	// LastUpdateTime is the date and time when ReplicaController status change
	LastUpdateTime time.Time `json:"lastUpdateTime,omitempty"`
	// ReportTime is the date and time when report ReplicaController status
	ReportTime time.Time `json:"reportTime,omitempty"`
	// Status is the status of ReplicaController
	Status ReplicaControllerStatus `json:"status"`
	// LastStatus is the last status of ReplicaController
	LastStatus ReplicaControllerStatus `json:"lastStatus,omitempty"`
	// Message indicating details about why the ReplicaController is in this status
	Message string `json:"message,omitempty"`
	// Pods the index of the pod which is created by this ReplicaController
	Pods []*BcsPodIndex `json:"pods"`
	// added  20181011, add for differentiate process/application
	Kind BcsDataType `json:"kind"`
}

BcsReplicaControllerStatus define ReplicaController status

type BcsRequest

type BcsRequest struct {
	AppId             string            `json:"appid,omitempty"`
	Operator          string            `json:"operator,omitempty"`
	DataType          BcsDataType       `json:"dataType,omitempty"`
	Pod               BcsTaskgroup      `json:"pod,omitempty"`
	ReplicaController ReplicaController `json:"replicaController,omitempty"`
	ConfigMap         BcsConfigMap      `json:"configMap,omitempty"`
	Service           BcsService        `json:"service,omitempty"`
	Secret            BcsSecret         `json:"secret,omitempty"`
	LoadBalance       BcsLoadBalance    `json:"loadBalance,omitempty"`
}

BcsRequest request for bcs-api & bcs-client

type BcsSecret

type BcsSecret struct {
	TypeMeta `json:",inline"`
	//AppMeta    `json:",inline"`
	ObjectMeta `json:"metadata"`
	Type       BcsSecretType             `json:"type,omitempty"` //k8s only
	Data       map[string]SecretDataItem `json:"datas"`
}

BcsSecret bcs secret definition

func (*BcsSecret) DeepCopy

func (in *BcsSecret) DeepCopy() *BcsSecret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsConfigMapSpec.

func (*BcsSecret) DeepCopyInto

func (in *BcsSecret) DeepCopyInto(out *BcsSecret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsSecretType

type BcsSecretType string

BcsSecretType type for secret

const (
	BcsSecretTypeOpaque              BcsSecretType = "Opaque"
	BcsSecretTypeServiceAccountToken BcsSecretType = "kubernetes.io/service-account-token"
	BcsSecretTypeDockercfg           BcsSecretType = "kubernetes.io/dockercfg"
	BcsSecretTypeDockerConfigJson    BcsSecretType = "kubernetes.io/dockerconfigjson"
	BcsSecretTypeBasicAuth           BcsSecretType = "kubernetes.io/basic-auth"
	BcsSecretTypeSSHAuth             BcsSecretType = "kubernetes.io/ssh-auth"
	BcsSecretTypeTLS                 BcsSecretType = "kubernetes.io/tls"
)

type BcsService

type BcsService struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata,omitempty"`
	Spec       ServiceSpec `json:"spec"`
}

BcsService service definition

func (*BcsService) DeepCopy

func (in *BcsService) DeepCopy() *BcsService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsServiceSpec.

func (*BcsService) DeepCopyInto

func (in *BcsService) DeepCopyInto(out *BcsService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BcsStorageAlarmIf

type BcsStorageAlarmIf struct {
	ClusterId    string      `json:"clusterId"`
	Namespace    string      `json:"namespace"`
	Message      string      `json:"message"`
	Source       string      `json:"source"`
	Module       string      `json:"module"`
	Type         string      `json:"type"`
	ReceivedTime int64       `json:"receivedTime"`
	Data         interface{} `json:"data"`
}

BcsStorageAlarmIf define storage alarm interface data interaction

type BcsStorageClusterIf

type BcsStorageClusterIf struct {
	Service  string   `json:"service"`
	ZkIp     []string `json:"zkIp"`
	MasterIp []string `json:"masterIp"`
	DnsIp    []string `json:"dnsIp"`
	City     string   `json:"city"`
	JfrogUrl string   `json:"jfrogUrl"`
	NeedNat  bool     `json:"needNat"`
}

BcsStorageClusterIf define storage config interface data interaction Send it to storage and get config data back.

type BcsStorageClusterRelationIf

type BcsStorageClusterRelationIf struct {
	Ips []string `json:"ips"`
}

BcsStorageClusterSettingsIf define storage cluster-ip relationship interface data interaction

type BcsStorageDynamicBatchDeleteIf

type BcsStorageDynamicBatchDeleteIf struct {
	UpdateTimeBegin int64 `json:"updateTimeBegin"`
	UpdateTimeEnd   int64 `json:"updateTimeEnd"`
}

BcsStorageDynamicBatchDeleteIf define storage dynamic batch delete interface data interaction

type BcsStorageDynamicIf

type BcsStorageDynamicIf struct {
	Data interface{} `json:"data"`
}

BcsStorageDynamicIf define storage dynamic interface data interaction

type BcsStorageEventIf

type BcsStorageEventIf struct {
	ID string `json:"id"`
	// Env describes where is the event from, mesos or k8s
	Env EventEnv `json:"env"`
	// Kind describes which kind of resources this event belongs to, pod or rc or ..
	Kind EventKind `json:"kind"`
	// Level describes the level of this event, normal or warning or ..
	Level EventLevel `json:"level"`
	// Component describes which component of bcs create this event, scheduler or controller or ..
	Component EventComponent `json:"component"`
	// Type describes the type of this event, created or killing or ..
	Type string `json:"type"`
	// Describe is the detail of this event.
	Describe string `json:"describe"`
	// ClusterId describes which cluster is the event from.
	ClusterId string `json:"clusterId"`
	// EventTime is the time when the event occurs.
	EventTime int64 `json:"eventTime"`
	// ExtraInfo contains the specific info for each event.
	ExtraInfo EventExtraInfo `json:"extraInfo"`
	// Data is the raw data of event.
	Data interface{} `json:"data"`
}

BcsStorageEventIf define storage event interface data interaction

type BcsStorageHostIf

type BcsStorageHostIf struct {
	Ip        string      `json:"ip"`
	ClusterId string      `json:"clusterId"`
	Data      interface{} `json:"data"`
}

BcsHostIf define storage set host config interface data interaction

type BcsStorageInfo

type BcsStorageInfo struct {
	ServerInfo
}

type BcsStorageMetricIf

type BcsStorageMetricIf struct {
	Data interface{} `json:"data"`
}

BcsStorageMetricIf define storage metric interface data interaction

type BcsStorageRenderIf

type BcsStorageRenderIf struct {
	Version string `json:"version"`

	Data interface{} `json:"data"`
	// the username, it defines the folder where the package is.
	// Example: clusterkeeper, updater or other user.
	User string `json:"user"`
}

BcsStorageRenderIf define storage render interface data interaction Call Gen() after initialization and send the base64 code to render bash.

func (*BcsStorageRenderIf) Gen

func (render *BcsStorageRenderIf) Gen() (r string, err error)

func (*BcsStorageRenderIf) GetData

func (render *BcsStorageRenderIf) GetData() (dc *DeployConfig, err error)

type BcsStorageStableVersionIf

type BcsStorageStableVersionIf struct {
	Version string `json:"version"`
}

BcsStableVersionIf define storage stableVersion interface data interaction

type BcsStorageWatchIf

type BcsStorageWatchIf struct {
	Data interface{} `json:"data"`
}

BcsStorageWatchIf define storage watch interface data interaction

type BcsTaskgroup

type BcsTaskgroup struct {
	TypeMeta      `json:",inline"`
	ObjectMeta    `json:"metadata"`
	PodSpec       `json:"spec"`
	RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
}

BcsPod pod for bcs

type BcsUserMgrServInfo

type BcsUserMgrServInfo struct {
	ServerInfo
}

BcsUserMgrServInfo bcs-user-manager server information

type CCAPIServInfo

type CCAPIServInfo struct {
	ServerInfo
}

CCAPIServInfo ccapi server information

type CertConfig

type CertConfig struct {
	CAFile     string
	CertFile   string
	KeyFile    string
	CertPasswd string
	IsSSL      bool
}

type ClusterEndpoints

type ClusterEndpoints struct {
	MesosSchedulers []SchedulerServInfo `json:"mesosscheduler,omitempty"`
	MesosMasters    []MesosServInfo     `json:"mesosmaster,omitempty"`
	KubeNodes       []KubeNodeInfo      `json:"kubenodes,omitempty"`
}

type ClusterInfoItem

type ClusterInfoItem struct {
	ClusterID   string           `json:"clusterid,omitempty"`
	Type        string           `json:"type"`
	ModuleInfos []ModuleInfoItem `json:"modules"`
}

type ClusterKeeperServInfo

type ClusterKeeperServInfo struct {
	ServerInfo
}

ClusterKeeperServInfo cluster keeper server information

type ClusterSet

type ClusterSet struct {
	ClusterId     string    `json:"clusterId"`
	ClusterConfig ConfigSet `json:"clusterConfig"`
}

type CommandHealthCheck

type CommandHealthCheck struct {
	Value string `json:"value,omitempty"`
}

type CommandInspectInfo

type CommandInspectInfo struct {
	ExitCode int    `json:"exitCode"` // command exitcode,  0: success, >0: failed
	Stdout   string `json:"stdout"`   //command stdout, maxbyte 1024
	Stderr   string `json:"stderr"`   //command stderr, maxbyte 1024
}

type ConfigMap

type ConfigMap struct {
	Name  string      `json:"name"`
	Items []KeyToPath `json:"items,omitempty"`
}

type ConfigMapFileRight

type ConfigMapFileRight string
const (
	ConfigMapFileRight_R  ConfigMapFileRight = "r"
	ConfigMapFileRight_RW ConfigMapFileRight = "rw"
)

type ConfigMapType

type ConfigMapType string
const (
	ConfigMap_Local   ConfigMapType = "local"
	ConfigMap_Remote  ConfigMapType = "remote"
	ConfigMap_Env     ConfigMapType = "env"
	ConfigMap_FileEnv ConfigMapType = "file_env"
)

type ConfigMapUnit

type ConfigMapUnit struct {
	Name      string    `json:"name"`
	ConfigMap ConfigMap `json:"configmap"`
}

type ConfigSet

type ConfigSet struct {
	Common map[string]interface{}            `json:"common"`
	Conf   map[string]map[string]interface{} `json:"conf"`
}

func ParseConfigSet

func ParseConfigSet(data interface{}) (c *ConfigSet, err error)

type ConsoleManagerInfo

type ConsoleManagerInfo struct {
	ServerInfo
}

ConsoleManagerInfo for console manager

type Constraint

type Constraint struct {
	IntersectionItem []*ConstraintDataItem `json:"intersectionItem,omitempty"`
	NodeSelector     map[string]string     `json:"nodeSelector,omitempty"`
}

type ConstraintData

type ConstraintData struct {
	Name    string                   `json:"name"`
	Operate string                   `json:"operate"`
	Type    ConstraintValue_Type     `json:"type"`
	Scalar  *ConstraintValue_Scalar  `json:"scalar"`
	Ranges  []*ConstraintValue_Range `json:"ranges"`
	Text    *ConstraintValue_Text    `json:"text"`
	Set     *ConstraintValue_Set     `json:"set"`
}

type ConstraintDataItem

type ConstraintDataItem struct {
	UnionData []*ConstraintData `json:"unionData"`
}

type ConstraintValue_Range

type ConstraintValue_Range struct {
	Begin uint64 `json:"begin"`
	End   uint64 `json:"end"`
}

type ConstraintValue_Scalar

type ConstraintValue_Scalar struct {
	Value float64 `json:"value"`
}

type ConstraintValue_Set

type ConstraintValue_Set struct {
	Item []string `json:"item"`
}

type ConstraintValue_Text

type ConstraintValue_Text struct {
	Value string `json:"value"`
}

type ConstraintValue_Type

type ConstraintValue_Type int32
const (
	ConstValueType_UNKNOW ConstraintValue_Type = 0
	ConstValueType_Scalar ConstraintValue_Type = 1
	ConstValueType_Range  ConstraintValue_Type = 2
	ConstValueType_Text   ConstraintValue_Type = 3
	ConstValueType_Set    ConstraintValue_Type = 4
)

type Container

type Container struct {
	Name            string               `json:"name,omitempty"`
	Hostname        string               `json:"hostname,omitempty"`
	Command         string               `json:"command,omitempty"`
	Args            []string             `json:"args,omitempty"`
	Parameters      []*KeyToValue        `json:"parameters,omitempty"`
	Type            string               `json:"type,omitempty"`
	Image           string               `json:"image"`
	ImagePullUser   string               `json:"imagePullUser"`
	ImagePullPasswd string               `json:"imagePullPasswd"`
	ImagePullPolicy ImagePullPolicyType  `json:"imagePullPolicy"`
	Privileged      bool                 `json:"privileged"`
	Env             []EnvVar             `json:"env,omitempty"`
	WorkingDir      string               `json:"workingDir,omitempty"`
	Ports           []ContainerPort      `json:"ports,omitempty"`
	HealthChecks    []*HealthCheck       `json:"healthChecks,omitempty"`
	Resources       ResourceRequirements `json:"resources,omitempty"`
	Volumes         []VolumeUnit         `json:"volumes,omitempty"`
	ConfigMaps      []ConfigMap          `json:"configmaps,omitempty"`
	Secrets         []Secret             `json:"secrets,omitempty"`
}

a single container that is expected to be run on the host

type ContainerPort

type ContainerPort struct {
	//each named port in a pod must have a unique name.
	Name          string `json:"name"`
	HostPort      int    `json:"hostPort,omitempty"`
	ContainerPort int    `json:"containerPort"`
	HostIP        string `json:"hostIP,omitempty"`
	Protocol      string `json:"protocol"`
}

ContainerPort represents a network port in a single container

type ContainerStatus

type ContainerStatus string
const (
	Container_Staging  ContainerStatus = "Staging"
	Container_Starting ContainerStatus = "Starting"
	Container_Running  ContainerStatus = "Running"
	Container_Killing  ContainerStatus = "Killing"
	Container_Killed   ContainerStatus = "Killed"
	Container_Finish   ContainerStatus = "Finish"
	Container_Failed   ContainerStatus = "Failed"
	Container_Error    ContainerStatus = "Error"
)

There are the valid statuses of container

type ContainerWareInfo

type ContainerWareInfo struct {
	ServerInfo
}

ContainerWareInfo for container ware

type Crd

type Crd struct {
	TypeMeta   `json:",inline"`
	ObjectMeta `json:"metadata"`

	Spec interface{} `json:"spec"`

	Status interface{} `json:"status,omitempty"`
}

custom resource definition

func (*Crd) DeepCopy

func (in *Crd) DeepCopy() *Crd

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BcsServiceSpec.

func (*Crd) DeepCopyInto

func (in *Crd) DeepCopyInto(out *Crd)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Crr

type Crr struct {
	TypeMeta `json:",inline"`
	Spec     CrrSpec `json:"spec"`
}

custom resource register

func (*Crr) DeepCopy

func (in *Crr) DeepCopy() *Crr

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrrSpec.

func (*Crr) DeepCopyInto

func (in *Crr) DeepCopyInto(out *Crr)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrrSpec

type CrrSpec struct {
	Names CrrSpecName `json:"names"`
}

custom resource register spec

type CrrSpecName

type CrrSpecName struct {
	Kind string `json:"kind"`
}

type DBDataItem

type DBDataItem struct {
	Type      string              `json:"type"`
	ClusterID string              `json:"clusterid"`
	Detail    map[string][]string `json:"detail"`
}

func AppendItem2DbData

func AppendItem2DbData(newData, srcData *DBDataItem) (dbData *DBDataItem)

func NewDBDataItem

func NewDBDataItem() *DBDataItem

func ReqTran2DBFmt

func ReqTran2DBFmt(clusterInfo *ClusterInfoItem) (dbData *DBDataItem)

type DCServInfo

type DCServInfo struct {
	ServerInfo
}

type DNSInfo

type DNSInfo struct {
	ServerInfo
}

DNSInfo for bcs-loadBalance

type DataExporterInfo

type DataExporterInfo struct {
	ServerInfo
}

DataExporterInfo for metric data

type DataUsageType

type DataUsageType string
const (
	DataUsageType_UNKNOWN DataUsageType = "unknown"
	DataUsageType_ENV     DataUsageType = "env"
	DataUsageType_FILE    DataUsageType = "file"
)

type DeployConfig

type DeployConfig struct {
	Service       string       `json:"service"`
	ServiceConfig ConfigSet    `json:"serviceConfig"`
	Clusters      []ClusterSet `json:"clusters"`
	StableVersion string       `json:"stableVersion"`
}

type DiscoveryInfo

type DiscoveryInfo struct {
	ServerInfo
}

DiscoveryInfo for bcs-loadBalance

type Endpoint

type Endpoint struct {
	NetworkMode string          `json:"networkMode"`
	NodeIP      string          `json:"nodeIP"`
	ContainerIP string          `json:"containerIP"`
	Target      TargetRef       `json:"targetRef,omitempty"`
	Ports       []ContainerPort `json:"ports,omitempty"`
}

Endpoint endpoint info for ip address

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVar

type EnvVar struct {
	Name      string        `json:"name"`
	Value     string        `json:"value,omitempty"`
	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}

EnvVar represents an environment variable present in a Container

type EnvVarSource

type EnvVarSource struct {
	// Selects a resource of the container: only resources limits and requests
	// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
	// +optional
	ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"`
}

EnvVarSource represents a source for the value of an EnvVar.

type EventComponent

type EventComponent string
const (
	Event_Component_Scheduler  EventComponent = "scheduler"
	Event_Component_Controller EventComponent = "controller"
)

type EventEnv

type EventEnv string
const (
	Event_Env_K8s   EventEnv = "k8s"
	Event_Env_Mesos EventEnv = "mesos"
)

type EventExtraInfo

type EventExtraInfo struct {
	Namespace string    `json:"namespace"`
	Name      string    `json:"name"`
	Kind      ExtraKind `json:"kind"`
}

type EventKind

type EventKind string
const (
	TaskEventKind EventKind = "task"
)

type EventLevel

type EventLevel string
const (
	Event_Level_Warning EventLevel = "warning"
	Event_Level_Normal  EventLevel = "normal"
)

type ExtendedResource

type ExtendedResource struct {
	//InnerIP, agent ip
	InnerIP string
	//external resource name, example: bkbcs/cpuset
	Name string
	//Value, container need extended resource value, allocated value
	Value float64
	//Capacity, extended resource total value
	Capacity float64
	//device plugin socket address, exmaple: /data/bcs/cpuset.socket
	Socket string
}

type ExtraKind

type ExtraKind string
const (
	ApplicationExtraKind ExtraKind = "application"
)

type HTTPIngressPath

type HTTPIngressPath struct {
	// part of a URL as defined by RFC 3986. Paths must begin with
	// a '/'. If unspecified, the path defaults to a catch all sending
	// traffic to the backend.
	Path string `json:"path"`

	// Backend defines the referenced service endpoint to which the traffic
	// will be forwarded to.
	Backend []IngressBackend `json:"backend"`
}

HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.

type HTTPIngressRule

type HTTPIngressRule struct {
	// Host is the fully qualified domain name of a network host, as defined by RFC 3986.
	// Incoming requests are matched against the host before the IngressRuleValue.
	// If the host is unspecified, the Ingress routes all traffic based on the
	// specified IngressRuleValue.
	Host  string            `json:"host"`
	Paths []HTTPIngressPath `json:"paths"`
}

HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.

type HaProxyRequest

type HaProxyRequest struct {
	User      string `json:"user"`
	SetID     string `json:"set_id"`
	AppID     int    `json:"app_id"`
	Name      string `json:"name"`
	NameSpace string `json:"namespace"`
	Nbproc    int    `json:"nbproc"`
	Replicas  int    `json:"replicas"`
	Services  []struct {
		Mode        string `json:"mode"`
		ServiceName string `json:"k8s_svc_name"`
		ListenPort  string `json:"listen_port"`
		SecretName  string `json:"secret_name"`
		SslCert     string `json:"ssl_cert"`
	} `json:"services"`
}

type HealthCheck

type HealthCheck struct {
	Type                BcsHealthCheckType  `json:"type,omitempty"`
	DelaySeconds        int                 `json:"delaySeconds,omitempty"`
	GracePeriodSeconds  int                 `json:"gracePeriodSeconds,omitempty"`
	IntervalSeconds     int                 `json:"intervalSeconds,omitempty"`
	TimeoutSeconds      int                 `json:"timeoutSeconds,omitempty"`
	ConsecutiveFailures uint32              `json:"consecutiveFailures,omitempty"`
	Command             *CommandHealthCheck `json:"command,omitempty"`
	Http                *HttpHealthCheck    `json:"http,omitempty"`
	Tcp                 *TcpHealthCheck     `json:"tcp,omitempty"`
}

func (*HealthCheck) DeepCopy

func (in *HealthCheck) DeepCopy() *HealthCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck.

func (*HealthCheck) DeepCopyInto

func (in *HealthCheck) DeepCopyInto(out *HealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckResult

type HealthCheckResult struct {
	ID   string             `json:"id,omitempty"`
	Type BcsHealthCheckType `json:"type,omitempty"`

	Http *HttpHealthCheck `json:"http,omitempty"`
	Tcp  *TcpHealthCheck  `json:"tcp,omitempty"`

	Status  bool   `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
}

type HostPathVolumeSource

type HostPathVolumeSource struct {
	Path string `json:"path"`
}

type HttpHealthCheck

type HttpHealthCheck struct {
	Port     int32             `json:"port"`
	PortName string            `json:"portName"`
	Scheme   string            `json:"scheme"`
	Path     string            `json:"path"`
	Headers  map[string]string `json:"headers"`
}

func (*HttpHealthCheck) DeepCopy

func (in *HttpHealthCheck) DeepCopy() *HttpHealthCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpHealthCheck.

func (*HttpHealthCheck) DeepCopyInto

func (in *HttpHealthCheck) DeepCopyInto(out *HttpHealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPServiceInfo

type IPServiceInfo struct {
	ServerInfo
}

IPServiceInfo for module ipservice

type ImagePullPolicyType

type ImagePullPolicyType string
const (
	ImagePullPolicy_ALWAYS       ImagePullPolicyType = "Always"
	ImagePullPolicy_IFNOTPRESENT ImagePullPolicyType = "IfNotPresent"
	ImagePullPolicy_NEVER        ImagePullPolicyType = "Never"
)

type IngressBackend

type IngressBackend struct {
	ServiceName string `json:"serviceName"`
	ServicePort int32  `json:"servicePort"`
	Weight      int32  `json:"weight"`
}

IngressBackend describes all endpoints for a given service and port.

type IngressRule

type IngressRule struct {
	Kind        IngressRuleKind  `json:"kind"`
	Balance     BalanceType      `json:"balance"`
	MaxConn     int              `json:"maxConn"`
	HTTPIngress *HTTPIngressRule `json:"httpIngress"`
	TCPIngress  *TCPIngressRule  `json:"tcpIngress"`
}

IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.

type IngressRuleKind

type IngressRuleKind string

type IngressSpec

type IngressSpec struct {
	LBGroup   string `json:"lbGroup"`
	ClusterID string `json:"clusterid"`

	// A list of host rules used to configure the Ingress. If unspecified, or
	// no rule matches, all traffic is sent to the default backend.
	Rules []IngressRule `json:"rules"`
}

IngressSpec describes the Ingress the user wishes to exist.

type KeeperClusterInfoOutput

type KeeperClusterInfoOutput struct {
	ClusterInfos map[string]ClusterInfoItem
}

func NewKeeperClusterInfoOutput

func NewKeeperClusterInfoOutput() *KeeperClusterInfoOutput

type KeeperDBData

type KeeperDBData struct {
	DBData []*DBDataItem `json:"clusterinfo"`
}

type KeyToPath

type KeyToPath struct {
	// the key to project
	Type DataUsageType `json:"type"`
	// in kubernetes, DataKey and DataKeyAlias must be used at the same time.
	// and you can also choose not to use them. Once you have used them both, you have to know that
	// only this "DataKey" will be mount into your container, the other "DataKey" will be ignored.
	// for example, you have an configmap named example-configmap, which have keys like as follows:
	// key1: "data for key1"
	// key2: "data for key2"
	// if you set Datakey = "key1", and DataKeyAlias = "alias/key1alias.txt", and KeyOrPath = /home/mountexample,
	// then in your container you will find only "one" mounted file in path
	// "/home/mountexample/alias/keyalias.txt" and the file content is "data for key1."
	DataKey      string `json:"dataKey"`             //configmap sub item name
	DataKeyAlias string `json:"dataKeyAlias"`        //k8s only
	KeyOrPath    string `json:"keyOrPath,omitempty"` //indexs means ENV key, path means containerpath
	SubPath      string `json:"subPath,omitempty"`
	ReadOnly     bool   `json:"readOnly,omitempty"`
	User         string `json:"user,omitempty"`
}

type KeyToValue

type KeyToValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

KeyToValue key/value structs

type KillPolicy

type KillPolicy struct {
	GracePeriod int64 `json:"gracePeriod"` //seconds
}

KillPolicy for container

type KubeNodeInfo

type KubeNodeInfo struct {
	ServerInfo
}

type KuberneteDataWatchServInfo

type KuberneteDataWatchServInfo struct {
	ServerInfo
}

KuberneteDataWatchServInfo kubernete-data-watch server information

type KuberneteDriverServInfo

type KuberneteDriverServInfo struct {
	ServerInfo
}

KuberneteDriverServInfo kubernetedriver server information

type LoadBalanceInfo

type LoadBalanceInfo struct {
	ServerInfo
}

LoadBalanceInfo for bcs-loadBalance

type MesosDataWatchServInfo

type MesosDataWatchServInfo struct {
	ServerInfo
}

MesosDataWatchServInfo mesos-data-watch server information

type MesosDriverServInfo

type MesosDriverServInfo struct {
	ServerInfo
}

MesosDriverServInfo mesosdriver server information

type MesosServInfo

type MesosServInfo struct {
	ServerInfo
}

type MesosValue_Ranges

type MesosValue_Ranges struct {
	Begin uint64 `json:"begin"`
	End   uint64 `json:"end"`
}

type MesosValue_Scalar

type MesosValue_Scalar struct {
	Value float64 `json:"value"`
}

type MesosValue_Set

type MesosValue_Set struct {
	Item []string `json:"item"`
}

type MesosValue_Text

type MesosValue_Text struct {
	Value string `json:"value"`
}

type MesosValue_Type

type MesosValue_Type int32
const (
	MesosValueType_UNKNOW MesosValue_Type = 0
	MesosValueType_Scalar MesosValue_Type = 101
	MesosValueType_Ranges MesosValue_Type = 102
	MesosValueType_Text   MesosValue_Type = 103
	MesosValueType_Set    MesosValue_Type = 104
)

type MetricCollectorInfo

type MetricCollectorInfo struct {
	ServerInfo
}

MetricCollectorInfo for bcs-metriccollector

type MetricServiceInfo

type MetricServiceInfo struct {
	ServerInfo
}

MetricServiceInfo for bcs-metricservice

type MetricSourceType

type MetricSourceType string
const (
	// ResourceMetricSourceType is a resource metric known to mesos, as
	// specified in limits, describing each taskgroup in the current
	// scale target (e.g. CPU or memory).  Such metrics are built in to
	// mesos, and have special scaling options on top of those available
	// to normal per-taskgroup metrics (the "taskgroups" source).
	//target kind = AutoscalerMetricAverageUtilization
	ResourceMetricSourceType MetricSourceType = "Resource"
	// TaskgroupsMetricSourceType is a metric describing each taskgroup in the current scale
	// target (for example, transactions-processed-per-second).  The values
	// will be averaged together before being compared to the target value.
	//target kind = AutoscalerMetricTargetAverageValue
	TaskgroupsMetricSourceType MetricSourceType = "Taskgroup"
	// ExternalMetricSourceType is a global metric that is not associated
	// with any mesos object. It allows autoscaling based on information
	// coming from components running outside of cluster
	// (for example length of queue in cloud messaging service, or
	// QPS from loadbalancer running outside of cluster).
	//target kind = AutoscalerMetricTargetValue
	ExternalMetricSourceType MetricSourceType = "External"
)

type ModuleInfoItem

type ModuleInfoItem struct {
	MasterModule []string `json:"mastermoudle"`
	IPS          []string `json:"ips"`
}

type NamespaceSelector

type NamespaceSelector struct {
	Operator NamespaceSelectorOperator `json:"operator"`
	Values   []string                  `json:"values,omitempty"`
}

func (*NamespaceSelector) CheckSelector

func (in *NamespaceSelector) CheckSelector(ns string) bool

NamespaceSelector selector namespace

func (*NamespaceSelector) DeepCopy

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

func (*NamespaceSelector) DeepCopyInto

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

type NamespaceSelectorOperator

type NamespaceSelectorOperator string

A namespace selector operator is the set of operators that can be used in a selector requirement.

const (
	NamespaceSelectorOpIn    NamespaceSelectorOperator = "In"
	NamespaceSelectorOpNotIn NamespaceSelectorOperator = "NotIn"
)

type NetLimit

type NetLimit struct {
	EgressLimit int `json:"egressLimit"`
}

network flow limit for container

type NetServiceInfo

type NetServiceInfo struct {
	ServerInfo
}

NetServiceInfo for bcs-netservice

type NetworkDetectionServInfo

type NetworkDetectionServInfo struct {
	ServerInfo
}

NetworkDetectionServInfo netwrok-detection server information

type ObjectMeta

type ObjectMeta struct {
	Name              string            `json:"name"`
	NameSpace         string            `json:"namespace"`
	CreationTimestamp time.Time         `json:"creationTimestamp,omitempty"`
	Labels            map[string]string `json:"labels,omitempty"`
	Annotations       map[string]string `json:"annotations,omitempty"`
	ClusterName       string            `json:"clusterName,omitempty"`
	// Populated by the system.
	// Read-only.
	// Value must be treated as opaque by clients and .
	ResourceVersion string `json:"-"`
}

ObjectMeta for meta for datatype

func (*ObjectMeta) DeepCopy

func (in *ObjectMeta) DeepCopy() *ObjectMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.

func (*ObjectMeta) DeepCopyInto

func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ObjectMeta) GetAnnotations

func (om *ObjectMeta) GetAnnotations() map[string]string

GetAnnotations for ObjectMeta

func (*ObjectMeta) GetClusterName

func (om *ObjectMeta) GetClusterName() string

GetClusterName get cluster name

func (*ObjectMeta) GetCreationTimestamp

func (om *ObjectMeta) GetCreationTimestamp() time.Time

GetCreationTimestamp get create timestamp

func (*ObjectMeta) GetLabels

func (om *ObjectMeta) GetLabels() map[string]string

GetLabels for ObjectMeta

func (*ObjectMeta) GetName

func (om *ObjectMeta) GetName() string

GetName for ObjectMeta

func (*ObjectMeta) GetNamespace

func (om *ObjectMeta) GetNamespace() string

GetNamespace for ObjectMeta

func (*ObjectMeta) MetaIsValid

func (r *ObjectMeta) MetaIsValid() error

func (*ObjectMeta) SetAnnotations

func (om *ObjectMeta) SetAnnotations(annotation map[string]string)

SetAnnotations get annotation name

func (*ObjectMeta) SetClusterName

func (om *ObjectMeta) SetClusterName(clusterName string)

SetClusterName set cluster name

func (*ObjectMeta) SetCreationTimestamp

func (om *ObjectMeta) SetCreationTimestamp(timestamp time.Time)

SetCreationTimestamp set creat timestamp

func (*ObjectMeta) SetLabels

func (om *ObjectMeta) SetLabels(labels map[string]string)

SetLabels set objec labels

func (*ObjectMeta) SetName

func (om *ObjectMeta) SetName(name string)

SetName set object name

func (*ObjectMeta) SetNamespace

func (om *ObjectMeta) SetNamespace(ns string)

SetNamespace set object namespace

type Permission

type Permission struct {
	UserName     string `json:"user_name"`
	ResourceType string `json:"resource_type"`
	Resource     string `json:"resource"`
	Role         string `json:"role"`
}

type PodSpec

type PodSpec struct {
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	Containers   []Container       `json:"containers,omitempty"`
	Processes    []Process         `json:"processes,omitempty"`
	NetworkMode  string            `json:"networkMode,omitempty"`
	NetworkType  string            `json:"networktype,omitempty"`
	NetLimit     *NetLimit         `json:"netLimit,omitempty"`
}

type PodStatus

type PodStatus string
const (
	Pod_Staging  PodStatus = "Staging"
	Pod_Starting PodStatus = "Starting"
	Pod_Running  PodStatus = "Running"
	Pod_Error    PodStatus = "Error"
	Pod_Killing  PodStatus = "Killing"
	Pod_Killed   PodStatus = "Killed"
	Pod_Failed   PodStatus = "Failed"
	Pod_Finish   PodStatus = "Finish"
)

type PodTemplateSpec

type PodTemplateSpec struct {
	// Metadata of the pods created from this template
	ObjectMeta `json:"metadata,omitempty"`
	// Spec defines the behavior of a pod
	PodSpec PodSpec `json:"spec,omitempty"`
}

PodTemplateSpec specification for pod

type Process

type Process struct {
	ProcName   string `json:"procName"`
	WorkPath   string `json:"workPath"`
	Uris       []*Uri `json:"uris"`
	PidFile    string `json:"pidFile"`
	StartCmd   string `json:"startCmd"`
	CheckCmd   string `json:"checkCmd"`
	StopCmd    string `json:"stopCmd"`
	RestartCmd string `json:"restartCmd"`
	ReloadCmd  string `json:"reloadCmd"`
	KillCmd    string `json:"killCmd"`
	LogPath    string `json:"logPath"`
	CfgPath    string `json:"cfgPath"`
	User       string `json:"user"`
	ProcGroup  string `json:"procGroup"`

	Env          []EnvVar             `json:"env,omitempty"`
	HealthChecks []*HealthCheck       `json:"healthChecks,omitempty"`
	Resources    ResourceRequirements `json:"resources,omitempty"`
	ConfigMaps   []ConfigMap          `json:"configmaps,omitempty"`
	Secrets      []Secret             `json:"secrets,omitempty"`
	Ports        []ContainerPort      `json:"ports,omitempty"`

	StartGracePeriod int `json:"startGracePeriod"`
}

a single process that is expected to be run on the host

type ProxyInfo

type ProxyInfo struct {
	ServerInfo
}

ProxyInfo for proxy module

type QcloudCLBInfo

type QcloudCLBInfo struct {
	ServerInfo
}

QcloudCLBInfo for qcloud clb

type RenderConfig

type RenderConfig struct {
	MesosZk          string `render:"mesosZkHost"`
	MesosZkSpace     string `render:"mesosZkHostSpace"`
	MesosZkSemicolon string `render:"mesosZkHostSemicolon"`
	MesosZkRaw       string `render:"mesosZkRaw"`
	MesosMaster      string `render:"mesosMaster"`
	MesosQuorum      string `render:"mesosQuorum"`
	Dns              string `render:"dnsUpStream"`
	ClusterId        string `render:"clusterId"`
	ClusterIdNum     string `render:"clusterIdNumber"`
	City             string `render:"city"`
	JfrogUrl         string `render:"jfrogUrl"`
	NeedNat          string `render:"needNat"`
}

func (RenderConfig) Render

func (rc RenderConfig) Render(s string) (r string)

type ReplicaController

type ReplicaController struct {
	TypeMeta `json:",inline"`
	//AppMeta               `json:",inline"`
	ObjectMeta            `json:"metadata"`
	ReplicaControllerSpec ReplicaControllerSpec `json:"spec"`
	UpPolicy              UpdatePolicy          `json:"updatePolicy,omitempty"`
	RestartPolicy         RestartPolicy         `json:"restartPolicy,omitempty"`
	KillPolicy            KillPolicy            `json:"killPolicy,omitempty"`
	Constraints           *Constraint           `json:"constraint,omitempty"`
}

type ReplicaControllerSpec

type ReplicaControllerSpec struct {
	Instance int               `json:"instance"`
	Selector map[string]string `json:"selector,omitempty"`
	Template *PodTemplateSpec  `json:"template"`
}

type ReplicaControllerStatus

type ReplicaControllerStatus string
const (
	RC_Staging   ReplicaControllerStatus = "Staging"
	RC_Deploying ReplicaControllerStatus = "Deploying"
	RC_Running   ReplicaControllerStatus = "Running"
	RC_Operating ReplicaControllerStatus = "Operating"
	RC_Finish    ReplicaControllerStatus = "Finish"
	RC_Error     ReplicaControllerStatus = "Error"
)

type RequestApi

type RequestApi struct {
	AppId    string      `json:"appid,omitempty"`
	Operator string      `json:"operator,omitempty"`
	Request  interface{} `json:"request,omitempty"`
}

RequestApi old version api request for bcs-client & bcs-api

type ResourceFieldSelector

type ResourceFieldSelector struct {
	// Required: resource to select
	Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"`
}

ResourceFieldSelector represents container resources (cpu, memory) and their output format

type ResourceList

type ResourceList struct {
	Cpu     string `json:"cpu,omitempty"`
	Mem     string `json:"memory,omitempty"`
	Storage string `json:"storage,omitempty"`
}

type ResourceRequirements

type ResourceRequirements struct {
	Limits            ResourceList        `json:"limits,omitempty"`
	Requests          ResourceList        `json:"requests,omitempty"`
	ExtendedResources []*ExtendedResource `json:"extendedResources,omitempty"`
}

ResourceRequirements describes the compute resource requirement

type ResourcesRef

type ResourcesRef struct {
	//admission operation, Http method: POST=Create; PUT=Update
	Operation AdmissionOperation `json:"operation"`
	//resources kind, mesos resources json: Deployment,Application...
	Kind AdmissionResourcesKind `json:"kind"`
}

func (*ResourcesRef) DeepCopy

func (in *ResourcesRef) DeepCopy() *ResourcesRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSchedInfo.

func (*ResourcesRef) DeepCopyInto

func (in *ResourcesRef) DeepCopyInto(out *ResourcesRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RestartPolicy

type RestartPolicy struct {
	Policy         RestartPolicyType `json:"policy"`                   //value: Nerver | Always | OnFailure
	Interval       int               `json:"interval,omitempty"`       //only for mesos
	Backoff        int               `json:"backoff,omitempty"`        //only for mesos
	MaxTimes       int               `json:"maxtimes,omitempty"`       //only for mesos
	HostRetainTime int64             `json:"hostRetainTime,omitempty"` //only for mesos
}

RestartPolicy for pod

type RestartPolicyType

type RestartPolicyType string

RestartPolicyType type for restart strategy

const (
	RestartPolicy_NEVER     RestartPolicyType = "Never"
	RestartPolicy_ALWAYS    RestartPolicyType = "Always"
	RestartPolicy_ONFAILURE RestartPolicyType = "OnFailure"
)

type RollingOrderType

type RollingOrderType string

type RollingUpdate

type RollingUpdate struct {
	// The maximum number of pods that can be unavailable during the update.
	// This can not be 0 if MaxSurge is 0.
	// By default, a fixed value of 1 is used.
	MaxUnavailable int `json:"maxUnavilable"`

	// The maximum number of pods that can be scheduled above the original number of pods.
	// By default, a value of 1 is used.
	MaxSurge int `json:"maxSurge"`

	// the time duration between the rolling update operation.
	// in second unit. By default, a value of 10s is used.
	UpgradeDuration uint32 `json:"upgradeDuration"`

	// rolling update will do step by step manully or automatically, if manully, it will pause after every step.
	// by default is false
	RollingManually bool `json:"rollingManually"`

	// rolling update order, create first or delete first.
	// by default, a value of CreateFirst is used.
	RollingOrder RollingOrderType `json:"rollingOrder"`
}

type RouteServInfo

type RouteServInfo struct {
	ServerInfo
}

RouteServInfo route server information

type SaDriverServInfo

type SaDriverServInfo struct {
	ServerInfo
}

SaDriverServInfo sa driver server information

type SchedulerServInfo

type SchedulerServInfo struct {
	ServerInfo
}

SchedulerServInfo scheduler server information

type Secret

type Secret struct {
	SecretName string       `json:"secretName,omitempty"`
	Items      []SecretItem `json:"items,omitempty"`
}

type SecretDataItem

type SecretDataItem struct {
	//Path    string `json:"path,omitempty"` //mesos only
	Content string `json:"content"`
}

SecretDataItem secret detail

type SecretItem

type SecretItem struct {
	Type      DataUsageType `json:"type,omitempty"`
	DataKey   string        `json:"dataKey,omitempty"`
	KeyOrPath string        `json:"keyOrPath,omitempty"`
	SubPath   string        `json:"subPath,omitempty"`
	ReadOnly  bool          `json:"readOnly,omitempty"`
	User      string        `json:"user,omitempty"`
}

type SecretUnit

type SecretUnit struct {
	Name   string `json:"name"`
	Secret Secret `json:"secret"`
}

type ServerInfo

type ServerInfo struct {
	IP           string `json:"ip"`
	IPv6         string `json:"ipv6"`
	Port         uint   `json:"port"`
	GrpcPort     uint   `json:"grpc_port"`
	MetricPort   uint   `json:"metric_port"`
	HostName     string `json:"hostname"`
	Scheme       string `json:"scheme"` //http, https
	Version      string `json:"version"`
	Cluster      string `json:"cluster"`
	Pid          int    `json:"pid"`
	ExternalIp   string `json:"external_ip"`
	ExternalIPv6 string `json:"external_ipv6"`
	ExternalPort uint   `json:"external_port"`
}

ServerInfo base server information

type ServiceLoadBalance

type ServiceLoadBalance struct {
	ServiceName string `json:"name"`
	Protocol    string `json:"protocol"`
	Domain      string `json:"domain,omitempty"`
	ExportPort  int    `json:"exportPort,omitempty"`
	Weight      uint   `json:"weight"`
}

ServiceLoadBalance loadbalance between multiple service with weight

type ServicePort

type ServicePort struct {
	Name       string `json:"name"`
	DomainName string `json:"domainName,omitempty"` //mesos only
	Path       string `json:"path"`
	Protocol   string `json:"protocol"`
	Port       int    `json:"servicePort"`
	TargetPort int    `json:"targetPort,omitempty"` //k8s only
	NodePort   int    `json:"nodePort,omitempty"`   //k8s only
}

ServicePort port info for Service

type ServiceSpec

type ServiceSpec struct {
	Selector  map[string]string `json:"selector"`
	Type      string            `json:"type,omitempty"` //k8s only
	ClusterIP []string          `json:"clusterIP,omitemtpy"`
	Ports     []ServicePort     `json:"ports"`
}

ServiceSpec service info specifics

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPIngressRule

type TCPIngressRule struct {
	ListenPort int32            `json:"listenPort"`
	Backend    []IngressBackend `json:"backend"`
}

type TargetRef

type TargetRef struct {
	Kind      string `json:"kind"`
	ID        string `json:"id"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	//container images
	Image string `json:"image"`
}

TargetRef referrence for endpoint

type TaskCommandInfo

type TaskCommandInfo struct {
	TaskId      string              `json:"taskId"` //application taskid
	Status      TaskCommandStatus   `json:"status"`
	Message     string              `json:"message"`
	CommInspect *CommandInspectInfo `json:"commInspect"`
}

func (*TaskCommandInfo) DeepCopy

func (in *TaskCommandInfo) DeepCopy() *TaskCommandInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskCommandInfo.

func (*TaskCommandInfo) DeepCopyInto

func (in *TaskCommandInfo) DeepCopyInto(out *TaskCommandInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskCommandStatus

type TaskCommandStatus string
const (
	TaskCommandStatusStaging TaskCommandStatus = "staging"
	TaskCommandStatusRunning TaskCommandStatus = "running"
	TaskCommandStatusFinish  TaskCommandStatus = "finish"
	TaskCommandStatusFailed  TaskCommandStatus = "failed"
)

type TaskgroupCommandInfo

type TaskgroupCommandInfo struct {
	TaskgroupId string             `json:"taskgroupId"`
	Tasks       []*TaskCommandInfo `json:"tasks"`
}

func (*TaskgroupCommandInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskgroupCommandInfo.

func (*TaskgroupCommandInfo) DeepCopyInto

func (in *TaskgroupCommandInfo) DeepCopyInto(out *TaskgroupCommandInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TcpHealthCheck

type TcpHealthCheck struct {
	Port     int32  `json:"port"`
	PortName string `json:"portName"`
}

type TypeMeta

type TypeMeta struct {
	APIVersion string      `json:"apiVersion"`
	Kind       BcsDataType `json:"kind"`
}

TypeMeta for bcs data type

type UpdatePolicy

type UpdatePolicy struct {
	UpdateDelay  int    `json:"updateDelay,omitempty"`
	MaxRetries   int    `json:"maxRetries,omitempty"`
	MaxFailovers int    `json:"maxFailovers,omitempty"`
	Action       string `json:"action,omitempty"`
}

type UpgradeStrategy

type UpgradeStrategy struct {
	Type          UpgradeStrategyType `json:"type"`
	RollingUpdate *RollingUpdate      `json:"rollingupdate"`
}

func (*UpgradeStrategy) DeepCopy

func (in *UpgradeStrategy) DeepCopy() *UpgradeStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeStrategy.

func (*UpgradeStrategy) DeepCopyInto

func (in *UpgradeStrategy) DeepCopyInto(out *UpgradeStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeStrategyType

type UpgradeStrategyType string

type Uri

type Uri struct {
	Value     string //process package registry uri, example for "http://xxx.registry.xxx.com/xxx/v1/pack.tar.gz"
	User      string //package registry user
	Pwd       string //package registry password, example for curl -u 'user:pwd' -X GET "http://xxx.registry.xxx.com/xxx/v1/pack.tar.gz"
	OutputDir string
}

type Volume

type Volume struct {
	HostPath  string `json:"hostPath,omitempty"`
	MountPath string `json:"mountPath,omitempty"`
	SubPath   string `json:"subPath,omitempty"`
	ReadOnly  bool   `json:"readOnly,omitempty"`
}

type VolumeUnit

type VolumeUnit struct {
	//Each volume in a pod must have a unique name
	Name   string `json:"name"`
	Volume Volume `json:"volume,omitempty"`
}

type WebhookClientConfig

type WebhookClientConfig struct {
	//url
	Url string `json:"url"`
	//pem encoded ca cert that signs the server cert used by the webhook
	CaBundle string `json:"caBundle"`
	//webhook service namespace
	Namespace string `json:"namespace"`
	//webhook service name
	Name string `json:"name"`
	//url path
	Path string `json:"path"`
	//port
	Port int `json:"port"`
}

type WebhookFailurePolicyKind

type WebhookFailurePolicyKind string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL