Skip to content

Commit

Permalink
fix comments, remove shortname
Browse files Browse the repository at this point in the history
Signed-off-by: Himanshu Roy <hroy@redhat.com>
  • Loading branch information
hroyrh committed Mar 25, 2024
1 parent 1fd17bc commit 5809f3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
11 changes: 4 additions & 7 deletions apis/metal3.io/v1alpha1/dataimage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

const DataImageFinalizer = "dataimage.metal3.io"

// Contains the attached DataImage.
// Contains the DataImage currently attached to the BMH.
type AttachedImageReference struct {
URL string `json:"url"`
}
Expand All @@ -35,9 +35,7 @@ type DataImageError struct {

// DataImageSpec defines the desired state of DataImage.
type DataImageSpec struct {
// Important: Run "make" to regenerate code after modifying this file

// URL is the address of the dataImage that we want to attach
// Url is the address of the dataImage that we want to attach
// to a BareMetalHost
URL string `json:"url"`
}
Expand All @@ -48,15 +46,14 @@ type DataImageStatus struct {
// +optional
LastReconciled *metav1.Time `json:"lastReconciled,omitempty"`

// AttachedImage shows the currently attached image
// Currently attached DataImage
AttachedImage *AttachedImageReference `json:"attachedImage,omitempty"`

// Error contains errors related to DataImage attachment/detachment
// Error count and message when attaching/detaching
Error *DataImageError `json:"error,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:resource:shortName=dimg
//+kubebuilder:subresource:status

// DataImage is the Schema for the dataimages API.
Expand Down
8 changes: 3 additions & 5 deletions config/base/crds/bases/metal3.io_dataimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ spec:
kind: DataImage
listKind: DataImageList
plural: dataimages
shortNames:
- dimg
singular: dataimage
scope: Namespaced
versions:
Expand All @@ -37,7 +35,7 @@ spec:
description: DataImageSpec defines the desired state of DataImage.
properties:
url:
description: URL is the address of the dataImage that we want to attach
description: Url is the address of the dataImage that we want to attach
to a BareMetalHost
type: string
required:
Expand All @@ -47,15 +45,15 @@ spec:
description: DataImageStatus defines the observed state of DataImage.
properties:
attachedImage:
description: AttachedImage shows the currently attached image
description: Currently attached DataImage
properties:
url:
type: string
required:
- url
type: object
error:
description: Error contains errors related to DataImage attachment/detachment
description: Error count and message when attaching/detaching
properties:
count:
type: integer
Expand Down

0 comments on commit 5809f3e

Please sign in to comment.