Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions management-engine/controllers/nvkecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ func (r *NVKEClusterReconciler) ensureCluster(ctx context.Context, cluster *inte
if update == (api.UpdateClusterRequest{}) {
return observedCluster, nil
}
// Recycling is initialized only on creation. Keep the
// existing gate even when a control-plane update requires replacement.
updatedCluster, err := r.NVKEController.Update(ctx, observedCluster.ID.String(), update)
if err != nil {
return observedCluster, fmt.Errorf("update nvke controller cluster %q: %w", name, err)
Expand Down Expand Up @@ -880,6 +882,7 @@ func (r *NVKEClusterReconciler) resolveNVKEControllerRequest(ctx context.Context

request.CniPlugin = api.CreateClusterRequestCniPluginOvnKubernetes
request.EtcdEncrypted = true
request.EnableCPNodeRecycling = new(true)
request.ControlPlaneKubernetesVersion = kubernetesVersion
if endpoint := cluster.Spec.APIServerEndpoint; endpoint != nil {
request.ControlPlaneVIP = endpoint.Address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ clusters:
systemReservedMemory: 1Gi
controlPlaneKubernetesVersion: 1.36.1
createdAt: "0001-01-01T00:00:00Z"
enableCPNodeRecycling: true
etcdEncrypted: true
id: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
infra:
Expand Down Expand Up @@ -82,6 +83,7 @@ requests:
provisioningMonitorDisabled: false
systemReservedMemory: 1Gi
controlPlaneKubernetesVersion: 1.36.1
enableCPNodeRecycling: true
etcdEncrypted: true
infra:
cluster:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
clusters:
- cniPlugin: ovn-kubernetes
cniVersion: ""
conditions:
deleting:
lastTransitionTime: "0001-01-01T00:00:00Z"
message: ""
status: "False"
provisioned:
lastTransitionTime: "0001-01-01T00:00:00Z"
message: ""
status: "True"
provisioning:
lastTransitionTime: "0001-01-01T00:00:00Z"
message: ""
status: "False"
controlPlaneConfig:
configurationId: 00000000-0000-0000-0000-000000000000
desiredCount: 1
infra:
bootstrapFiles:
- content: first-release
path: /etc/nvke-release
machineTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: NicoMachineTemplate
spec:
template:
spec:
instanceTypeID: 33333333-3333-4333-8333-333333333333
interfaces:
- subnetID: 44444444-4444-4444-8444-444444444444
ipxeScript: |-
#!ipxe
chain https://images.example.com/nvke/boot.ipxe
vpcID: 22222222-2222-4222-8222-222222222222
preKubeadmCommands:
- echo first-release
maxSurge: 1
provisioningMonitorDisabled: false
systemReservedMemory: 1Gi
controlPlaneKubernetesVersion: 1.34.4
createdAt: "0001-01-01T00:00:00Z"
enableCPNodeRecycling: false
etcdEncrypted: true
id: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
infra:
cluster:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: NicoCluster
spec:
siteID: 11111111-1111-4111-8111-111111111111
name: cluster-1-34bd578c-mgmt-eng
network:
podCIDR: 10.244.0.0/16
serviceCIDR: 10.96.0.0/12
nodePools: []
requests: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
items:
- apiVersion: service.nvke.nvidia.com/v1
kind: NVKECluster
metadata:
creationTimestamp: null
finalizers:
- service.nvke.nvidia.com/cluster-cleanup
generation: 1
name: cluster-1
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.244.0.0/16
services:
cidrBlocks:
- 10.96.0.0/12
controlPlaneClass: standard
network:
vpcID: 22222222-2222-4222-8222-222222222222
release:
channel:
name: pinned
version: 1.34.4.12312312
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Available
status: "True"
type: Available
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: ReconcileSucceeded
status: "True"
type: ClusterReconciled
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Ready
status: "True"
type: ControlPlaneReady
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: NotDeleting
status: "False"
type: Deleting
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: NotYetReported
status: Unknown
type: NVKEControllerCPNodesRecycling
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: NotYetReported
status: Unknown
type: NVKEControllerControlPlaneUpgrading
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Reported
status: "False"
type: NVKEControllerDeleting
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Reported
status: "True"
type: NVKEControllerProvisioned
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Reported
status: "False"
type: NVKEControllerProvisioning
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: NotYetReported
status: Unknown
type: NVKEControllerUpdateFailed
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: ReconcileSucceeded
status: "True"
type: NodePoolsReconciled
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Ready
status: "True"
type: Ready
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Selected ClusterRelease "first-release" is supported
observedGeneration: 1
reason: ReleaseSupported
status: "True"
type: ReleaseSupported
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: ""
observedGeneration: 1
reason: Synced
status: "True"
type: Synced
currentRelease:
name: first-release
version: 1.34.4
id: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
observedGeneration: 1
metadata: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: service.nvke.nvidia.com/v1
kind: MachineImage
metadata:
name: test-image
spec:
operatingSystem:
family: ubuntu
version: "24.04"
architecture: amd64
buildDate: "2026-10-01"
nico:
ipxeScript: |
#!ipxe
chain https://images.example.com/nvke/boot.ipxe
---
apiVersion: service.nvke.nvidia.com/v1
kind: ClusterReleaseChannel
metadata:
name: pinned
spec:
releases:
"1.34.4.12312312":
- name: first-release
minimumUpgradeAge: 0s
"1.34.4.12312313":
- name: second-release
minimumUpgradeAge: 0s
---
apiVersion: service.nvke.nvidia.com/v1
kind: ClusterRelease
metadata:
name: first-release
spec:
kubernetes:
version: "1.34.4"
machineImageRef:
name: test-image
machineInit:
userDataTemplate: |
#cloud-config
infra:
bootstrapFiles:
- path: /etc/nvke-release
content: first-release
preKubeadmCommands:
- echo first-release
---
apiVersion: service.nvke.nvidia.com/v1
kind: ClusterRelease
metadata:
name: second-release
spec:
kubernetes:
version: "1.34.4"
machineImageRef:
name: test-image
machineInit:
userDataTemplate: |
#cloud-config
infra:
bootstrapFiles:
- path: /etc/nvke-release
content: second-release
preKubeadmCommands:
- echo second-release
---
apiVersion: v1
kind: ConfigMap
metadata:
name: infra-template
namespace: default
data:
clusterTmpl: |
{
"cluster": {
"apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha1",
"kind": "NicoCluster",
"spec": {
"siteID": "11111111-1111-4111-8111-111111111111"
}
}
}
controlplaneTmpl: &machineTemplate |
{
"bootstrapFiles": {{ .BootstrapFilesJSON }},
"preKubeadmCommands": {{ .PreKubeadmCommandsJSON }},
"machineTemplate": {
"apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha1",
"kind": "NicoMachineTemplate",
"spec": {
"template": {
"spec": {
"vpcID": "{{ .VPCID }}",
"instanceTypeID": "{{ .InstanceType }}",
"interfaces": [
{"subnetID": "44444444-4444-4444-8444-444444444444"}
],
"ipxeScript": {{ .IPXEScript }}
}
}
}
}
}
nodepoolTmpl: *machineTemplate
---
apiVersion: service.nvke.nvidia.com/v1
kind: ControlPlaneClass
metadata:
name: standard
spec:
controlPlane:
replicas: 1
instanceTypePreferences:
- 33333333-3333-4333-8333-333333333333
systemReservedMemory: 1Gi
rollout:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
---
apiVersion: service.nvke.nvidia.com/v1
kind: NVKECluster
metadata:
name: cluster-1
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.244.0.0/16
services:
cidrBlocks:
- 10.96.0.0/12
release:
channel:
name: pinned
version: "1.34.4.12312312"
controlPlaneClass: standard
network:
vpcID: 22222222-2222-4222-8222-222222222222
Loading
Loading