Skip to content

Commit 0d80867

Browse files
committed
linter fix
1 parent 9eca225 commit 0d80867

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

machineconfiguration/v1alpha1/types_internalreleaseimage.go

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ import (
2323
// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
2424
// +openshift:compatibility-gen:level=4
2525
type InternalReleaseImage struct {
26-
metav1.TypeMeta `json:",inline"`
26+
metav1.TypeMeta `json:",inline"`
27+
28+
// metadata is the standard object's metadata.
29+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
2730
metav1.ObjectMeta `json:"metadata,omitempty"`
2831

2932
// spec describes the configuration of this internal release image.
3033
// +required
31-
Spec InternalReleaseImageSpec `json:"spec"`
34+
Spec InternalReleaseImageSpec `json:"spec,omitzero"`
3235

3336
// status describes the last observed state of this internal release image.
3437
// +optional
@@ -37,31 +40,35 @@ type InternalReleaseImage struct {
3740

3841
// InternalReleaseImageStatus describes the current state of a InternalReleaseImage.
3942
type InternalReleaseImageStatus struct {
43+
// conditions represent the observations of an internal release image current state.
44+
// +listType=map
45+
// +listMapKey=type
46+
// +optional
47+
Conditions []metav1.Condition `json:"conditions,omitempty"`
48+
4049
// availableReleases is a list of release bundle identifiers currently detected
4150
// from the attached ISO.
4251
// +listType=map
4352
// +listMapKey=name
53+
// +kubebuilder:validation:MinItems=1
54+
// +kubebuilder:validation:MaxItems=64
4455
// +optional
45-
AvailableReleases []InternalReleaseImageRef `json:"availableReleases"`
56+
AvailableReleases []InternalReleaseImageRef `json:"availableReleases,omitempty"`
4657

4758
// releases is a list of the currently managed release bundles.
4859
// +listType=map
4960
// +listMapKey=name
50-
// +required
51-
Releases []InternalReleaseImageRef `json:"releases"`
52-
53-
// conditions represent the observations of an internal release image current state.
54-
// +listType=map
55-
// +listMapKey=type
61+
// +kubebuilder:validation:MinItems=1
62+
// +kubebuilder:validation:MaxItems=64
5663
// +optional
57-
Conditions []metav1.Condition `json:"conditions,omitempty"`
64+
Releases []InternalReleaseImageRef `json:"releases,omitempty"`
5865
}
5966

6067
// InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.
6168
type InternalReleaseImageSpec struct {
6269
// releases is a list of release bundle identifiers that the user wants to
6370
// add/remove to/from the control plane nodes.
64-
// +required
71+
// +optional
6572
// +kubebuilder:validation:MinItems=1
6673
// +kubebuilder:validation:MaxItems=20
6774
// +listType=map
@@ -74,14 +81,14 @@ type InternalReleaseImageRef struct {
7481
// +required
7582
// +kubebuilder:validation:MinLength=1
7683
// +kubebuilder:validation:MaxLength=64
77-
Name string `json:"name"`
84+
Name string `json:"name,omitempty"`
7885

7986
// image is an OCP release imaged referenced by digest.
8087
// The format of the image pull spec is: host[:port][/namespace]/name@sha256:<digest>,
8188
// where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9.
8289
// The length of the whole spec must be between 1 to 447 characters.
8390
// +optional
84-
Image machineosconfig.ImageDigestFormat `json:"image"`
91+
Image machineosconfig.ImageDigestFormat `json:"image,omitempty"`
8592
}
8693

8794
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

0 commit comments

Comments
 (0)