You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cloud/indexer/indexer_server.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ func init() {
51
51
52
52
pflag.String("md_index_name", "", "The elastic index name for metadata.")
53
53
pflag.String("md_index_max_age", "", "The amount of time before rolling over the elastic index as a string, eg '30d'")
54
-
pflag.String("md_index_delete_after", "", "The amount of time after rollover to delete old elastic indices, as a string, eg '30d'")
54
+
pflag.String("md_index_delete_after", "", "The amount of time after rollover to delete old elastic indices, as a string, eg '30d'.")
55
55
pflag.Int("md_index_replicas", 4, "The number of replicas to setup for the metadata index.")
56
56
pflag.Bool("md_manual_index_management", false, "Skip creation of managed elastic indices. Requires manually deploying an elastic index with md_index_name")
// bazel run //src/cloud/plugin/load_db:push_plugin_db_updater_image
57
58
funcinit() {
58
59
pflag.String("plugin_repo", "pixie-io/pixie-plugin", "The name of the plugin repo.")
60
+
pflag.String("plugin_dir", "", "Local directory containing plugin configs. When set, plugins are loaded from this directory instead of fetching from GitHub. Expected structure: <plugin_dir>/<plugin_name>/{plugin.yaml,retention.yaml}")
59
61
pflag.String("plugin_service", "plugin-service.plc.svc.cluster.local:50600", "The plugin service url (load balancer/list is ok)")
60
62
pflag.String("domain_name", "dev.withpixie.dev", "The domain name of Pixie Cloud")
61
63
}
@@ -92,11 +94,55 @@ type configSet struct {
92
94
varconfigsByPath=make(map[string]*configSet)
93
95
94
96
funcloadPlugins(db*sqlx.DB) {
97
+
pluginDir:=viper.GetString("plugin_dir")
98
+
ifpluginDir!="" {
99
+
ifloadPluginsFromDir(pluginDir, db) {
100
+
log.Infof("Loaded plugins from local directory: %s", pluginDir)
101
+
return
102
+
}
103
+
log.Infof("Plugin directory %s is empty or missing, falling back to GitHub", pluginDir)
104
+
}
105
+
95
106
pluginRepo:=viper.GetString("plugin_repo")
96
107
ifpluginRepo=="" {
97
-
log.Fatal("Must specify --plugin_repo")
108
+
log.Fatal("Must specify --plugin_repo or --plugin_dir")
98
109
}
99
110
111
+
loadPluginsFromGitHub(pluginRepo, db)
112
+
}
113
+
114
+
// loadPluginsFromDir walks a local directory for plugin YAML files.
115
+
// Returns true if any files were found and processed.
0 commit comments