Skip to content

Commit

Permalink
Merge pull request operator-framework#754 from alecmerdler/OLM-954
Browse files Browse the repository at this point in the history
Add Provided APIs to PackageManifest
  • Loading branch information
openshift-merge-robot authored May 21, 2019
2 parents 6988cbe + c86787a commit 0a281bc
Show file tree
Hide file tree
Showing 18 changed files with 839 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type NamedInstallStrategy struct {
}

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

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

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

// CRDDescription provides details to OLM about the CRDs
// +k8s:openapi-gen=true
type CRDDescription struct {
Name string `json:"name"`
Version string `json:"version"`
Expand All @@ -90,6 +94,7 @@ type CRDDescription struct {
}

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

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

// APIServiceDefinitions declares all of the extension apis managed or required by
// an operator being ran by ClusterServiceVersion.
// +k8s:openapi-gen=true
type APIServiceDefinitions struct {
Owned []APIServiceDescription `json:"owned,omitempty"`
Required []APIServiceDescription `json:"required,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ type CSVDescription struct {

// InstallModes specify supported installation types
InstallModes []operatorv1alpha1.InstallMode `json:"installModes,omitempty"`

CustomResourceDefinitions operatorv1alpha1.CustomResourceDefinitions `json:"customresourcedefinitions,omitempty"`
APIServiceDefinitions operatorv1alpha1.APIServiceDefinitions `json:"apiservicedefinitions,omitempty"`
}

// AppLink defines a link to an application
Expand Down

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

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

Loading

0 comments on commit 0a281bc

Please sign in to comment.