Feat: add new fields for addon metadata (#5845)

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
This commit is contained in:
Jianbo Sun
2023-04-14 17:16:38 +08:00
committed by GitHub
parent 7b2e294a88
commit 863da991bc
2 changed files with 16 additions and 12 deletions

View File

@@ -83,17 +83,21 @@ type WholeAddonPackage struct {
// Meta defines the format for a single addon
type Meta struct {
Name string `json:"name" validate:"required"`
Version string `json:"version"`
Description string `json:"description"`
Icon string `json:"icon"`
URL string `json:"url,omitempty"`
Tags []string `json:"tags,omitempty"`
Name string `json:"name" validate:"required"`
Version string `json:"version"`
Description string `json:"description"`
Icon string `json:"icon"`
URL string `json:"url,omitempty"`
Tags []string `json:"tags,omitempty"`
// UXPlugins used for velaux plugins download/install with the use of addon registry.
UXPlugins map[string]string `json:"uxPlugins,omitempty"`
DeployTo *DeployTo `json:"deployTo,omitempty"`
Dependencies []*Dependency `json:"dependencies,omitempty"`
NeedNamespace []string `json:"needNamespace,omitempty"`
Invisible bool `json:"invisible"`
SystemRequirements *SystemRequirements `json:"system,omitempty"`
// Annotations used for addon maintainers to add their own description or extensions to metadata.
Annotations map[string]string `json:"annotations,omitempty"`
}
// DeployTo defines where the addon to deploy to

View File

@@ -124,12 +124,12 @@ func init() {
// HTTPOption define the https options
type HTTPOption struct {
Username string
Password string
CaFile string
CertFile string
KeyFile string
InsecureSkipTLS bool
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
CaFile string `json:"caFile,omitempty"`
CertFile string `json:"certFile,omitempty"`
KeyFile string `json:"keyFile,omitempty"`
InsecureSkipTLS bool `json:"insecureSkipTLS,omitempty"`
}
// InitBaseRestConfig will return reset config for create controller runtime client