Skip to content

Commit f451641

Browse files
dinhxuanvuJeff Peeler
authored andcommitted
fix(packagemanifest): Add InstallModes info from CSV to PackageManifest
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 <[email protected]>
1 parent f63e36a commit f451641

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ require (
3838
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6 // indirect
3939
k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429
4040
k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd
41-
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2
41+
k8s.io/kubernetes v1.11.8-beta.0.0.20190131222539-8546c0ceb197
4242
)

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,4 @@ k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH
316316
k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
317317
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2 h1:Q4hIsjqTbRprTaPk+gVDUuVipXpGJtTz7Lg2FS3xpmw=
318318
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
319+
k8s.io/kubernetes v1.11.8-beta.0.0.20190131222539-8546c0ceb197/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=

pkg/package-server/apis/packagemanifest/v1alpha1/packagemanifest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion) CSVDescr
1313
},
1414
Annotations: csv.GetAnnotations(),
1515
LongDescription: csv.Spec.Description,
16+
InstallModes: csv.Spec.InstallModes,
1617
}
1718

1819
icons := make([]Icon, len(csv.Spec.Icon))

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package v1alpha1
22

33
import (
44
"github.com/coreos/go-semver/semver"
5+
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
56
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
67
)
78

@@ -98,6 +99,9 @@ type CSVDescription struct {
9899

99100
// LongDescription is the CSV's description
100101
LongDescription string `json:"description,omitempty"`
102+
103+
// InstallModes specify supported installation types
104+
InstallModes []v1alpha1.InstallMode `json:"installModes,omitempty"`
101105
}
102106

103107
// AppLink defines a link to an application

0 commit comments

Comments
 (0)