Skip to content

Commit 2a22350

Browse files
fix optional and required missing markers
1 parent 74b5dc2 commit 2a22350

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

api/v1/clustercatalog_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type ClusterCatalog struct {
5858

5959
// metadata is the standard object's metadata.
6060
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
61+
// +optional
6162
metav1.ObjectMeta `json:"metadata,omitempty"`
6263

6364
// spec is the desired state of the ClusterCatalog.
@@ -262,6 +263,7 @@ type ResolvedCatalogSource struct {
262263
Type SourceType `json:"type"`
263264
// image is a field containing resolution information for a catalog sourced from an image.
264265
// This field must be set when type is Image, and forbidden otherwise.
266+
// +required
265267
Image *ResolvedImageSource `json:"image"`
266268
}
267269

api/v1/clusterextension_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ type PreflightConfig struct {
417417
//
418418
// The CRD Upgrade Safety pre-flight check safeguards from unintended
419419
// consequences of upgrading a CRD, such as data loss.
420+
// +required
420421
CRDUpgradeSafety *CRDUpgradeSafetyPreflightConfig `json:"crdUpgradeSafety"`
421422
}
422423

@@ -474,6 +475,7 @@ type BundleMetadata struct {
474475
// RevisionStatus defines the observed state of a ClusterExtensionRevision.
475476
type RevisionStatus struct {
476477
// name of the ClusterExtensionRevision resource
478+
// +required
477479
Name string `json:"name"`
478480
// conditions optionally expose Progressing and Available condition of the revision,
479481
// in case when it is not yet marked as successfully installed (condition Succeeded is not set to True).

api/v1/clusterextensionrevision_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type ClusterExtensionRevisionSpec struct {
5252
// +kubebuilder:default="Active"
5353
// +kubebuilder:validation:Enum=Active;Archived
5454
// +kubebuilder:validation:XValidation:rule="oldSelf == 'Active' || oldSelf == 'Archived' && oldSelf == self", message="cannot un-archive"
55+
// +optional
5556
LifecycleState ClusterExtensionRevisionLifecycleState `json:"lifecycleState,omitempty"`
5657

5758
// revision is a required, immutable sequence number representing a specific revision
@@ -116,6 +117,7 @@ type ClusterExtensionRevisionPhase struct {
116117
//
117118
// +kubebuilder:validation:MaxLength=63
118119
// +kubebuilder:validation:Pattern=`^[a-z]([-a-z0-9]*[a-z0-9])?$`
120+
// +required
119121
Name string `json:"name"`
120122

121123
// objects is a required list of all Kubernetes objects that belong to this phase.
@@ -133,6 +135,7 @@ type ClusterExtensionRevisionObject struct {
133135
//
134136
// +kubebuilder:validation:EmbeddedResource
135137
// +kubebuilder:pruning:PreserveUnknownFields
138+
// +required
136139
Object unstructured.Unstructured `json:"object"`
137140

138141
// collisionProtection controls whether the operator can adopt and modify objects

0 commit comments

Comments
 (0)