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
Original file line number Diff line number Diff line change
Expand Up @@ -80,35 +80,6 @@ tests:
node:
name: foobar
expectedError: "spec.configVersion: Required value, <nil>: Invalid value: \"null\""
- name: Should be able to create a MachineConfigNode with a PinnedImageSet
initial: |
apiVersion: machineconfiguration.openshift.io/v1alpha1
kind: MachineConfigNode
metadata:
name: foobar
spec:
node:
name: foobar
pool:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
expected: |
apiVersion: machineconfiguration.openshift.io/v1alpha1
kind: MachineConfigNode
metadata:
name: foobar
spec:
node:
name: foobar
pool:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
onUpdate:
- name: PinnedImageSet desired generation must be greater than or equal to the current generation
initial: |
Expand All @@ -123,8 +94,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 1
configVersion:
Expand All @@ -145,8 +114,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 1
configVersion:
Expand All @@ -169,8 +136,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 4
configVersion:
Expand All @@ -191,8 +156,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 5
configVersion:
Expand All @@ -216,8 +179,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 4
configVersion:
Expand All @@ -238,8 +199,6 @@ tests:
name: worker
configVersion:
desired: rendered-worker-abc
pinnedImageSets:
- name: test-pinned-image-set
status:
observedGeneration: 5
configVersion:
Expand Down
29 changes: 17 additions & 12 deletions machineconfiguration/v1alpha1/types_machineconfignode.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=machineconfignodes,scope=Cluster
// +kubebuilder:subresource:status
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2201
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2256
// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01
// +openshift:enable:FeatureGate=MachineConfigNodes
// +kubebuilder:printcolumn:name="PoolName",type="string",JSONPath=.spec.pool.name,priority=0
Expand Down Expand Up @@ -104,7 +104,10 @@ type MachineConfigNodeSpec struct {
// +listMapKey=name
// +kubebuilder:validation:MaxItems=100
// +optional
PinnedImageSets []MachineConfigNodeSpecPinnedImageSet `json:"pinnedImageSets,omitempty"`
// Tombstone: Functionality to correctly and consistely populate this field was not implemented in the MCO, so
// when applying a PIS, this field is not being updated. Since this field is not being used, it is being removed
// before this API is GAed.
// PinnedImageSets []MachineConfigNodeSpecPinnedImageSet `json:"pinnedImageSets,omitempty"`
}

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

// Tombstone: This struct defines the type of `Spec.PinnedImageSets`, which is being removed. Therefore, this field
// is also being tombstoned.
// MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
// should pin and pull.
type MachineConfigNodeSpecPinnedImageSet struct {
// name is the name of the pinned image set.
// Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
// of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
// with an alphanumeric character, and be at most 253 characters in length.
// +kubebuilder:validation:MaxLength:=253
// +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."
// +required
Name string `json:"name"`
}
// type MachineConfigNodeSpecPinnedImageSet struct {
// // name is the name of the pinned image set.
// // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
// // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
// // with an alphanumeric character, and be at most 253 characters in length.
// // +kubebuilder:validation:MaxLength:=253
// // +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."
// // +required
// Name string `json:"name"`
// }

// StateProgress is each possible state for each possible MachineConfigNodeType
// Please note: These conditions are subject to change. Both additions and deletions may be made.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2201
api-approved.openshift.io: https://github.com/openshift/api/pull/2256
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
Expand Down Expand Up @@ -145,35 +145,6 @@ spec:
required:
- name
type: object
pinnedImageSets:
description: pinnedImageSets is a user defined value that holds the
names of the desired image sets that the node should pull and pin.
items:
description: |-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
should pin and pull.
properties:
name:
description: |-
name is the name of the pinned image set.
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
with an alphanumeric character, and be at most 253 characters in length.
maxLength: 253
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist of lower
case alphanumeric characters, '-' or '.', and must start
and end with an alphanumeric character.
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
required:
- name
type: object
maxItems: 100
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
pool:
description: |-
pool contains a reference to the machine config pool that this machine config node's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2201
api-approved.openshift.io: https://github.com/openshift/api/pull/2256
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
Expand Down Expand Up @@ -145,35 +145,6 @@ spec:
required:
- name
type: object
pinnedImageSets:
description: pinnedImageSets is a user defined value that holds the
names of the desired image sets that the node should pull and pin.
items:
description: |-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
should pin and pull.
properties:
name:
description: |-
name is the name of the pinned image set.
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
with an alphanumeric character, and be at most 253 characters in length.
maxLength: 253
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist of lower
case alphanumeric characters, '-' or '.', and must start
and end with an alphanumeric character.
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
required:
- name
type: object
maxItems: 100
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
pool:
description: |-
pool contains a reference to the machine config pool that this machine config node's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2201
api-approved.openshift.io: https://github.com/openshift/api/pull/2256
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
Expand Down Expand Up @@ -145,35 +145,6 @@ spec:
required:
- name
type: object
pinnedImageSets:
description: pinnedImageSets is a user defined value that holds the
names of the desired image sets that the node should pull and pin.
items:
description: |-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
should pin and pull.
properties:
name:
description: |-
name is the name of the pinned image set.
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
with an alphanumeric character, and be at most 253 characters in length.
maxLength: 253
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist of lower
case alphanumeric characters, '-' or '.', and must start
and end with an alphanumeric character.
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
required:
- name
type: object
maxItems: 100
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
pool:
description: |-
pool contains a reference to the machine config pool that this machine config node's
Expand Down
23 changes: 1 addition & 22 deletions machineconfiguration/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
machineconfignodes.machineconfiguration.openshift.io:
Annotations: {}
ApprovedPRNumber: https://github.com/openshift/api/pull/2201
ApprovedPRNumber: https://github.com/openshift/api/pull/2256
CRDName: machineconfignodes.machineconfiguration.openshift.io
Capability: ""
Category: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2201
api-approved.openshift.io: https://github.com/openshift/api/pull/2256
api.openshift.io/filename-cvo-runlevel: "0000_80"
api.openshift.io/filename-operator: machine-config
api.openshift.io/filename-ordering: "01"
Expand Down Expand Up @@ -145,35 +145,6 @@ spec:
required:
- name
type: object
pinnedImageSets:
description: pinnedImageSets is a user defined value that holds the
names of the desired image sets that the node should pull and pin.
items:
description: |-
MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node
should pin and pull.
properties:
name:
description: |-
name is the name of the pinned image set.
Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting
of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end
with an alphanumeric character, and be at most 253 characters in length.
maxLength: 253
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist of lower
case alphanumeric characters, '-' or '.', and must start
and end with an alphanumeric character.
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
required:
- name
type: object
maxItems: 100
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
pool:
description: |-
pool contains a reference to the machine config pool that this machine config node's
Expand Down
Loading