Skip to content

Commit e7debb4

Browse files
awgreenekevinrizza
andcommitted
Surface deprecation information in PackageManifests
Signed-off-by: Alexander Greene <[email protected]> Co-authored-by: Kevin Rizza <[email protected]>
1 parent db965b0 commit e7debb4

File tree

7 files changed

+194
-6
lines changed

7 files changed

+194
-6
lines changed

pkg/package-server/apis/operators/packagemanifest_types.go

+15
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ type PackageManifestStatus struct {
4646
// PackageName is the name of the overall package, ala .
4747
PackageName string
4848

49+
// Deprecation is an optional field which contains information if the package is deprecated.
50+
Deprecation *Deprecation
51+
4952
// Channels are the declared channels for the package, ala .
5053
// +listType=set
5154
Channels []PackageChannel
@@ -81,6 +84,9 @@ type PackageChannel struct {
8184
// CurrentCSVSpec holds the spec of the current CSV
8285
CurrentCSVDesc CSVDescription
8386

87+
// Deprecation is an optional field which contains information if the channel is deprecated.
88+
Deprecation *Deprecation
89+
8490
// Entries lists all CSVs in the channel.
8591
Entries []ChannelEntry
8692
}
@@ -92,6 +98,15 @@ type ChannelEntry struct {
9298

9399
// Version is the version of the bundle for this entry.
94100
Version string
101+
102+
// Deprecation is an optional field which contains information if the channel entry is deprecated.
103+
Deprecation *Deprecation
104+
}
105+
106+
// Deprecation conveys information regarding a deprecated resource.
107+
type Deprecation struct {
108+
// Message is a human readable message describing the deprecation.
109+
Message string
95110
}
96111

97112
// CSVDescription defines a description of a CSV

pkg/package-server/apis/operators/v1/packagemanifest_types.go

+15
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ type PackageManifestStatus struct {
4646
// PackageName is the name of the overall package, ala `etcd`.
4747
PackageName string `json:"packageName"`
4848

49+
// Deprecation is an optional field which contains information if the package is deprecated.
50+
Deprecation *Deprecation `json:"deprecation,omitempty"`
51+
4952
// Channels are the declared channels for the package, ala `stable` or `alpha`.
5053
// +listType=set
5154
Channels []PackageChannel `json:"channels"`
@@ -56,6 +59,12 @@ type PackageManifestStatus struct {
5659
DefaultChannel string `json:"defaultChannel"`
5760
}
5861

62+
// Deprecation conveys information regarding a deprecated resource.
63+
type Deprecation struct {
64+
// Message is a human readable message describing the deprecation.
65+
Message string `json:"message"`
66+
}
67+
5968
// GetDefaultChannel gets the default channel or returns the only one if there's only one. returns empty string if it
6069
// can't determine the default
6170
func (m PackageManifest) GetDefaultChannel() string {
@@ -81,6 +90,9 @@ type PackageChannel struct {
8190
// CurrentCSVSpec holds the spec of the current CSV
8291
CurrentCSVDesc CSVDescription `json:"currentCSVDesc,omitempty"`
8392

93+
// Deprecation is an optional field which contains information if the channel is deprecated.
94+
Deprecation *Deprecation `json:"deprecation,omitempty"`
95+
8496
// Entries lists all CSVs in the channel, with their upgrade edges.
8597
Entries []ChannelEntry `json:"entries"`
8698
}
@@ -92,6 +104,9 @@ type ChannelEntry struct {
92104

93105
// Version is the version of the bundle for this entry.
94106
Version string `json:"version,omitempty"`
107+
108+
// Deprecation is an optional field which contains information if the channel entry is deprecated.
109+
Deprecation *Deprecation `json:"deprecation,omitempty"`
95110
}
96111

97112
// CSVDescription defines a description of a CSV

pkg/package-server/apis/operators/v1/zz_generated.conversion.go

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/package-server/apis/operators/v1/zz_generated.deepcopy.go

+34-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/package-server/apis/operators/zz_generated.deepcopy.go

+34-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/package-server/client/openapi/zz_generated.openapi.go

+45-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)