Skip to content

Bug 1812019: PackageManifests should include Keywords #1520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pkg/package-server/apis/operators/packagemanifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion, csvJSON
NativeAPIs: csv.Spec.NativeAPIs,
MinKubeVersion: csv.Spec.MinKubeVersion,
RelatedImages: GetImages(csvJSON),
Keywords: csv.Spec.Keywords,
Maturity: csv.Spec.Maturity,
}

icons := make([]Icon, len(csv.Spec.Icon))
Expand All @@ -49,6 +51,22 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion, csvJSON
desc.Icon = icons
}

desc.Links = make([]AppLink, len(csv.Spec.Links))
for i, link := range csv.Spec.Links {
desc.Links[i] = AppLink{
Name: link.Name,
URL: link.URL,
}
}

desc.Maintainers = make([]Maintainer, len(csv.Spec.Maintainers))
for i, maintainer := range csv.Spec.Maintainers {
desc.Maintainers[i] = Maintainer{
Name: maintainer.Name,
Email: maintainer.Email,
}
}

return desc
}

Expand Down
10 changes: 10 additions & 0 deletions pkg/package-server/apis/operators/packagemanifest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ type CSVDescription struct {
// Provider is the CSV's provider
Provider AppLink
Annotations map[string]string
Keywords []string
Links []AppLink
Maintainers []Maintainer
Maturity string

// LongDescription is the CSV's description
LongDescription string
Expand All @@ -122,6 +126,12 @@ type AppLink struct {
URL string
}

// Maintainer defines a project maintainer
type Maintainer struct {
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
}

// Icon defines a base64 encoded icon and media type
type Icon struct {
Base64Data string
Expand Down
18 changes: 18 additions & 0 deletions pkg/package-server/apis/operators/v1/packagemanifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion, csvJSON
NativeAPIs: csv.Spec.NativeAPIs,
MinKubeVersion: csv.Spec.MinKubeVersion,
RelatedImages: GetImages(csvJSON),
Keywords: csv.Spec.Keywords,
Maturity: csv.Spec.Maturity,
}

icons := make([]Icon, len(csv.Spec.Icon))
Expand All @@ -43,6 +45,22 @@ func CreateCSVDescription(csv *operatorsv1alpha1.ClusterServiceVersion, csvJSON
desc.Icon = icons
}

desc.Links = make([]AppLink, len(csv.Spec.Links))
for i, link := range csv.Spec.Links {
desc.Links[i] = AppLink{
Name: link.Name,
URL: link.URL,
}
}

desc.Maintainers = make([]Maintainer, len(csv.Spec.Maintainers))
for i, maintainer := range csv.Spec.Maintainers {
desc.Maintainers[i] = Maintainer{
Name: maintainer.Name,
Email: maintainer.Email,
}
}

return desc
}

Expand Down
13 changes: 13 additions & 0 deletions pkg/package-server/apis/operators/v1/packagemanifest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ type CSVDescription struct {
Provider AppLink `json:"provider,omitempty"`
// +listType=map
Annotations map[string]string `json:"annotations,omitempty"`
// +listType=set
Keywords []string `json:"keywords,omitempty"`
// +listType=set
Links []AppLink `json:"links,omitempty"`
// +listType=set
Maintainers []Maintainer `json:"maintainers,omitempty"`
Maturity string `json:"maturity,omitempty"`

// LongDescription is the CSV's description
LongDescription string `json:"description,omitempty"`
Expand All @@ -124,6 +131,12 @@ type AppLink struct {
URL string `json:"url,omitempty"`
}

// Maintainer defines a project maintainer
type Maintainer struct {
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
}

// Icon defines a base64 encoded icon and media type
type Icon struct {
Base64Data string `json:"base64data,omitempty"`
Expand Down
40 changes: 40 additions & 0 deletions pkg/package-server/apis/operators/v1/zz_generated.conversion.go

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

31 changes: 31 additions & 0 deletions pkg/package-server/apis/operators/v1/zz_generated.deepcopy.go

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

31 changes: 31 additions & 0 deletions pkg/package-server/apis/operators/zz_generated.deepcopy.go

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

86 changes: 85 additions & 1 deletion pkg/package-server/client/openapi/zz_generated.openapi.go

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

Loading