Skip to content

Commit 5f17a92

Browse files
committed
chore: sync config/*.go and values.schema.json to vCluster version v0.27.0
1 parent 361c713 commit 5f17a92

File tree

3 files changed

+1
-434
lines changed

3 files changed

+1
-434
lines changed

config/config.go

Lines changed: 0 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ type PrivateNodes struct {
101101
// Enabled defines if dedicated nodes should be enabled.
102102
Enabled bool `json:"enabled,omitempty"`
103103

104-
// ImportNodeBinaries defines to use the loft-sh/kubernetes:VERSION-full image to also copy the node binaries to the control plane. This allows upgrades and
105-
// joining new nodes into the cluster without having to download the binaries from the internet.
106-
ImportNodeBinaries bool `json:"importNodeBinaries,omitempty"`
107-
108104
// Kubelet holds kubelet configuration that is used for all nodes.
109105
Kubelet Kubelet `json:"kubelet,omitempty"`
110106

@@ -113,163 +109,6 @@ type PrivateNodes struct {
113109

114110
// JoinNode holds configuration specifically used during joining the node (see "kubeadm join").
115111
JoinNode JoinConfiguration `json:"joinNode,omitempty"`
116-
117-
// NodePools stores karpenter node pool configuration
118-
NodePools PrivateNodesNodePools `json:"nodePools,omitempty"`
119-
120-
// Tunnel holds configuration for the private nodes tunnel. This can be used to connect the private nodes to the control plane or
121-
// connect the private nodes to each other if they are not running in the same network. Platform connection is required for the tunnel to work.
122-
Tunnel PrivateNodesTunnel `json:"tunnel,omitempty"`
123-
}
124-
125-
type PrivateNodesTunnel struct {
126-
// Enabled defines if the private nodes tunnel should be enabled.
127-
Enabled bool `json:"enabled,omitempty"`
128-
129-
// NodeToNode holds configuration for the node to node tunnel. This can be used to connect the private nodes to each other if they are not running in the same network.
130-
NodeToNode PrivateNodesTunnelNodeToNode `json:"nodeToNode,omitempty"`
131-
}
132-
133-
type PrivateNodesTunnelNodeToNode struct {
134-
// Enabled defines if the node to node tunnel should be enabled.
135-
Enabled bool `json:"enabled,omitempty"`
136-
}
137-
138-
// PrivateNodesNodePools defines node pools
139-
type PrivateNodesNodePools struct {
140-
// Static defines static node pools. Static node pools have a fixed size and are not scaled automatically.
141-
Static []StaticNodePool `json:"static,omitempty"`
142-
143-
// Dynamic defines dynamic node pools. Dynamic node pools are scaled automatically based on the requirements within the cluster.
144-
// Karpenter is used under the hood to handle the scheduling of the nodes.
145-
Dynamic []DynamicNodePool `json:"dynamic,omitempty"`
146-
}
147-
148-
type DynamicNodePool struct {
149-
// Name is the name of this NodePool
150-
Name string `json:"name" jsonschema:"required"`
151-
152-
// Requirements filter the types of nodes that can be provisioned by this pool.
153-
// All requirements must be met for a node type to be eligible.
154-
Requirements []Requirement `json:"requirements,omitempty"`
155-
156-
// Taints are the taints to apply to the nodes in this pool.
157-
Taints []KubeletJoinTaint `json:"taints,omitempty"`
158-
159-
// NodeLabels are the labels to apply to the nodes in this pool.
160-
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
161-
162-
// Limits specify the maximum resources that can be provisioned by this node pool,
163-
// mapping to the 'limits' field in Karpenter's NodePool API.
164-
Limits map[string]string `json:"limits,omitempty"`
165-
166-
// Disruption contains the parameters that relate to Karpenter's disruption logic
167-
Disruption DynamicNodePoolDisruption `json:"disruption,omitempty"`
168-
169-
// TerminationGracePeriod is the maximum duration the controller will wait before forcefully deleting the pods on a node, measured from when deletion is first initiated.
170-
//
171-
// Warning: this feature takes precedence over a Pod's terminationGracePeriodSeconds value, and bypasses any blocked PDBs or the karpenter.sh/do-not-disrupt annotation.
172-
//
173-
// This field is intended to be used by cluster administrators to enforce that nodes can be cycled within a given time period.
174-
// When set, drifted nodes will begin draining even if there are pods blocking eviction. Draining will respect PDBs and the do-not-disrupt annotation until the TGP is reached.
175-
//
176-
// Karpenter will preemptively delete pods so their terminationGracePeriodSeconds align with the node's terminationGracePeriod.
177-
// If a pod would be terminated without being granted its full terminationGracePeriodSeconds prior to the node timeout,
178-
// that pod will be deleted at T = node timeout - pod terminationGracePeriodSeconds.
179-
//
180-
// The feature can also be used to allow maximum time limits for long-running jobs which can delay node termination with preStop hooks.
181-
// Defaults to 30s. Set to Never to wait indefinitely for pods to be drained.
182-
TerminationGracePeriod string `json:"terminationGracePeriod,omitempty"`
183-
184-
// The amount of time a Node can live on the cluster before being removed
185-
ExpireAfter string `json:"expireAfter,omitempty"`
186-
187-
// Weight is the weight of this node pool.
188-
Weight int `json:"weight,omitempty"`
189-
}
190-
191-
type DynamicNodePoolDisruption struct {
192-
// ConsolidateAfter is the duration the controller will wait
193-
// before attempting to terminate nodes that are underutilized.
194-
// Refer to ConsolidationPolicy for how underutilization is considered.
195-
ConsolidateAfter string `json:"consolidateAfter,omitempty"`
196-
197-
// ConsolidationPolicy describes which nodes Karpenter can disrupt through its consolidation
198-
// algorithm. This policy defaults to "WhenEmptyOrUnderutilized" if not specified
199-
ConsolidationPolicy string `json:"consolidationPolicy,omitempty"`
200-
201-
// Budgets is a list of Budgets.
202-
// If there are multiple active budgets, Karpenter uses
203-
// the most restrictive value. If left undefined,
204-
// this will default to one budget with a value to 10%.
205-
Budgets []DynamicNodePoolDisruptionBudget `json:"budgets,omitempty"`
206-
}
207-
type DynamicNodePoolDisruptionBudget struct {
208-
// Nodes dictates the maximum number of NodeClaims owned by this NodePool
209-
// that can be terminating at once. This is calculated by counting nodes that
210-
// have a deletion timestamp set, or are actively being deleted by Karpenter.
211-
// This field is required when specifying a budget.
212-
Nodes string `json:"nodes,omitempty"`
213-
214-
// Schedule specifies when a budget begins being active, following
215-
// the upstream cronjob syntax. If omitted, the budget is always active.
216-
// Timezones are not supported.
217-
Schedule string `json:"schedule,omitempty"`
218-
219-
// Duration determines how long a Budget is active since each Schedule hit.
220-
// Only minutes and hours are accepted, as cron does not work in seconds.
221-
// If omitted, the budget is always active.
222-
// This is required if Schedule is set.
223-
Duration string `json:"duration,omitempty"`
224-
}
225-
226-
type StaticNodePool struct {
227-
// Name is the name of this static nodePool
228-
Name string `json:"name" jsonschema:"required"`
229-
230-
// Requirements filter the types of nodes that can be provisioned by this pool.
231-
// All requirements must be met for a node type to be eligible.
232-
Requirements []Requirement `json:"requirements,omitempty"`
233-
234-
// Taints are the taints to apply to the nodes in this pool.
235-
Taints []KubeletJoinTaint `json:"taints,omitempty"`
236-
237-
// NodeLabels are the labels to apply to the nodes in this pool.
238-
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
239-
240-
// TerminationGracePeriod is the maximum duration the controller will wait before forcefully deleting the pods on a node, measured from when deletion is first initiated.
241-
//
242-
// Warning: this feature takes precedence over a Pod's terminationGracePeriodSeconds value, and bypasses any blocked PDBs or the karpenter.sh/do-not-disrupt annotation.
243-
//
244-
// This field is intended to be used by cluster administrators to enforce that nodes can be cycled within a given time period.
245-
// When set, drifted nodes will begin draining even if there are pods blocking eviction. Draining will respect PDBs and the do-not-disrupt annotation until the TGP is reached.
246-
//
247-
// Karpenter will preemptively delete pods so their terminationGracePeriodSeconds align with the node's terminationGracePeriod.
248-
// If a pod would be terminated without being granted its full terminationGracePeriodSeconds prior to the node timeout,
249-
// that pod will be deleted at T = node timeout - pod terminationGracePeriodSeconds.
250-
//
251-
// The feature can also be used to allow maximum time limits for long-running jobs which can delay node termination with preStop hooks.
252-
// Defaults to 30s. Set to Never to wait indefinitely for pods to be drained.
253-
TerminationGracePeriod string `json:"terminationGracePeriod,omitempty"`
254-
255-
// Quantity is the number of desired nodes in this pool.
256-
Quantity int `json:"quantity" jsonschema:"required"`
257-
}
258-
259-
// KarpenterRequirement defines a scheduling requirement for a dynamic node pool.
260-
// It corresponds to an entry in the 'requirements' list of a Karpenter NodePool.
261-
type Requirement struct {
262-
// Property is the property on the node type to select.
263-
Property string `json:"property" jsonschema:"required"`
264-
265-
// Operator is the comparison operator, such as "In", "NotIn", "Exists". If empty, defaults to "In".
266-
Operator string `json:"operator,omitempty"`
267-
268-
// Values is the list of values to use for comparison. This is mutually exclusive with value.
269-
Values []string `json:"values,omitempty"`
270-
271-
// Value is the value to use for comparison. This is mutually exclusive with values.
272-
Value string `json:"value,omitempty"`
273112
}
274113

275114
type Deploy struct {
@@ -344,22 +183,10 @@ type Standalone struct {
344183
// Bundle is a path to a Kubernetes bundle to use for the standalone mode. If empty, will use the bundleRepository to download the bundle.
345184
Bundle string `json:"bundle,omitempty"`
346185

347-
// Nodes is a list of nodes to deploy for standalone mode.
348-
Nodes StandaloneNodes `json:"nodes,omitempty"`
349-
350186
// JoinNode holds configuration for the standalone control plane node.
351187
JoinNode StandaloneJoinNode `json:"joinNode,omitempty"`
352188
}
353189

354-
type StandaloneNodes struct {
355-
// Quantity is the number of nodes to deploy for standalone mode.
356-
Quantity int `json:"quantity,omitempty"`
357-
358-
// Requirements filter the types of nodes that can be provisioned by this pool.
359-
// All requirements must be met for a node type to be eligible.
360-
Requirements []Requirement `json:"requirements,omitempty"`
361-
}
362-
363190
type StandaloneSyncConfig struct {
364191
// Enabled defines if config syncing should be enabled.
365192
Enabled bool `json:"enabled,omitempty"`
@@ -538,9 +365,6 @@ type AutoUpgrade struct {
538365
// NodeSelector is the node selector for the auto upgrade. If empty will select all worker nodes.
539366
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
540367

541-
// BundleRepository is the repository to use for downloading the Kubernetes bundle. Defaults to https://github.com/loft-sh/kubernetes/releases/download
542-
BundleRepository string `json:"bundleRepository,omitempty"`
543-
544368
// BinariesPath is the base path for the kubeadm binaries. Defaults to /usr/local/bin
545369
BinariesPath string `json:"binariesPath,omitempty"`
546370

config/values.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ controlPlane:
432432

433433
privateNodes:
434434
enabled: false
435-
importNodeBinaries: true
436435
kubelet:
437436
config: {}
438437
autoUpgrade:
@@ -441,13 +440,7 @@ privateNodes:
441440
joinNode:
442441
containerd:
443442
enabled: true
444-
nodePools:
445-
static: []
446-
dynamic: []
447-
tunnel:
448-
enabled: false
449-
nodeToNode:
450-
enabled: false
443+
451444
deploy:
452445
localPathProvisioner:
453446
enabled: true

0 commit comments

Comments
 (0)