Skip to content

Commit

Permalink
fix(packagemanifest): Add InstallModes info from CSV to PackageManifest
Browse files Browse the repository at this point in the history
PackageManifest is missing InstallModes information from CSV.
Each CSVDescription should have the spec.installModes from the
ClusterServiceVersion copied as well. This allows us to compare
PackageManifests to potential OperatorGroups that they would be
installed into and prevent errors.

Signed-off-by: Vu Dinh <vdinh@redhat.com>
  • Loading branch information
dinhxuanvu committed Feb 1, 2019
1 parent 63ac85a commit 2a50f24
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ require (
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6 // indirect
k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429
k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2
k8s.io/kubernetes v1.11.8-beta.0.0.20190131222539-8546c0ceb197
)
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,4 @@ k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH
k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2 h1:Q4hIsjqTbRprTaPk+gVDUuVipXpGJtTz7Lg2FS3xpmw=
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/kubernetes v1.11.8-beta.0.0.20190131222539-8546c0ceb197/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion) CSVDescr
},
Annotations: csv.GetAnnotations(),
LongDescription: csv.Spec.Description,
InstallModes: csv.Spec.InstallModes,
}

icons := make([]Icon, len(csv.Spec.Icon))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v1alpha1

import (
"github.com/coreos/go-semver/semver"
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -98,6 +99,9 @@ type CSVDescription struct {

// LongDescription is the CSV's description
LongDescription string `json:"description,omitempty"`

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

// AppLink defines a link to an application
Expand Down

0 comments on commit 2a50f24

Please sign in to comment.