models

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0 Imports: 0 Imported by: 11 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {

	/* 集群id (Optional) */
	ClusterId string `json:"clusterId"`

	/* 名称 (Optional) */
	Name string `json:"name"`

	/* 描述 (Optional) */
	Description string `json:"description"`

	/* kubernetes的版本 (Optional) */
	Version string `json:"version"`

	/* 集群所在的az (Optional) */
	Azs []string `json:"azs"`

	/* 节点组列表 (Optional) */
	NodeGroups []NodeGroup `json:"nodeGroups"`

	/* k8s的cluster的cidr (Optional) */
	ClusterCidr string `json:"clusterCidr"`

	/* 认证信息 (Optional) */
	MasterAuth MasterAuth `json:"masterAuth"`

	/* 状态  [pending,running,reconciling(升级时的状态), deleting, deleted, error] (Optional) */
	ClusterState string `json:"clusterState"`

	/* 状态变更原因 (Optional) */
	StateMessage string `json:"stateMessage"`

	/* 更新时间 (Optional) */
	UpdateTime string `json:"updateTime"`

	/* 创建时间 (Optional) */
	CreateTime string `json:"createTime"`

	/* 用户的AccessKey,插件调用open-api时的认证凭证 (Optional) */
	AccessKey string `json:"accessKey"`

	/*  (Optional) */
	BasicAuth bool `json:"basicAuth"`

	/*  (Optional) */
	ClientCertificate bool `json:"clientCertificate"`

	/* 用户访问的ip (Optional) */
	Endpoint string `json:"endpoint"`

	/* endpoint的port (Optional) */
	EndpointPort string `json:"endpointPort"`

	/* endpoint的dashboard port (Optional) */
	DashboardPort string `json:"dashboardPort"`

	/* 用户是否启用集群自定义监控 (Optional) */
	UserMetrics bool `json:"userMetrics"`
}

type ClusterSpec

type ClusterSpec struct {

	/* 名称(同一用户的 cluster 允许重名)  */
	Name string `json:"name"`

	/* 描述 (Optional) */
	Description string `json:"description"`

	/* 默认开启 basicAuth与clientCertificate最少选择一个 (Optional) */
	BasicAuth bool `json:"basicAuth"`

	/* 默认开启 basicAuth与clientCertificate最少选择一个 (Optional) */
	ClientCertificate bool `json:"clientCertificate"`

	/* kubernetes的版本,默认1.8 (Optional) */
	Version string `json:"version"`

	/* 集群所在的az  */
	Azs []string `json:"azs"`

	/* 实例组 (Optional) */
	NodeGroup NodeGroupSpec `json:"nodeGroup"`

	/* k8s的master的cidr  */
	MasterCIDR string `json:"masterCIDR"`

	/* 用户的AccessKey,插件调用open-api时的认证凭证  */
	AccessKey string `json:"accessKey"`

	/* 用户的SecretKey,插件调用open-api时的认证凭证  */
	SecretKey string `json:"secretKey"`
}

type Label

type Label struct {

	/*  (Optional) */
	Key string `json:"key"`

	/*  (Optional) */
	Value string `json:"value"`
}

type LabelSpec

type LabelSpec struct {

	/* key包含两个部分:prefix与name,name是必须的,prefix是可选的。prefix与name分隔用"/"。
	name 可以是字母,数字,[-_.]。长度小于63。prefix:遵循DNS标准(例如:kubernetes.io/),长度不超过253
	[参照](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)
	*/
	Key string `json:"key"`

	/* 字母,数字,[-_.],长度不超过63 (Optional) */
	Value *string `json:"value"`
}

type MaintenanceWindowSpec added in v1.8.0

type MaintenanceWindowSpec struct {

	/* daily, weekly, monthly, 默认 weekly (Optional) */
	PeriodType *string `json:"periodType"`

	/* 维护操作开始具体日期, 仅对 periodType 取值为 weekly 或 monthly 时有效, periodType 为 weekly 时可以取 1-7, periodType 为 monthly 时可取 1-28
	(Optional) */
	StartDay *int `json:"startDay"`

	/* 维护操作开始具体时间. 时间格式符合RFC3339,并使用 UTC 时间,精确到分钟,例如 23:27  */
	StartTime string `json:"startTime"`

	/* 时区,使用 IANA 数据格式,例如:"Asia/Shanghai" 或 "America/Los_Angeles",默认 "UTC" (Optional) */
	TimeZone *string `json:"timeZone"`

	/* 维护运行时长: 4-24 小时,步长 1 小时, 默认为: 4小时 (Optional) */
	Duration *int `json:"duration"`
}

type MasterAuth

