@@ -50,18 +50,21 @@ type InstallModeSet map[InstallModeType]bool
50
50
51
51
// NamedInstallStrategy represents the block of an ClusterServiceVersion resource
52
52
// where the install strategy is specified.
53
+ // +k8s:openapi-gen=true
53
54
type NamedInstallStrategy struct {
54
55
StrategyName string `json:"strategy"`
55
56
StrategySpec StrategyDetailsDeployment `json:"spec,omitempty"`
56
57
}
57
58
58
59
// StrategyDeploymentPermissions describe the rbac rules and service account needed by the install strategy
60
+ // +k8s:openapi-gen=true
59
61
type StrategyDeploymentPermissions struct {
60
62
ServiceAccountName string `json:"serviceAccountName"`
61
63
Rules []rbac.PolicyRule `json:"rules"`
62
64
}
63
65
64
66
// StrategyDeploymentSpec contains the name, spec and labels for the deployment ALM should create
67
+ // +k8s:openapi-gen=true
65
68
type StrategyDeploymentSpec struct {
66
69
Name string `json:"name"`
67
70
Spec appsv1.DeploymentSpec `json:"spec"`
@@ -70,6 +73,7 @@ type StrategyDeploymentSpec struct {
70
73
71
74
// StrategyDetailsDeployment represents the parsed details of a Deployment
72
75
// InstallStrategy.
76
+ // +k8s:openapi-gen=true
73
77
type StrategyDetailsDeployment struct {
74
78
DeploymentSpecs []StrategyDeploymentSpec `json:"deployments"`
75
79
Permissions []StrategyDeploymentPermissions `json:"permissions,omitempty"`
@@ -265,6 +269,7 @@ type APIServiceDefinitions struct {
265
269
266
270
// ClusterServiceVersionSpec declarations tell OLM how to install an operator
267
271
// that can manage apps for a given version.
272
+ // +k8s:openapi-gen=true
268
273
type ClusterServiceVersionSpec struct {
269
274
InstallStrategy NamedInstallStrategy `json:"install"`
270
275
Version version.OperatorVersion `json:"version,omitempty"`
@@ -321,25 +326,30 @@ type ClusterServiceVersionSpec struct {
321
326
RelatedImages []RelatedImage `json:"relatedImages,omitempty"`
322
327
}
323
328
329
+ // +k8s:openapi-gen=true
324
330
type CleanupSpec struct {
325
331
Enabled bool `json:"enabled"`
326
332
}
327
333
334
+ // +k8s:openapi-gen=true
328
335
type Maintainer struct {
329
336
Name string `json:"name,omitempty"`
330
337
Email string `json:"email,omitempty"`
331
338
}
332
339
340
+ // +k8s:openapi-gen=true
333
341
type AppLink struct {
334
342
Name string `json:"name,omitempty"`
335
343
URL string `json:"url,omitempty"`
336
344
}
337
345
346
+ // +k8s:openapi-gen=true
338
347
type Icon struct {
339
348
Data string `json:"base64data"`
340
349
MediaType string `json:"mediatype"`
341
350
}
342
351
352
+ // +k8s:openapi-gen=true
343
353
type RelatedImage struct {
344
354
Name string `json:"name"`
345
355
Image string `json:"image"`
@@ -418,6 +428,7 @@ func (c *ClusterServiceVersion) HasCAResources() bool {
418
428
}
419
429
420
430
// Conditions appear in the status as a record of state transitions on the ClusterServiceVersion
431
+ // +k8s:openapi-gen=true
421
432
type ClusterServiceVersionCondition struct {
422
433
// Condition of the ClusterServiceVersion
423
434
Phase ClusterServiceVersionPhase `json:"phase,omitempty"`
@@ -473,6 +484,7 @@ const (
473
484
)
474
485
475
486
// DependentStatus is the status for a dependent requirement (to prevent infinite nesting)
487
+ // +k8s:openapi-gen=true
476
488
type DependentStatus struct {
477
489
Group string `json:"group"`
478
490
Version string `json:"version"`
@@ -482,6 +494,7 @@ type DependentStatus struct {
482
494
Message string `json:"message,omitempty"`
483
495
}
484
496
497
+ // +k8s:openapi-gen=true
485
498
type RequirementStatus struct {
486
499
Group string `json:"group"`
487
500
Version string `json:"version"`
@@ -495,6 +508,7 @@ type RequirementStatus struct {
495
508
496
509
// ClusterServiceVersionStatus represents information about the status of a CSV. Status may trail the actual
497
510
// state of a system.
511
+ // +k8s:openapi-gen=true
498
512
type ClusterServiceVersionStatus struct {
499
513
// Current condition of the ClusterServiceVersion
500
514
Phase ClusterServiceVersionPhase `json:"phase,omitempty"`
@@ -527,6 +541,7 @@ type ClusterServiceVersionStatus struct {
527
541
}
528
542
529
543
// CleanupStatus represents information about the status of cleanup while a CSV is pending deletion
544
+ // +k8s:openapi-gen=true
530
545
type CleanupStatus struct {
531
546
// PendingDeletion is the list of custom resource objects that are pending deletion and blocked on finalizers.
532
547
// This indicates the progress of cleanup that is blocking CSV deletion or operator uninstall.
@@ -535,12 +550,14 @@ type CleanupStatus struct {
535
550
}
536
551
537
552
// ResourceList represents a list of resources which are of the same Group/Kind
553
+ // +k8s:openapi-gen=true
538
554
type ResourceList struct {
539
555
Group string `json:"group"`
540
556
Kind string `json:"kind"`
541
557
Instances []ResourceInstance `json:"instances"`
542
558
}
543
559
560
+ // +k8s:openapi-gen=true
544
561
type ResourceInstance struct {
545
562
Name string `json:"name"`
546
563
// Namespace can be empty for cluster-scoped resources
0 commit comments