Skip to content

Commit

Permalink
Merge pull request #447 from kube-tarian/plugin-config-chg
Browse files Browse the repository at this point in the history
plugin config with version specific config data
  • Loading branch information
vramk23 authored Mar 31, 2024
2 parents 15bb00d + 81a1fa8 commit b3cafeb
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 191 deletions.
7 changes: 0 additions & 7 deletions proto/plugin_store.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ message PluginData {
string category = 4;
repeated string versions = 5;
bytes icon = 6;
string chartName = 7;
string chartRepo = 8;
string defaultNamespace = 9;
bool privilegedNamespace = 10;
string apiEndpoint = 11;
string uiEndpoint = 12;
repeated string capabilities = 13;
}

message ConfigurePluginStoreRequest {
Expand Down
88 changes: 8 additions & 80 deletions server/pkg/pb/pluginstorepb/plugin_store.pb.go

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

37 changes: 23 additions & 14 deletions server/pkg/plugin-store/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type Config struct {
PluginsStoreProjectMount string `envconfig:"PLUGIN_STORE_PROJECT_MOUNT" default:"/plugin-store-clone"`
PluginsStorePath string `envconfig:"PLUGIN_STORE_PATH" default:"/plugin-store"`
PluginsFileName string `envconfig:"PLUGIN_LIST_FILE" default:"plugin-list.yaml"`
PluginFileName string `envconfig:"PLUGIN_FILE" default:"plugin.yaml"`
PluginConfigFileName string `envconfig:"PLUGIN_CONFIG_FILE" default:"plugin-config.yaml"`
PluginStoreProjectURL string `envconfig:"PLUGIN_STORE_PROJECT_URL" default:"https://github.com/intelops/capten-plugins"`
PluginStoreProjectAccess string `envconfig:"PLUGIN_STORE_PROJECT_ACCESS" default:""`
PluginStoreProjectID string `envconfig:"PLUGIN_STORE_PROJECT_ID" default:"1cf5201d-5f35-4d5b-afe0-4b9d0e0d4cd2"`
Expand All @@ -34,25 +36,32 @@ type PluginListData struct {
Plugins []string `yaml:"plugins"`
}

type Deployment struct {
ControlplaneCluster *DeploymentConfig `yaml:"controlplaneCluster"`
BussinessCluster *DeploymentConfig `yaml:"bussinessCluster"`
}

type DeploymentConfig struct {
Versions []string `yaml:"versions"`
ChartName string `yaml:"chartName"`
ChartRepo string `yaml:"chartRepo"`
DefaultNamespace string `yaml:"defaultNamespace"`
PrivilegedNamespace bool `yaml:"privilegedNamespace"`
Version string `yaml:"version"`
ChartName string `yaml:"chartName"`
ChartRepo string `yaml:"chartRepo"`
DefaultNamespace string `yaml:"defaultNamespace"`
PrivilegedNamespace bool `yaml:"privilegedNamespace"`
ValuesFile string `yaml:"valuesFile"`
}

type PluginConfig struct {
ApiEndpoint string `yaml:"apiEndpoint"`
UiEndpoint string `yaml:"uiEndpoint"`
Capabilities []string `yaml:"capabilities"`
Deployment Deployment `yaml:"deployment"`
ApiEndpoint string `yaml:"apiEndpoint"`
UIEndpoint string `yaml:"uiEndpoint"`
UIModulePackageURL string `yaml:"uiModulePackageURL"`
Capabilities []string `yaml:"capabilities"`
}

type Plugin struct {
PluginName string `yaml:"pluginName"`
Description string `yaml:"description"`
Category string `yaml:"category"`
Icon string `yaml:"icon"`
DeploymentConfig DeploymentConfig `yaml:"deploymentConfig"`
PluginConfig PluginConfig `yaml:"pluginConfig"`
PluginName string `yaml:"pluginName"`
Description string `yaml:"description"`
Category string `yaml:"category"`
Icon string `yaml:"icon"`
Versions []string `yaml:"versions"`
}
Loading

0 comments on commit b3cafeb

Please sign in to comment.