Skip to content

Commit 44e754a

Browse files
tombstone unneeded field and type in v1alpha1 api for MCN
1 parent 4521905 commit 44e754a

13 files changed

+22
-363
lines changed

Diff for: machineconfiguration/v1alpha1/tests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml

-41
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,6 @@ tests:
8080
node:
8181
name: foobar
8282
expectedError: "spec.configVersion: Required value, <nil>: Invalid value: \"null\""
83-
- name: Should be able to create a MachineConfigNode with a PinnedImageSet
84-
initial: |
85-
apiVersion: machineconfiguration.openshift.io/v1alpha1
86-
kind: MachineConfigNode
87-
metadata:
88-
name: foobar
89-
spec:
90-
node:
91-
name: foobar
92-
pool:
93-
name: worker
94-
configVersion:
95-
desired: rendered-worker-abc
96-
pinnedImageSets:
97-
- name: test-pinned-image-set
98-
expected: |
99-
apiVersion: machineconfiguration.openshift.io/v1alpha1
100-
kind: MachineConfigNode
101-
metadata:
102-
name: foobar
103-
spec:
104-
node:
105-
name: foobar
106-
pool:
107-
name: worker
108-
configVersion:
109-
desired: rendered-worker-abc
110-
pinnedImageSets:
111-
- name: test-pinned-image-set
11283
onUpdate:
11384
- name: PinnedImageSet desired generation must be greater than or equal to the current generation
11485
initial: |
@@ -123,8 +94,6 @@ tests:
12394
name: worker
12495
configVersion:
12596
desired: rendered-worker-abc
126-
pinnedImageSets:
127-
- name: test-pinned-image-set
12897
status:
12998
observedGeneration: 1
13099
configVersion:
@@ -145,8 +114,6 @@ tests:
145114
name: worker
146115
configVersion:
147116
desired: rendered-worker-abc
148-
pinnedImageSets:
149-
- name: test-pinned-image-set
150117
status:
151118
observedGeneration: 1
152119
configVersion:
@@ -169,8 +136,6 @@ tests:
169136
name: worker
170137
configVersion:
171138
desired: rendered-worker-abc
172-
pinnedImageSets:
173-
- name: test-pinned-image-set
174139
status:
175140
observedGeneration: 4
176141
configVersion:
@@ -191,8 +156,6 @@ tests:
191156
name: worker
192157
configVersion:
193158
desired: rendered-worker-abc
194-
pinnedImageSets:
195-
- name: test-pinned-image-set
196159
status:
197160
observedGeneration: 5
198161
configVersion:
@@ -216,8 +179,6 @@ tests:
216179
name: worker
217180
configVersion:
218181
desired: rendered-worker-abc
219-
pinnedImageSets:
220-
- name: test-pinned-image-set
221182
status:
222183
observedGeneration: 4
223184
configVersion:
@@ -238,8 +199,6 @@ tests:
238199
name: worker
239200
configVersion:
240201
desired: rendered-worker-abc
241-
pinnedImageSets:
242-
- name: test-pinned-image-set
243202
status:
244203
observedGeneration: 5
245204
configVersion:

Diff for: machineconfiguration/v1alpha1/types_machineconfignode.go

+16-11
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ type MachineConfigNodeSpec struct {
104104
// +listMapKey=name
105105
// +kubebuilder:validation:MaxItems=100
106106
// +optional
107-
PinnedImageSets []MachineConfigNodeSpecPinnedImageSet `json:"pinnedImageSets,omitempty"`
107+
// Tombstone: Functionality to correctly and consistely populate this field was not implemented in the MCO, so
108+
// when applying a PIS, this field is not being updated. Since this field is not being used, it is being removed
109+
// before this API is GAed.
110+
// PinnedImageSets []MachineConfigNodeSpecPinnedImageSet `json:"pinnedImageSets,omitempty"`
108111
}
109112

110113
// MachineConfigNodeStatus holds the reported information on a particular machine config node.
@@ -218,18 +221,20 @@ type MachineConfigNodeSpecMachineConfigVersion struct {
218221
Desired string `json:"desired"`
219222
}
220223

224+
// Tombstone: This struct defines the type of `Spec.PinnedImageSets`, which is being removed. Therefore, this field
225+
// is also being tombstoned.
221226
// MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
222227
// should pin and pull.
223-
type MachineConfigNodeSpecPinnedImageSet struct {
224-
// name is the name of the pinned image set.
225-
// Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
226-
// of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
227-
// with an alphanumeric character, and be at most 253 characters in length.
228-
// +kubebuilder:validation:MaxLength:=253
229-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
230-
// +required
231-
Name string `json:"name"`
232-
}
228+
// type MachineConfigNodeSpecPinnedImageSet struct {
229+
// // name is the name of the pinned image set.
230+
// // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
231+
// // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
232+
// // with an alphanumeric character, and be at most 253 characters in length.
233+
// // +kubebuilder:validation:MaxLength:=253
234+
// // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
235+
// // +required
236+
// Name string `json:"name"`
237+
// }
233238

