Skip to content

Commit 10ae908

Browse files
committed
Apply partial fixes
1 parent 92dede7 commit 10ae908

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+119
-48
lines changed

apps/v1/types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,26 +304,35 @@ type DeploymentTriggerImageChangeParams struct {
304304
type DeploymentConfigStatus struct {
305305
// latestVersion is used to determine whether the current deployment associated with a deployment
306306
// config is out of sync.
307+
// +optional
307308
LatestVersion int64 `json:"latestVersion" protobuf:"varint,1,opt,name=latestVersion"`
308309
// observedGeneration is the most recent generation observed by the deployment config controller.
310+
// +optional
309311
ObservedGeneration int64 `json:"observedGeneration" protobuf:"varint,2,opt,name=observedGeneration"`
310312
// replicas is the total number of pods targeted by this deployment config.
313+
// +optional
311314
Replicas int32 `json:"replicas" protobuf:"varint,3,opt,name=replicas"`
312315
// updatedReplicas is the total number of non-terminated pods targeted by this deployment config
313316
// that have the desired template spec.
317+
// +optional
314318
UpdatedReplicas int32 `json:"updatedReplicas" protobuf:"varint,4,opt,name=updatedReplicas"`
315319
// availableReplicas is the total number of available pods targeted by this deployment config.
320+
// +optional
316321
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,5,opt,name=availableReplicas"`
317322
// unavailableReplicas is the total number of unavailable pods targeted by this deployment config.
323+
// +optional
318324
UnavailableReplicas int32 `json:"unavailableReplicas" protobuf:"varint,6,opt,name=unavailableReplicas"`
319325
// details are the reasons for the update to this deployment config.
320326
// This could be based on a change made by the user or caused by an automatic trigger
327+
// +optional
321328
Details *DeploymentDetails `json:"details,omitempty" protobuf:"bytes,7,opt,name=details"`
322329
// conditions represents the latest available observations of a deployment config's current state.
323330
// +patchMergeKey=type
324331
// +patchStrategy=merge
332+
// +optional
325333
Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,8,rep,name=conditions"`
326334
// Total number of ready pods targeted by this deployment.
335+
// +optional
327336
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,9,opt,name=readyReplicas"`
328337
}
329338

authorization/v1/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,11 @@ type SubjectRulesReviewSpec struct {
208208
// SubjectRulesReviewStatus is contains the result of a rules check
209209
type SubjectRulesReviewStatus struct {
210210
// rules is the list of rules (no particular sort) that are allowed for the subject
211+
// +optional
211212
Rules []PolicyRule `json:"rules" protobuf:"bytes,1,rep,name=rules"`
212213
// evaluationError can appear in combination with Rules. It means some error happened during evaluation
213214
// that may have prevented additional rules from being populated.
215+
// +optional
214216
EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,2,opt,name=evaluationError"`
215217
}
216218

build/v1/types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,54 +192,67 @@ type ImageChangeCause struct {
192192
type BuildStatus struct {
193193
// phase is the point in the build lifecycle. Possible values are
194194
// "New", "Pending", "Running", "Complete", "Failed", "Error", and "Cancelled".
195+
// +optional
195196
Phase BuildPhase `json:"phase" protobuf:"bytes,1,opt,name=phase,casttype=BuildPhase"`
196197

197198
// cancelled describes if a cancel event was triggered for the build.
199+
// +optional
198200
Cancelled bool `json:"cancelled,omitempty" protobuf:"varint,2,opt,name=cancelled"`
199201

200202
// reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.
203+
// +optional
201204
Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason,casttype=StatusReason"`
202205

203206
// message is a human-readable message indicating details about why the build has this status.
207+
// +optional
204208
Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
205209

206210
// startTimestamp is a timestamp representing the server time when this Build started
207211
// running in a Pod.
208212
// It is represented in RFC3339 form and is in UTC.
213+
// +optional
209214
StartTimestamp *metav1.Time `json:"startTimestamp,omitempty" protobuf:"bytes,5,opt,name=startTimestamp"`
210215

211216
// completionTimestamp is a timestamp representing the server time when this Build was
212217
// finished, whether that build failed or succeeded. It reflects the time at which
213218
// the Pod running the Build terminated.
214219
// It is represented in RFC3339 form and is in UTC.
220+
// +optional
215221
CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty" protobuf:"bytes,6,opt,name=completionTimestamp"`
216222

217223
// duration contains time.Duration object describing build time.
224+
// +optional
218225
Duration time.Duration `json:"duration,omitempty" protobuf:"varint,7,opt,name=duration,casttype=time.Duration"`
219226

220227
// outputDockerImageReference contains a reference to the container image that
221228
// will be built by this build. Its value is computed from
222229
// Build.Spec.Output.To, and should include the registry address, so that
223230
// it can be used to push and pull the image.
231+
// +optional
224232
OutputDockerImageReference string `json:"outputDockerImageReference,omitempty" protobuf:"bytes,8,opt,name=outputDockerImageReference"`
225233

226234
// config is an ObjectReference to the BuildConfig this Build is based on.
235+
// +optional
227236
Config *corev1.ObjectReference `json:"config,omitempty" protobuf:"bytes,9,opt,name=config"`
228237

229238
// output describes the container image the build has produced.
239+
// +optional
230240
Output BuildStatusOutput `json:"output,omitempty" protobuf:"bytes,10,opt,name=output"`
231241

232242
// stages contains details about each stage that occurs during the build
233243
// including start time, duration (in milliseconds), and the steps that
234244
// occured within each stage.
245+
// +optional
235246
Stages []StageInfo `json:"stages,omitempty" protobuf:"bytes,11,opt,name=stages"`
236247

237248
// logSnippet is the last few lines of the build log. This value is only set for builds that failed.
249+
// +optional
238250
LogSnippet string `json:"logSnippet,omitempty" protobuf:"bytes,12,opt,name=logSnippet"`
239251

240252
// conditions represents the latest available observations of a build's current state.
241253
// +patchMergeKey=type
242254
// +patchStrategy=merge
255+
// +optional
243256
Conditions []BuildCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,13,rep,name=conditions"`
244257
}
245258

@@ -1005,11 +1018,13 @@ const (
10051018
// BuildConfigStatus contains current state of the build config object.
10061019
type BuildConfigStatus struct {
10071020
// lastVersion is used to inform about number of last triggered build.
1021+
// +optional
10081022
LastVersion int64 `json:"lastVersion" protobuf:"varint,1,opt,name=lastVersion"`
10091023

10101024
// imageChangeTriggers captures the runtime state of any ImageChangeTrigger specified in the BuildConfigSpec,
10111025
// including the value reconciled by the OpenShift APIServer for the lastTriggeredImageID. There is a single entry
10121026
// in this array for each image change trigger in spec. Each trigger status references the ImageStreamTag that acts as the source of the trigger.
1027+
// +optional
10131028
ImageChangeTriggers []ImageChangeTriggerStatus `json:"imageChangeTriggers,omitempty" protobuf:"bytes,2,rep,name=imageChangeTriggers"`
10141029
}
10151030

config/v1/types_apiserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ type AuditCustomRule struct {
146146
// If unset, the 'Default' profile is used as the default.
147147
//
148148
// +required
149-
Profile AuditProfileType `json:"profile,omitempty"`
149+
Profile AuditProfileType `json:"profile"`
150150
}
151151

152152
type APIServerServingCerts struct {

config/v1/types_authentication.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ type AuthenticationStatus struct {
108108
// If the config map or expected key is not found, no metadata is served.
109109
// If the specified metadata is not valid, no metadata is served.
110110
// The namespace for this config map is openshift-config-managed.
111+
// +optional
111112
IntegratedOAuthMetadata ConfigMapNameReference `json:"integratedOAuthMetadata"`
112113

113114
// oidcClients is where participating operators place the current OIDC client status
@@ -119,6 +120,7 @@ type AuthenticationStatus struct {
119120
// +kubebuilder:validation:MaxItems=20
120121
// +openshift:enable:FeatureGate=ExternalOIDC
121122
// +openshift:enable:FeatureGate=ExternalOIDCWithUIDAndExtraClaimMappings
123+
// +optional
122124
OIDCClients []OIDCClientStatus `json:"oidcClients"`
123125
}
124126

@@ -207,7 +209,7 @@ type OIDCProvider struct {
207209
Name string `json:"name"`
208210

209211
// issuer is a required field that configures how the platform interacts
210-
// with the identity provider and how tokens issued from the identity provider
212+
// with the identity provider and how tokens issued from the identity provider
211213
// are evaluated by the Kubernetes API server.
212214
//
213215
// +required
@@ -737,7 +739,7 @@ type TokenClaimValidationRule struct {
737739
// JWT is valid for this identity provider.
738740
//
739741
// +optional
740-
RequiredClaim *TokenRequiredClaim `json:"requiredClaim"`
742+
RequiredClaim *TokenRequiredClaim `json:"requiredClaim,omitempty"`
741743
}
742744

743745
type TokenRequiredClaim struct {

config/v1/types_cluster_version.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ type ClusterVersionStatus struct {
163163
VersionHash string `json:"versionHash"`
164164

165165
// capabilities describes the state of optional, core cluster components.
166+
// +optional
166167
Capabilities ClusterVersionCapabilitiesStatus `json:"capabilities"`
167168

168169
// conditions provides information about the cluster version. The condition

config/v1/types_console.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type ConsoleSpec struct {
4545
type ConsoleStatus struct {
4646
// The URL for the console. This will be derived from the host for the route that
4747
// is created for the console.
48+
// +optional
4849
ConsoleURL string `json:"consoleURL"`
4950
}
5051

config/v1/types_feature.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ type FeatureGateStatus struct {
112112
// Only featureGates with .version in the ClusterVersion.status will be present in this list.
113113
// +listType=map
114114
// +listMapKey=version
115+
// +optional
115116
FeatureGates []FeatureGateDetails `json:"featureGates"`
116117
}
117118

config/v1/types_infrastructure.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ type InfrastructureStatus struct {
6262
// infrastructureName uniquely identifies a cluster with a human friendly name.
6363
// Once set it should not be changed. Must be of max length 27 and must have only
6464
// alphanumeric or hyphen characters.
65+
// +optional
6566
InfrastructureName string `json:"infrastructureName"`
6667

6768
// platform is the underlying infrastructure provider for the cluster.
6869
//
6970
// Deprecated: Use platformStatus.type instead.
71+
// +optional
7072
Platform PlatformType `json:"platform,omitempty"`
7173

7274
// platformStatus holds status information specific to the underlying
@@ -78,17 +80,20 @@ type InfrastructureStatus struct {
7880
// etcd servers and clients.
7981
// For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery
8082
// deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.
83+
// +optional
8184
EtcdDiscoveryDomain string `json:"etcdDiscoveryDomain"`
8285

8386
// apiServerURL is a valid URI with scheme 'https', address and
8487
// optionally a port (defaulting to 443). apiServerURL can be used by components like the web console
8588
// to tell users where to find the Kubernetes API.
89+
// +optional
8690
APIServerURL string `json:"apiServerURL"`
8791

8892
// apiServerInternalURL is a valid URI with scheme 'https',
8993
// address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components
9094
// like kubelets, to contact the Kubernetes API server using the
9195
// infrastructure provider rather than Kubernetes networking.
96+
// +optional
9297
APIServerInternalURL string `json:"apiServerInternalURI"`
9398

9499
// controlPlaneTopology expresses the expectations for operands that normally run on control nodes.
@@ -102,6 +107,7 @@ type InfrastructureStatus struct {
102107
// +openshift:validation:FeatureGateAwareEnum:featureGate=HighlyAvailableArbiter,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
103108
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;SingleReplica;DualReplica;External
104109
// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=HighlyAvailableArbiter;DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
110+
// +optional
105111
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
106112

107113
// infrastructureTopology expresses the expectations for infrastructure services that do not run on control
@@ -113,7 +119,8 @@ type InfrastructureStatus struct {
113119
// NOTE: External topology mode is not applicable for this field.
114120
// +kubebuilder:default=HighlyAvailable
115121
// +kubebuilder:validation:Enum=HighlyAvailable;SingleReplica
116-
InfrastructureTopology TopologyMode `json:"infrastructureTopology"`
122+
// +optional
123+
InfrastructureTopology TopologyMode `json:"infrastructureTopology,omitempty"`
117124

118125
// cpuPartitioning expresses if CPU partitioning is a currently enabled feature in the cluster.
119126
// CPU Partitioning means that this cluster can support partitioning workloads to specific CPU Sets.

config/v1/types_ingress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ type AWSIngressSpec struct {
150150
// +unionDiscriminator
151151
// +kubebuilder:validation:Enum:=NLB;Classic
152152
// +required
153-
Type AWSLBType `json:"type,omitempty"`
153+
Type AWSLBType `json:"type"`
154154
}
155155

156156
type AWSLBType string

0 commit comments

Comments
 (0)