Skip to content

Commit 07f1fbe

Browse files
committed
NodeUID in status to detect replaced node with same name
1 parent 589eff0 commit 07f1fbe

26 files changed

Lines changed: 151 additions & 0 deletions

openapi/generated_openapi/zz_generated.openapi.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46737,6 +46737,10 @@
4673746737
"type": "string",
4673846738
"default": ""
4673946739
},
46740+
"nodeUID": {
46741+
"description": "nodeUID is the UID of the node. This field is used to detect that a node has been deleted and recreated with the same name. When the UID changes, it indicates the node is a new instance and the status should be reset.",
46742+
"type": "string"
46743+
},
4674046744
"targetRevision": {
4674146745
"description": "targetRevision is the generation of the deployment we're trying to apply. Can not be set on creation of a nodeStatus.",
4674246746
"type": "integer",

operator/v1/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package v1
33
import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
55
"k8s.io/apimachinery/pkg/runtime"
6+
"k8s.io/apimachinery/pkg/types"
67
)
78

89
// MyOperatorResource is an example operator configuration type
@@ -266,6 +267,12 @@ type NodeStatus struct {
266267
// +required
267268
NodeName string `json:"nodeName"`
268269

270+
// nodeUID is the UID of the node.
271+
// This field is used to detect that a node has been deleted and recreated with the same name.
272+
// When the UID changes, it indicates the node is a new instance and the status should be reset.
273+
// +optional
274+
NodeUID types.UID `json:"nodeUID,omitempty"`
275+
269276
// currentRevision is the generation of the most recently successful deployment.
270277
// Can not be set on creation of a nodeStatus. Updates must only increase the value.
271278
// +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase"

operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-CustomNoUpgrade.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ spec:
292292
nodeName:
293293
description: nodeName is the name of the node
294294
type: string
295+
nodeUID:
296+
description: |-
297+
nodeUID is the UID of the node.
298+
This field is used to detect that a node has been deleted and recreated with the same name.
299+
When the UID changes, it indicates the node is a new instance and the status should be reset.
300+
type: string
295301
targetRevision:
296302
description: |-
297303
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-Default.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ spec:
279279
nodeName:
280280
description: nodeName is the name of the node
281281
type: string
282+
nodeUID:
283+
description: |-
284+
nodeUID is the UID of the node.
285+
This field is used to detect that a node has been deleted and recreated with the same name.
286+
When the UID changes, it indicates the node is a new instance and the status should be reset.
287+
type: string
282288
targetRevision:
283289
description: |-
284290
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-DevPreviewNoUpgrade.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ spec:
292292
nodeName:
293293
description: nodeName is the name of the node
294294
type: string
295+
nodeUID:
296+
description: |-
297+
nodeUID is the UID of the node.
298+
This field is used to detect that a node has been deleted and recreated with the same name.
299+
When the UID changes, it indicates the node is a new instance and the status should be reset.
300+
type: string
295301
targetRevision:
296302
description: |-
297303
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-OKD.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ spec:
279279
nodeName:
280280
description: nodeName is the name of the node
281281
type: string
282+
nodeUID:
283+
description: |-
284+
nodeUID is the UID of the node.
285+
This field is used to detect that a node has been deleted and recreated with the same name.
286+
When the UID changes, it indicates the node is a new instance and the status should be reset.
287+
type: string
282288
targetRevision:
283289
description: |-
284290
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-TechPreviewNoUpgrade.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ spec:
292292
nodeName:
293293
description: nodeName is the name of the node
294294
type: string
295+
nodeUID:
296+
description: |-
297+
nodeUID is the UID of the node.
298+
This field is used to detect that a node has been deleted and recreated with the same name.
299+
When the UID changes, it indicates the node is a new instance and the status should be reset.
300+
type: string
295301
targetRevision:
296302
description: |-
297303
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ spec:
275275
nodeName:
276276
description: nodeName is the name of the node
277277
type: string
278+
nodeUID:
279+
description: |-
280+
nodeUID is the UID of the node.
281+
This field is used to detect that a node has been deleted and recreated with the same name.
282+
When the UID changes, it indicates the node is a new instance and the status should be reset.
283+
type: string
278284
targetRevision:
279285
description: |-
280286
targetRevision is the generation of the deployment we're trying to apply.

operator/v1/zz_generated.crd-manifests/0000_25_kube-controller-manager_01_kubecontrollermanagers.crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ spec:
270270
nodeName:
271271
description: nodeName is the name of the node
272272
type: string
273+
nodeUID:
274+
description: |-
275+
nodeUID is the UID of the node.
276+
This field is used to detect that a node has been deleted and recreated with the same name.
277+
When the UID changes, it indicates the node is a new instance and the status should be reset.
278+
type: string
273279
targetRevision:
274280
description: |-
275281
targetRevision is the generation of the deployment we're trying to apply.

0 commit comments

Comments
 (0)