Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cloud/plugin/load_db/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ import (
"px.dev/pixie/src/utils"
)

const githubArchiveTmpl = "https://api.github.com/repos/%s/tarball"
const githubArchiveTmpl = "https://%s/repos/%s/tarball"

// NOTE: After changing this file, remember to push a generated image by running
// bazel run //src/cloud/plugin/load_db:push_plugin_db_updater_image
func init() {
pflag.String("plugin_repo", "pixie-io/pixie-plugin", "The name of the plugin repo.")
pflag.String("plugin_service", "plugin-service.plc.svc.cluster.local:50600", "The plugin service url (load balancer/list is ok)")
pflag.String("domain_name", "dev.withpixie.dev", "The domain name of Pixie Cloud")
pflag.String("gh_api_host", "api.github.com", "The GitHub API host (e.g. api.github.com for github.com, or ghe.example.com/api/v3 for GitHub Enterprise Server)")
}

func initDB() *sqlx.DB {
Expand Down Expand Up @@ -98,7 +99,7 @@ func loadPlugins(db *sqlx.DB) {
}

client := http.Client{}
req, err := http.NewRequest("GET", fmt.Sprintf(githubArchiveTmpl, pluginRepo), nil)
req, err := http.NewRequest("GET", fmt.Sprintf(githubArchiveTmpl, viper.GetString("gh_api_host"), pluginRepo), nil)
if err != nil {
log.WithError(err).Fatal("Failed to create req")
}
Expand Down
Loading