234239
// StateProgress is each possible state for each possible MachineConfigNodeType
235240
// Please note: These conditions are subject to change. Both additions and deletions may be made.

Diff for: machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -145,35 +145,6 @@ spec:
145145
required:
146146
- name
147147
type: object
148-
pinnedImageSets:
149-
description: pinnedImageSets is a user defined value that holds the
150-
names of the desired image sets that the node should pull and pin.
151-
items:
152-
description: |-
153-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
154-
should pin and pull.
155-
properties:
156-
name:
157-
description: |-
158-
name is the name of the pinned image set.
159-
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
160-
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
161-
with an alphanumeric character, and be at most 253 characters in length.
162-
maxLength: 253
163-
type: string
164-
x-kubernetes-validations:
165-
- message: a lowercase RFC 1123 subdomain must consist of lower
166-
case alphanumeric characters, '-' or '.', and must start
167-
and end with an alphanumeric character.
168-
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
169-
required:
170-
- name
171-
type: object
172-
maxItems: 100
173-
type: array
174-
x-kubernetes-list-map-keys:
175-
- name
176-
x-kubernetes-list-type: map
177148
pool:
178149
description: |-
179150
pool contains a reference to the machine config pool that this machine config node's

Diff for: machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -145,35 +145,6 @@ spec:
145145
required:
146146
- name
147147
type: object
148-
pinnedImageSets:
149-
description: pinnedImageSets is a user defined value that holds the
150-
names of the desired image sets that the node should pull and pin.
151-
items:
152-
description: |-
153-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
154-
should pin and pull.
155-
properties:
156-
name:
157-
description: |-
158-
name is the name of the pinned image set.
159-
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
160-
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
161-
with an alphanumeric character, and be at most 253 characters in length.
162-
maxLength: 253
163-
type: string
164-
x-kubernetes-validations:
165-
- message: a lowercase RFC 1123 subdomain must consist of lower
166-
case alphanumeric characters, '-' or '.', and must start
167-
and end with an alphanumeric character.
168-
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
169-
required:
170-
- name
171-
type: object
172-
maxItems: 100
173-
type: array
174-
x-kubernetes-list-map-keys:
175-
- name
176-
x-kubernetes-list-type: map
177148
pool:
178149
description: |-
179150
pool contains a reference to the machine config pool that this machine config node's

Diff for: machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -145,35 +145,6 @@ spec:
145145
required:
146146
- name
147147
type: object
148-
pinnedImageSets:
149-
description: pinnedImageSets is a user defined value that holds the
150-
names of the desired image sets that the node should pull and pin.
151-
items:
152-
description: |-
153-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
154-
should pin and pull.
155-
properties:
156-
name:
157-
description: |-
158-
name is the name of the pinned image set.
159-
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
160-
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
161-
with an alphanumeric character, and be at most 253 characters in length.
162-
maxLength: 253
163-
type: string
164-
x-kubernetes-validations:
165-
- message: a lowercase RFC 1123 subdomain must consist of lower
166-
case alphanumeric characters, '-' or '.', and must start
167-
and end with an alphanumeric character.
168-
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
169-
required:
170-
- name
171-
type: object
172-
maxItems: 100
173-
type: array
174-
x-kubernetes-list-map-keys:
175-
- name
176-
x-kubernetes-list-type: map
177148
pool:
178149
description: |-
179150
pool contains a reference to the machine config pool that this machine config node's

Diff for: machineconfiguration/v1alpha1/zz_generated.deepcopy.go

+1-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -145,35 +145,6 @@ spec:
145145
required:
146146
- name
147147
type: object
148-
pinnedImageSets:
149-
description: pinnedImageSets is a user defined value that holds the
150-
names of the desired image sets that the node should pull and pin.
151-
items:
152-
description: |-
153-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
154-
should pin and pull.
155-
properties:
156-
name:
157-
description: |-
158-
name is the name of the pinned image set.
159-
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
160-
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
161-
with an alphanumeric character, and be at most 253 characters in length.
162-
maxLength: 253
163-
type: string
164-
x-kubernetes-validations:
165-
- message: a lowercase RFC 1123 subdomain must consist of lower
166-
case alphanumeric characters, '-' or '.', and must start
167-
and end with an alphanumeric character.
168-
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
169-
required:
170-
- name
171-
type: object
172-
maxItems: 100
173-
type: array
174-
x-kubernetes-list-map-keys:
175-
- name
176-
x-kubernetes-list-type: map
177148
pool:
178149
description: |-
179150
pool contains a reference to the machine config pool that this machine config node's

Diff for: machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go

+4-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)