type MasterAuth struct {

	/* base64编码,集群的根的public certificate (Optional) */
	ClusterCaCertificate string `json:"clusterCaCertificate"`

	/* base64编码,客户端连接集群的public certificate (Optional) */
	ClientCertificate string `json:"clientCertificate"`

	/* base64编码, client的私钥 (Optional) */
	ClientKey string `json:"clientKey"`

	/* basic auth的user (Optional) */
	User string `json:"user"`

	/* basic auth的password (Optional) */
	Password string `json:"password"`
}

type MasterImage

type MasterImage struct {

	/* 镜像编码 (Optional) */
	Code string `json:"code"`

	/* 虚机镜像id (Optional) */
	ImageId string `json:"imageId"`

	/* 主版本号 (Optional) */
	MainVersion string `json:"mainVersion"`

	/* 内部版本号 (Optional) */
	InnerVersion string `json:"innerVersion"`

	/* 是否默认镜像 (Optional) */
	IsDefault bool `json:"isDefault"`

	/* 可见度:0:所有人可见;1:授权用户可见;2:只有白名单用户可见 (Optional) */
	Visibility int `json:"visibility"`

	/* 默认ndoe镜像编码 (Optional) */
	DefaultNodeImageCode string `json:"defaultNodeImageCode"`

	/* node 节点的配置 (Optional) */
	NodeImages []NodeImage `json:"nodeImages"`
}

type MasterProgress added in v1.8.0

type MasterProgress struct {

	/* 操作类型 upgrade,rollback,downgrade 等 (Optional) */
	Action string `json:"action"`

	/* 升级范围, 目前只有三个值:0, 50, 100 (Optional) */
	Progress string `json:"progress"`
}

type MasterVersion

type MasterVersion struct {

	/* 集群版本号 (Optional) */
	Version string `json:"version"`

	/* 是否默认版本 (Optional) */
	IsDefault bool `json:"isDefault"`

	/* 默认ndoe版本号 (Optional) */
	DefaultNodeVersion string `json:"defaultNodeVersion"`

	/* 版本状态 (Optional) */
	VersionStatus string `json:"versionStatus"`

	/* node 节点的配置 (Optional) */
	NodeVersions []NodeVersion `json:"nodeVersions"`
}

type NodeConfig

type NodeConfig struct {

	/* 实例类型 (Optional) */
	InstanceType string `json:"instanceType"`

	/* 镜像信息 (Optional) */
	ImageId string `json:"imageId"`

	/* 云盘系统盘的大小  单位(GB) (Optional) */
	SystemDiskSize int `json:"systemDiskSize"`

	/* 云盘系统盘的大小[ssd,premium-hdd] (Optional) */
	SystemDiskType string `json:"systemDiskType"`

	/* Node的信息 (Optional) */
	Labels []LabelSpec `json:"labels"`
}

type NodeConfigSpec

type NodeConfigSpec struct {

	/* 实例类型  */
	InstanceType string `json:"instanceType"`

	/* 镜像信息 (Optional) */
	Version *string `json:"version"`

	/* 云盘系统盘的大小  单位(GB)  */
	SystemDiskSize int `json:"systemDiskSize"`

	/* 云盘系统盘的大小[ssd,premium-hdd]  */
	SystemDiskType string `json:"systemDiskType"`

	/* Node的信息 (Optional) */
	Labels []LabelSpec `json:"labels"`
}

type NodeGroup

type NodeGroup struct {

	/* 集群id (Optional) */
	ClusterId string `json:"clusterId"`

	/* node group id (Optional) */
	NodeGroupId string `json:"nodeGroupId"`

	/* 名称 (Optional) */
	Name string `json:"name"`

	/* 描述 (Optional) */
	Description string `json:"description"`

	/* Node的信息 (Optional) */
	NodeConfig NodeConfig `json:"nodeConfig"`

	/* k8s中的node的版本 (Optional) */
	Version string `json:"version"`

	/* node所属的网络信息 (Optional) */
	NodeNetwork NodeNetwork `json:"nodeNetwork"`

	/* 当前node数量 (Optional) */
	CurrentCount int `json:"currentCount"`

	/* 期望的node数量 (Optional) */
	ExpectCount int `json:"expectCount"`

	/* node group的ag id ,通过agid可以查询该node group下的实例 (Optional) */
	AgId string `json:"agId"`

	/* node group的ag id对应的实例模板 (Optional) */
	InstanceTemplateId string `json:"instanceTemplateId"`

	/* 状态  [pending,running,resizing,reconciling,deleting,deleted,error,running_with_error(部分节点有问题)] (Optional) */
	State string `json:"state"`

	/*  (Optional) */
	Tags []Tag `json:"tags"`

	/* 更新时间 (Optional) */
	UpdateTime string `json:"updateTime"`

	/* 状态变更原因 (Optional) */
	StateMessage string `json:"stateMessage"`

	/* 是否开启自动修复 (Optional) */
	AutoRepair string `json:"autoRepair"`

	/* 创建时间 (Optional) */
	CreatedTime string `json:"createdTime"`
}

