mirror of
https://github.com/rancher/types.git
synced 2025-07-30 20:44:34 +00:00
types for req and limits
This commit is contained in:
parent
6b16d10452
commit
f0339d2dc0
@ -55,6 +55,8 @@ type ClusterStatus struct {
|
||||
Capacity v1.ResourceList `json:"capacity,omitempty"`
|
||||
Allocatable v1.ResourceList `json:"allocatable,omitempty"`
|
||||
AppliedSpec ClusterSpec `json:"appliedSpec,omitempty"`
|
||||
Requested v1.ResourceList `json:"requested,omitempty"`
|
||||
Limits v1.ResourceList `json:"limits,omitempty"`
|
||||
}
|
||||
|
||||
type ClusterComponentStatus struct {
|
||||
@ -214,13 +216,27 @@ type AuthConfig struct {
|
||||
// Authentication options
|
||||
Options map[string]string `yaml:"options" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type ClusterNode struct {
|
||||
v1.Node
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object’s metadata. More info:
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the cluster node. More info:
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
|
||||
v1.NodeSpec `json:"spec,omitempty"`
|
||||
// Most recent observed status of the cluster. More info:
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
|
||||
Status ClusterNodeStatus `json:"status"`
|
||||
NodeName string
|
||||
ClusterName string
|
||||
}
|
||||
|
||||
type ClusterNodeStatus struct {
|
||||
v1.NodeStatus
|
||||
Requested v1.ResourceList `json:"requested,omitempty"`
|
||||
Limits v1.ResourceList `json:"limits,omitempty"`
|
||||
}
|
||||
|
||||
type MachineTemplate struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object’s metadata. More info:
|
||||
|
@ -202,7 +202,10 @@ func (in *ClusterList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterNode) DeepCopyInto(out *ClusterNode) {
|
||||
*out = *in
|
||||
in.Node.DeepCopyInto(&out.Node)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.NodeSpec.DeepCopyInto(&out.NodeSpec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
@ -259,6 +262,37 @@ func (in *ClusterNodeList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterNodeStatus) DeepCopyInto(out *ClusterNodeStatus) {
|
||||
*out = *in
|
||||
in.NodeStatus.DeepCopyInto(&out.NodeStatus)
|
||||
if in.Requested != nil {
|
||||
in, out := &in.Requested, &out.Requested
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeStatus.
|
||||
func (in *ClusterNodeStatus) DeepCopy() *ClusterNodeStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterNodeStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
*out = *in
|
||||
@ -332,6 +366,20 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
}
|
||||
}
|
||||
in.AppliedSpec.DeepCopyInto(&out.AppliedSpec)
|
||||
if in.Requested != nil {
|
||||
in, out := &in.Requested, &out.Requested
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -30,26 +30,26 @@ const (
|
||||
|
||||
type ClusterNode struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
ClusterName string `json:"clusterName,omitempty"`
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NodeName string `json:"nodeName,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
PodCIDR string `json:"podCIDR,omitempty"`
|
||||
ProviderID string `json:"providerID,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *NodeStatus `json:"status,omitempty"`
|
||||
Taints []Taint `json:"taints,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Unschedulable *bool `json:"unschedulable,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
ClusterName string `json:"clusterName,omitempty"`
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NodeName string `json:"nodeName,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
PodCIDR string `json:"podCIDR,omitempty"`
|
||||
ProviderID string `json:"providerID,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *ClusterNodeStatus `json:"status,omitempty"`
|
||||
Taints []Taint `json:"taints,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Unschedulable *bool `json:"unschedulable,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type ClusterNodeCollection struct {
|
||||
types.Collection
|
||||
|
32
client/cluster/v1/zz_generated_cluster_node_status.go
Normal file
32
client/cluster/v1/zz_generated_cluster_node_status.go
Normal file
@ -0,0 +1,32 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ClusterNodeStatusType = "clusterNodeStatus"
|
||||
ClusterNodeStatusFieldAddresses = "addresses"
|
||||
ClusterNodeStatusFieldAllocatable = "allocatable"
|
||||
ClusterNodeStatusFieldCapacity = "capacity"
|
||||
ClusterNodeStatusFieldConditions = "conditions"
|
||||
ClusterNodeStatusFieldDaemonEndpoints = "daemonEndpoints"
|
||||
ClusterNodeStatusFieldImages = "images"
|
||||
ClusterNodeStatusFieldLimits = "limits"
|
||||
ClusterNodeStatusFieldNodeInfo = "nodeInfo"
|
||||
ClusterNodeStatusFieldPhase = "phase"
|
||||
ClusterNodeStatusFieldRequested = "requested"
|
||||
ClusterNodeStatusFieldVolumesAttached = "volumesAttached"
|
||||
ClusterNodeStatusFieldVolumesInUse = "volumesInUse"
|
||||
)
|
||||
|
||||
type ClusterNodeStatus struct {
|
||||
Addresses []NodeAddress `json:"addresses,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
Conditions []NodeCondition `json:"conditions,omitempty"`
|
||||
DaemonEndpoints *NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
|
||||
Images []ContainerImage `json:"images,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
NodeInfo *NodeSystemInfo `json:"nodeInfo,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty"`
|
||||
VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"`
|
||||
VolumesInUse []string `json:"volumesInUse,omitempty"`
|
||||
}
|
@ -9,6 +9,8 @@ const (
|
||||
ClusterStatusFieldCapacity = "capacity"
|
||||
ClusterStatusFieldComponentStatuses = "componentStatuses"
|
||||
ClusterStatusFieldConditions = "conditions"
|
||||
ClusterStatusFieldLimits = "limits"
|
||||
ClusterStatusFieldRequested = "requested"
|
||||
ClusterStatusFieldServiceAccountToken = "serviceAccountToken"
|
||||
)
|
||||
|
||||
@ -20,5 +22,7 @@ type ClusterStatus struct {
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
|
||||
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty"`
|
||||
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NodeStatusType = "nodeStatus"
|
||||
NodeStatusFieldAddresses = "addresses"
|
||||
NodeStatusFieldAllocatable = "allocatable"
|
||||
NodeStatusFieldCapacity = "capacity"
|
||||
NodeStatusFieldConditions = "conditions"
|
||||
NodeStatusFieldDaemonEndpoints = "daemonEndpoints"
|
||||
NodeStatusFieldImages = "images"
|
||||
NodeStatusFieldNodeInfo = "nodeInfo"
|
||||
NodeStatusFieldPhase = "phase"
|
||||
NodeStatusFieldVolumesAttached = "volumesAttached"
|
||||
NodeStatusFieldVolumesInUse = "volumesInUse"
|
||||
)
|
||||
|
||||
type NodeStatus struct {
|
||||
Addresses []NodeAddress `json:"addresses,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
Conditions []NodeCondition `json:"conditions,omitempty"`
|
||||
DaemonEndpoints *NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
|
||||
Images []ContainerImage `json:"images,omitempty"`
|
||||
NodeInfo *NodeSystemInfo `json:"nodeInfo,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"`
|
||||
VolumesInUse []string `json:"volumesInUse,omitempty"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user