Skip to content

Commit

Permalink
feat: project add extendAddress field in order to allow more extensio…
Browse files Browse the repository at this point in the history
…ns to the plug-in project address
  • Loading branch information
Jeremy-boo committed Mar 22, 2023
1 parent a1c45d8 commit a88f519
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions apis/meta/v1alpha1/project_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,17 @@ const (
// TODO: add more subtypes
)

// ExtendAddressKey The name of the plugin extension url, only dependencyAddress is supported for now.
// TODO: add more key for the plugin extension url.
type ExtendAddressKey string

const (
// DependencyAddressExtendKey describes the dependency repository address provided by the plugin
// If the tool has an independent dependency repository address,
// use this field to indicate, if not, take the same value as address
DependencyAddressExtendKey ExtendAddressKey = "dependencyAddress"
)

var ProjectGVK = GroupVersion.WithKind("Project")
var ProjectListGVK = GroupVersion.WithKind("ProjectList")

Expand All @@ -172,11 +183,9 @@ type ProjectSpec struct {
// +optional
Access *duckv1.Addressable `json:"access,omitempty"`

// DependencyAddress stores the tool depends on the url the repository.
// If the tool has an independent dependency repository address,
// use this field to indicate, if not, take the same value as address
// ExtendAddress stores the tool extend url which has different repository than address.
// +optional
DependencyAddress *duckv1.Addressable `json:"dependencyAddress,omitempty"`
ExtendAddress map[ExtendAddressKey]*duckv1.Addressable `json:"extendAddress,omitempty"`

// project subtype
// +kubebuilder:default="Project"
Expand Down

0 comments on commit a88f519

Please sign in to comment.