Skip to content

Commit

Permalink
Add missing DataGather comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelSpeed committed Oct 2, 2023
1 parent 5c48975 commit c6937e9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 13 deletions.
14 changes: 12 additions & 2 deletions insights/v1alpha1/types_insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import (
// 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.
// +openshift:compatibility-gen:level=4
type DataGather struct {
metav1.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`

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

// spec holds user settable values for configuration
Expand All @@ -25,6 +28,7 @@ type DataGather struct {
Status DataGatherStatus `json:"status"`
}

// DataGatherSpec contains the configuration for the DataGather.
type DataGatherSpec struct {
// dataPolicy allows user to enable additional global obfuscation of the IP addresses and base domain
// in the Insights archive data. Valid values are "ClearText" and "ObfuscateNetworking".
Expand Down Expand Up @@ -91,6 +95,7 @@ type GathererConfig struct {
// +kubebuilder:validation:XValidation:rule="!(oldSelf == 'Failed' && self == 'Running')", message="dataGatherState cannot transition from Failed to Running"
type DataGatherState string

// DataGatherStatus contains information relating to the DataGather state.
// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.insightsRequestID) || has(self.insightsRequestID))",message="cannot remove insightsRequestID attribute from status"
// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.startTime) || has(self.startTime))",message="cannot remove startTime attribute from status"
// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.finishTime) || has(self.finishTime))",message="cannot remove finishTime attribute from status"
Expand Down Expand Up @@ -250,6 +255,11 @@ type ObjectReference struct {
// +openshift:compatibility-gen:level=4
type DataGatherList struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard list's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ListMeta `json:"metadata"`
Items []DataGather `json:"items"`

// items contains a list of DataGather resources.
Items []DataGather `json:"items"`
}
13 changes: 9 additions & 4 deletions insights/v1alpha1/zz_generated.swagger_doc_generated.go

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

19 changes: 12 additions & 7 deletions openapi/generated_openapi/zz_generated.openapi.go

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

5 changes: 5 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -13340,6 +13340,7 @@
"type": "string"
},
"metadata": {
"description": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"default": {},
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
},
Expand Down Expand Up @@ -13368,6 +13369,7 @@
"type": "string"
},
"items": {
"description": "items contains a list of DataGather resources.",
"type": "array",
"items": {
"default": {},
Expand All @@ -13379,12 +13381,14 @@
"type": "string"
},
"metadata": {
"description": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"default": {},
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"
}
}
},
"com.github.openshift.api.insights.v1alpha1.DataGatherSpec": {
"description": "DataGatherSpec contains the configuration for the DataGather.",
"type": "object",
"properties": {
"dataPolicy": {
Expand All @@ -13403,6 +13407,7 @@
}
},
"com.github.openshift.api.insights.v1alpha1.DataGatherStatus": {
"description": "DataGatherStatus contains information relating to the DataGather state.",
"type": "object",
"properties": {
"conditions": {
Expand Down

0 comments on commit c6937e9

Please sign in to comment.