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 16eddef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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 16eddef

Please sign in to comment.