type NodeGroupProgress added in v1.8.0

type NodeGroupProgress struct {

	/* 节点组 id (Optional) */
	NodeGroupId string `json:"nodeGroupId"`

	/* 操作类型, upgrade, downgrade, rollback (Optional) */
	Action string `json:"action"`

	/* 总node个数 (Optional) */
	TotalCount int `json:"totalCount"`

	/* 升级完成node个数 (Optional) */
	UpdatedCount int `json:"updatedCount"`
}

type NodeGroupSpec

type NodeGroupSpec struct {

	/* 名称  */
	Name string `json:"name"`

	/*  (Optional) */
	Description *string `json:"description"`

	/* Node的信息  */
	NodeConfig *NodeConfigSpec `json:"nodeConfig"`

	/* nodeGroup初始化大小,至少为1个  */
	InitialNodeCount int `json:"initialNodeCount"`

	/* k8s运行的vpc  */
	VpcId string `json:"vpcId"`

	/* k8s的node的cidr (Optional) */
	NodeCidr *string `json:"nodeCidr"`

	/* 是否开启自动修复,默认不开启。 (Optional) */
	AutoRepair *bool `json:"autoRepair"`
}

type NodeImage

type NodeImage struct {

	/* 镜像编码 (Optional) */
	Code string `json:"code"`

	/* 虚机镜像id (Optional) */
	ImageId string `json:"imageId"`

	/* 镜像操作系统 (Optional) */
	ImageOs string `json:"imageOs"`

	/* 主版本号 (Optional) */
	MainVersion string `json:"mainVersion"`

	/* 内部版本号 (Optional) */
	InnerVersion string `json:"innerVersion"`

	/* 可见度 (Optional) */
	Visibility int `json:"visibility"`
}

type NodeNetwork

type NodeNetwork struct {

	/* pod子网的id (Optional) */
	PodSubnetId string `json:"podSubnetId"`

	/* node子网的id (Optional) */
	NodeSubnetId string `json:"nodeSubnetId"`

	/* service子网的id (Optional) */
	ServiceSubnetId string `json:"serviceSubnetId"`

	/* service关联LB的具有公网访问能力的子网id (Optional) */
	ServicePublicSubnetId string `json:"servicePublicSubnetId"`

	/* node的cidr (Optional) */
	NodeNetworkCidr string `json:"nodeNetworkCidr"`

	/* vpc id (Optional) */
	VpcId string `json:"vpcId"`
}

type NodeVersion

type NodeVersion struct {

	/* 节点版本号 (Optional) */
	Version string `json:"version"`

	/* 镜像操作系统 (Optional) */
	ImageOs string `json:"imageOs"`

	/* 版本状态 (Optional) */
	VersionStatus string `json:"versionStatus"`
}

type Quota

type Quota struct {

	/* 资源类型[kubernetes] (Optional) */
	ResourceType string `json:"resourceType"`

	/* 可用资源上限 (Optional) */
	Limit int `json:"limit"`

	/* 已用资源数量 (Optional) */
	Used int `json:"used"`
}

type ServerConfig

type ServerConfig struct {

	/* kubernetes master 的支持版本 (Optional) */
	ValidMasterVersions []string `json:"validMasterVersions"`

	/* kubernetes master 的默认版本 (Optional) */
	DefaultMasterVersion string `json:"defaultMasterVersion"`

	/* node 节点的配置 (Optional) */
	ValidNodeConfig []ValidNodeConfig `json:"validNodeConfig"`
}

type Tag added in v1.8.0

type Tag struct {

	/* Tag键 (Optional) */
	Key string `json:"key"`

	/* Tag值 (Optional) */
	Value string `json:"value"`
}

type TagFilter added in v1.8.0

type TagFilter struct {

	/* Tag键 (Optional) */
	Key *string `json:"key"`

	/* Tag值 (Optional) */
	Values []string `json:"values"`
}

type ValidNodeConfig

type ValidNodeConfig struct {

	/* kubernetes node 的版本 (Optional) */
	NodeVersion string `json:"nodeVersion"`

	/* 镜像id (Optional) */
	ImageId []string `json:"imageId"`
}

Jump to

Keyboard shortcuts

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