mirror of
https://github.com/rancher/types.git
synced 2025-08-27 08:18:24 +00:00
Add DeleteNotReadyAfterSecs to nodepool spec
This enables deleting nodes after they have been unreachable for a configurable amount of time
This commit is contained in:
parent
fa18f1e035
commit
a875317c20
@ -1,6 +1,8 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/rancher/norman/condition"
|
||||
"github.com/rancher/norman/types"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@ -152,6 +154,8 @@ type NodePoolSpec struct {
|
||||
|
||||
DisplayName string `json:"displayName"`
|
||||
ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster],noupdate,required"`
|
||||
|
||||
DeleteNotReadyAfterSecs time.Duration `json:"deleteNotReadyAfterSecs" norman:"default=0"`
|
||||
}
|
||||
|
||||
type NodePoolStatus struct {
|
||||
|
@ -5,57 +5,59 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
NodePoolType = "nodePool"
|
||||
NodePoolFieldAnnotations = "annotations"
|
||||
NodePoolFieldClusterID = "clusterId"
|
||||
NodePoolFieldControlPlane = "controlPlane"
|
||||
NodePoolFieldCreated = "created"
|
||||
NodePoolFieldCreatorID = "creatorId"
|
||||
NodePoolFieldDisplayName = "displayName"
|
||||
NodePoolFieldEtcd = "etcd"
|
||||
NodePoolFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolFieldLabels = "labels"
|
||||
NodePoolFieldName = "name"
|
||||
NodePoolFieldNamespaceId = "namespaceId"
|
||||
NodePoolFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolFieldNodeLabels = "nodeLabels"
|
||||
NodePoolFieldNodeTemplateID = "nodeTemplateId"
|
||||
NodePoolFieldOwnerReferences = "ownerReferences"
|
||||
NodePoolFieldQuantity = "quantity"
|
||||
NodePoolFieldRemoved = "removed"
|
||||
NodePoolFieldState = "state"
|
||||
NodePoolFieldStatus = "status"
|
||||
NodePoolFieldTransitioning = "transitioning"
|
||||
NodePoolFieldTransitioningMessage = "transitioningMessage"
|
||||
NodePoolFieldUUID = "uuid"
|
||||
NodePoolFieldWorker = "worker"
|
||||
NodePoolType = "nodePool"
|
||||
NodePoolFieldAnnotations = "annotations"
|
||||
NodePoolFieldClusterID = "clusterId"
|
||||
NodePoolFieldControlPlane = "controlPlane"
|
||||
NodePoolFieldCreated = "created"
|
||||
NodePoolFieldCreatorID = "creatorId"
|
||||
NodePoolFieldDeleteNotReadyAfterSecs = "deleteNotReadyAfterSecs"
|
||||
NodePoolFieldDisplayName = "displayName"
|
||||
NodePoolFieldEtcd = "etcd"
|
||||
NodePoolFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolFieldLabels = "labels"
|
||||
NodePoolFieldName = "name"
|
||||
NodePoolFieldNamespaceId = "namespaceId"
|
||||
NodePoolFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolFieldNodeLabels = "nodeLabels"
|
||||
NodePoolFieldNodeTemplateID = "nodeTemplateId"
|
||||
NodePoolFieldOwnerReferences = "ownerReferences"
|
||||
NodePoolFieldQuantity = "quantity"
|
||||
NodePoolFieldRemoved = "removed"
|
||||
NodePoolFieldState = "state"
|
||||
NodePoolFieldStatus = "status"
|
||||
NodePoolFieldTransitioning = "transitioning"
|
||||
NodePoolFieldTransitioningMessage = "transitioningMessage"
|
||||
NodePoolFieldUUID = "uuid"
|
||||
NodePoolFieldWorker = "worker"
|
||||
)
|
||||
|
||||
type NodePool struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"`
|
||||
NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Status *NodePoolStatus `json:"status,omitempty" yaml:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
DeleteNotReadyAfterSecs int64 `json:"deleteNotReadyAfterSecs,omitempty" yaml:"deleteNotReadyAfterSecs,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"`
|
||||
NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Status *NodePoolStatus `json:"status,omitempty" yaml:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"`
|
||||
}
|
||||
|
||||
type NodePoolCollection struct {
|
||||
|
@ -1,28 +1,30 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NodePoolSpecType = "nodePoolSpec"
|
||||
NodePoolSpecFieldClusterID = "clusterId"
|
||||
NodePoolSpecFieldControlPlane = "controlPlane"
|
||||
NodePoolSpecFieldDisplayName = "displayName"
|
||||
NodePoolSpecFieldEtcd = "etcd"
|
||||
NodePoolSpecFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolSpecFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolSpecFieldNodeLabels = "nodeLabels"
|
||||
NodePoolSpecFieldNodeTemplateID = "nodeTemplateId"
|
||||
NodePoolSpecFieldQuantity = "quantity"
|
||||
NodePoolSpecFieldWorker = "worker"
|
||||
NodePoolSpecType = "nodePoolSpec"
|
||||
NodePoolSpecFieldClusterID = "clusterId"
|
||||
NodePoolSpecFieldControlPlane = "controlPlane"
|
||||
NodePoolSpecFieldDeleteNotReadyAfterSecs = "deleteNotReadyAfterSecs"
|
||||
NodePoolSpecFieldDisplayName = "displayName"
|
||||
NodePoolSpecFieldEtcd = "etcd"
|
||||
NodePoolSpecFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolSpecFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolSpecFieldNodeLabels = "nodeLabels"
|
||||
NodePoolSpecFieldNodeTemplateID = "nodeTemplateId"
|
||||
NodePoolSpecFieldQuantity = "quantity"
|
||||
NodePoolSpecFieldWorker = "worker"
|
||||
)
|
||||
|
||||
type NodePoolSpec struct {
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"`
|
||||
NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"`
|
||||
Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"`
|
||||
Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"`
|
||||
DeleteNotReadyAfterSecs int64 `json:"deleteNotReadyAfterSecs,omitempty" yaml:"deleteNotReadyAfterSecs,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"`
|
||||
NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"`
|
||||
Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"`
|
||||
Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user