Skip to content

Commit 0db3b8c

Browse files
Ondrej Pokornyopokornyy
authored andcommitted
fix: typos and linting of godoc
Signed-off-by: Ondrej Pokorny <[email protected]>
1 parent f22282c commit 0db3b8c

17 files changed

+156
-152
lines changed

config/v1/types_insights.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package v1
22

33
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
44

5+
// InsightsDataGather provides data gather configuration options for the Insights Operator.
6+
//
57
// +genclient
68
// +genclient:nonNamespaced
79
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
810
//
9-
// InsightsDataGather provides data gather configuration options for the the Insights Operator.
10-
//
1111
// +kubebuilder:object:root=true
1212
// +kubebuilder:resource:path=insightsdatagathers,scope=Cluster
1313
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2448
@@ -34,7 +34,7 @@ type InsightsDataGatherSpec struct {
3434
GatherConfig GatherConfig `json:"gatherConfig,omitempty,omitzero"`
3535
}
3636

37-
// gatherConfig provides data gathering configuration options.
37+
// GatherConfig provides data gathering configuration options.
3838
type GatherConfig struct {
3939
// dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data.
4040
// It may not exceed 2 items and must not contain duplicates.
@@ -57,11 +57,12 @@ type GatherConfig struct {
5757
Storage Storage `json:"storage,omitempty,omitzero"`
5858
}
5959

60+
// Gatherers specifies the configuration of the gatherers
6061
// +kubebuilder:validation:XValidation:rule="has(self.mode) && self.mode == 'Custom' ? has(self.custom) : !has(self.custom)",message="custom is required when mode is Custom, and forbidden otherwise"
6162
// +union
6263
type Gatherers struct {
6364
// mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
64-
// When set to All, all gatherers wil run and gather data.
65+
// When set to All, all gatherers will run and gather data.
6566
// When set to None, all gatherers will be disabled and no data will be gathered.
6667
// When set to Custom, the custom configuration from the custom field will be applied.
6768
// +unionDiscriminator
@@ -76,7 +77,7 @@ type Gatherers struct {
7677
Custom Custom `json:"custom,omitempty,omitzero"`
7778
}
7879

79-
// custom provides the custom configuration of gatherers
80+
// Custom provides the custom configuration of gatherers
8081
type Custom struct {
8182
// configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers.
8283
// It may not exceed 100 items and each gatherer can be present only once.
@@ -92,7 +93,7 @@ type Custom struct {
9293
Configs []GathererConfig `json:"configs,omitempty"`
9394
}
9495

95-
// gatheringMode defines the valid gathering modes.
96+
// GatheringMode defines the valid gathering modes.
9697
// +kubebuilder:validation:Enum=All;None;Custom
9798
type GatheringMode string
9899

@@ -105,7 +106,7 @@ const (
105106
GatheringModeCustom GatheringMode = "Custom"
106107
)
107108

108-
// dataPolicyOption declares valid data policy options
109+
// DataPolicyOption declares valid data policy options
109110
// +kubebuilder:validation:Enum=ObfuscateNetworking;WorkloadNames
110111
type DataPolicyOption string
111112

@@ -116,7 +117,7 @@ const (
116117
DataPolicyOptionObfuscateWorkloadNames DataPolicyOption = "WorkloadNames"
117118
)
118119

119-
// storage provides persistent storage configuration options for gathering jobs.
120+
// Storage provides persistent storage configuration options for gathering jobs.
120121
// If the type is set to PersistentVolume, then the PersistentVolume must be defined.
121122
// If the type is set to Ephemeral, then the PersistentVolume must not be defined.
122123
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'PersistentVolume' ? has(self.persistentVolume) : !has(self.persistentVolume)",message="persistentVolume is required when type is PersistentVolume, and forbidden otherwise"
@@ -136,7 +137,7 @@ type Storage struct {
136137
PersistentVolume PersistentVolumeConfig `json:"persistentVolume,omitempty,omitzero"`
137138
}
138139

139-
// storageType declares valid storage types
140+
// StorageType declares valid storage types
140141
// +kubebuilder:validation:Enum=PersistentVolume;Ephemeral
141142
type StorageType string
142143

@@ -147,7 +148,7 @@ const (
147148
StorageTypeEphemeral StorageType = "Ephemeral"
148149
)
149150

150-
// persistentVolumeConfig provides configuration options for PersistentVolume storage.
151+
// PersistentVolumeConfig provides configuration options for PersistentVolume storage.
151152
type PersistentVolumeConfig struct {
152153
// claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive.
153154
// The PersistentVolumeClaim must be created in the openshift-insights namespace.
@@ -164,7 +165,7 @@ type PersistentVolumeConfig struct {
164165
MountPath string `json:"mountPath,omitempty"`
165166
}
166167

167-
// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.
168+
// PersistentVolumeClaimReference is a reference to a PersistentVolumeClaim.
168169
type PersistentVolumeClaimReference struct {
169170
// name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive.
170171
// It is a string that follows the DNS1123 subdomain format.
@@ -176,7 +177,7 @@ type PersistentVolumeClaimReference struct {
176177
Name string `json:"name,omitempty"`
177178
}
178179

179-
// gathererConfig allows to configure specific gatherers
180+
// GathererConfig allows to configure specific gatherers
180181
type GathererConfig struct {
181182
// name is the required name of a specific gatherer.
182183
// It may not exceed 256 characters.
@@ -198,7 +199,7 @@ type GathererConfig struct {
198199
State GathererState `json:"state,omitempty"`
199200
}
200201

201-
// state declares valid gatherer state types.
202+
// GathererState declares valid gatherer state types.
202203
// +kubebuilder:validation:Enum=Enabled;Disabled
203204
type GathererState string
204205

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-CustomNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the Insights Operator.
2525
2626
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
2727
properties:
@@ -59,7 +59,7 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: dataPolicyOption declares valid data policy options
62+
description: DataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
@@ -91,7 +91,7 @@ spec:
9191
Run the following command to get the names of last active gatherers:
9292
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9393
items:
94-
description: gathererConfig allows to configure specific
94+
description: GathererConfig allows to configure specific
9595
gatherers
9696
properties:
9797
name:
@@ -139,7 +139,7 @@ spec:
139139
mode:
140140
description: |-
141141
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers wil run and gather data.
142+
When set to All, all gatherers will run and gather data.
143143
When set to None, all gatherers will be disabled and no data will be gathered.
144144
When set to Custom, the custom configuration from the custom field will be applied.
145145
enum:

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-DevPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the Insights Operator.
2525
2626
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
2727
properties:
@@ -59,7 +59,7 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: dataPolicyOption declares valid data policy options
62+
description: DataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
@@ -91,7 +91,7 @@ spec:
9191
Run the following command to get the names of last active gatherers:
9292
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9393
items:
94-
description: gathererConfig allows to configure specific
94+
description: GathererConfig allows to configure specific
9595
gatherers
9696
properties:
9797
name:
@@ -139,7 +139,7 @@ spec:
139139
mode:
140140
description: |-
141141
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers wil run and gather data.
142+
When set to All, all gatherers will run and gather data.
143143
When set to None, all gatherers will be disabled and no data will be gathered.
144144
When set to Custom, the custom configuration from the custom field will be applied.
145145
enum:

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-TechPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the Insights Operator.
2525
2626
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
2727
properties:
@@ -59,7 +59,7 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: dataPolicyOption declares valid data policy options
62+
description: DataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
@@ -91,7 +91,7 @@ spec:
9191
Run the following command to get the names of last active gatherers:
9292
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9393
items:
94-
description: gathererConfig allows to configure specific
94+
description: GathererConfig allows to configure specific
9595
gatherers
9696
properties:
9797
name:
@@ -139,7 +139,7 @@ spec:
139139
mode:
140140
description: |-
141141
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers wil run and gather data.
142+
When set to All, all gatherers will run and gather data.
143143
When set to None, all gatherers will be disabled and no data will be gathered.
144144
When set to Custom, the custom configuration from the custom field will be applied.
145145
enum:

config/v1/zz_generated.featuregated-crd-manifests/insightsdatagathers.config.openshift.io/InsightsConfig.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the Insights Operator.
2525
2626
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
2727
properties:
@@ -59,7 +59,7 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: dataPolicyOption declares valid data policy options
62+
description: DataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
@@ -91,7 +91,7 @@ spec:
9191
Run the following command to get the names of last active gatherers:
9292
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9393
items:
94-
description: gathererConfig allows to configure specific
94+
description: GathererConfig allows to configure specific
9595
gatherers
9696
properties:
9797
name:
@@ -139,7 +139,7 @@ spec:
139139
mode:
140140
description: |-
141141
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers wil run and gather data.
142+
When set to All, all gatherers will run and gather data.
143143
When set to None, all gatherers will be disabled and no data will be gathered.
144144
When set to Custom, the custom configuration from the custom field will be applied.
145145
enum:

0 commit comments

Comments
 (0)