Skip to content

Commit 0a281bc

Browse files
Merge pull request #754 from alecmerdler/OLM-954
Add Provided APIs to PackageManifest
2 parents 6988cbe + c86787a commit 0a281bc

18 files changed

+839
-10
lines changed

pkg/api/apis/operators/v1alpha1/clusterserviceversion_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type NamedInstallStrategy struct {
5050
}
5151

5252
// StatusDescriptor describes a field in a status block of a CRD so that OLM can consume it
53+
// +k8s:openapi-gen=true
5354
type StatusDescriptor struct {
5455
Path string `json:"path"`
5556
DisplayName string `json:"displayName,omitempty"`
@@ -59,6 +60,7 @@ type StatusDescriptor struct {
5960
}
6061

6162
// SpecDescriptor describes a field in a spec block of a CRD so that OLM can consume it
63+
// +k8s:openapi-gen=true
6264
type SpecDescriptor struct {
6365
Path string `json:"path"`
6466
DisplayName string `json:"displayName,omitempty"`
@@ -68,6 +70,7 @@ type SpecDescriptor struct {
6870
}
6971

7072
// ActionDescriptor describes a declarative action that can be performed on a custom resource instance
73+
// +k8s:openapi-gen=true
7174
type ActionDescriptor struct {
7275
Path string `json:"path"`
7376
DisplayName string `json:"displayName,omitempty"`
@@ -77,6 +80,7 @@ type ActionDescriptor struct {
7780
}
7881

7982
// CRDDescription provides details to OLM about the CRDs
83+
// +k8s:openapi-gen=true
8084
type CRDDescription struct {
8185
Name string `json:"name"`
8286
Version string `json:"version"`
@@ -90,6 +94,7 @@ type CRDDescription struct {
9094
}
9195

9296
// APIServiceDescription provides details to OLM about apis provided via aggregation
97+
// +k8s:openapi-gen=true
9398
type APIServiceDescription struct {
9499
Name string `json:"name"`
95100
Group string `json:"group"`
@@ -106,6 +111,7 @@ type APIServiceDescription struct {
106111
}
107112

108113
// APIResourceReference is a Kubernetes resource type used by a custom resource
114+
// +k8s:openapi-gen=true
109115
type APIResourceReference struct {
110116
Name string `json:"name"`
111117
Kind string `json:"kind"`
@@ -121,13 +127,15 @@ func (d APIServiceDescription) GetName() string {
121127
// an operator being ran by ClusterServiceVersion.
122128
//
123129
// If the CRD is present in the Owned list, it is implicitly required.
130+
// +k8s:openapi-gen=true
124131
type CustomResourceDefinitions struct {
125132
Owned []CRDDescription `json:"owned,omitempty"`
126133
Required []CRDDescription `json:"required,omitempty"`
127134
}
128135

129136
// APIServiceDefinitions declares all of the extension apis managed or required by
130137
// an operator being ran by ClusterServiceVersion.
138+
// +k8s:openapi-gen=true
131139
type APIServiceDefinitions struct {
132140
Owned []APIServiceDescription `json:"owned,omitempty"`
133141
Required []APIServiceDescription `json:"required,omitempty"`

pkg/package-server/apis/apps/v1alpha1/packagemanifest_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ type CSVDescription struct {
102102

103103
// InstallModes specify supported installation types
104104
InstallModes []operatorv1alpha1.InstallMode `json:"installModes,omitempty"`
105+
106+
CustomResourceDefinitions operatorv1alpha1.CustomResourceDefinitions `json:"customresourcedefinitions,omitempty"`
107+
APIServiceDefinitions operatorv1alpha1.APIServiceDefinitions `json:"apiservicedefinitions,omitempty"`
105108
}
106109

107110
// AppLink defines a link to an application

pkg/package-server/apis/apps/v1alpha1/zz_generated.conversion.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/package-server/apis/apps/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)