Loading charts/meep-sandbox-api/values.yaml +7 −4 Original line number Diff line number Diff line Loading @@ -31,16 +31,19 @@ image: pullPolicy: Always env: MEEP_SVC_PATH: /sandbox-api/v1 MEEP_OAUTH_GITHUB_ENABLED: "" MEEP_OAUTH_GITHUB_AUTH_URL: "" MEEP_OAUTH_GITHUB_POLL_URL: "" envSecret: MEEP_SESSION_KEY: name: meep-session key: encryption-key MEEP_OAUTH_GITHUB_CLIENT_ID: name: meep-oauth-github name: github-secret key: client-id # MEEP_OAUTH_GITHUB_SECRET: # name: meep-oauth-github # key: secret MEEP_OAUTH_GITHUB_SECRET: name: meep-secret key: secret service: type: ClusterIP Loading go-apps/meep-sandbox-api/server/sandbox_api.go +6 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ const redisTable = 0 const moduleName = "meep-sandbox-api" const moduleNamespace = "default" var baseKey string var request_url string = "https://github.com/login/device/code" var pollingRequestUrl string = "https://github.com/login/oauth/access_token" const authBasepath = "http://meep-auth-svc//auth/v1" const sbxCtrlUrl = "http://192.168.10.42" //"http://meep-sandbox-ctrl" const pfmCtrlBasepath = "http://meep-platform-ctrl/platform-ctrl/v1" Loading Loading @@ -327,12 +324,17 @@ func login(w http.ResponseWriter, r *http.Request) { metric.User = userId clientID := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_CLIENT_ID")) requestUrl := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_AUTH_URL")) pollingRequestUrl := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_POLL_URL")) log.Info("Client ID is ", clientID) log.Info("REQUEST URL is ", requestUrl) log.Info("POLLING REQUEST URL is ", pollingRequestUrl) // Prepare the request body body := strings.NewReader(fmt.Sprintf(`{"client_id": "%s"}`, clientID)) // Create a new HTTP request req, err := http.NewRequest("POST", request_url, body) req, err := http.NewRequest("POST", requestUrl, body) if err != nil { log.Info("Error creating request:", err) return Loading go-apps/meepctl/cmd/deploy.go +5 −1 Original line number Diff line number Diff line Loading @@ -495,20 +495,24 @@ func deployRunScriptsAndGetFlags(targetName string, chart string, cobraCmd *cobr flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_GC_POSTGIS_ENABLED="+strconv.FormatBool(gcPostgisEnabled)) } case "meep-sandbox-api": authEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.enabled") sessionKeySecret := utils.RepoCfg.GetString("repo.deployment.auth.session.key-secret") if sessionKeySecret != "" { flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_SESSION_KEY.name="+sessionKeySecret) } githubEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.github.enabled") if githubEnabled { authUrl := utils.RepoCfg.GetString("repo.deployment.auth.github.auth-url") secret := utils.RepoCfg.GetString("repo.deployment.auth.github.secret") pollUrl := utils.RepoCfg.GetString("repo.deployment.auth.github.poll-url") flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_ENABLED=true") flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_AUTH_URL="+authUrl) flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_POLL_URL="+pollUrl) if secret != "" { flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_OAUTH_GITHUB_CLIENT_ID.name="+secret) flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_OAUTH_GITHUB_SECRET.name="+secret) } } authEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.enabled") if authEnabled { flags = utils.HelmFlags(flags, "--set", authUrlAnnotation+"="+authUrl+"?svc=meep-sandbox-api") } Loading Loading
charts/meep-sandbox-api/values.yaml +7 −4 Original line number Diff line number Diff line Loading @@ -31,16 +31,19 @@ image: pullPolicy: Always env: MEEP_SVC_PATH: /sandbox-api/v1 MEEP_OAUTH_GITHUB_ENABLED: "" MEEP_OAUTH_GITHUB_AUTH_URL: "" MEEP_OAUTH_GITHUB_POLL_URL: "" envSecret: MEEP_SESSION_KEY: name: meep-session key: encryption-key MEEP_OAUTH_GITHUB_CLIENT_ID: name: meep-oauth-github name: github-secret key: client-id # MEEP_OAUTH_GITHUB_SECRET: # name: meep-oauth-github # key: secret MEEP_OAUTH_GITHUB_SECRET: name: meep-secret key: secret service: type: ClusterIP Loading
go-apps/meep-sandbox-api/server/sandbox_api.go +6 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ const redisTable = 0 const moduleName = "meep-sandbox-api" const moduleNamespace = "default" var baseKey string var request_url string = "https://github.com/login/device/code" var pollingRequestUrl string = "https://github.com/login/oauth/access_token" const authBasepath = "http://meep-auth-svc//auth/v1" const sbxCtrlUrl = "http://192.168.10.42" //"http://meep-sandbox-ctrl" const pfmCtrlBasepath = "http://meep-platform-ctrl/platform-ctrl/v1" Loading Loading @@ -327,12 +324,17 @@ func login(w http.ResponseWriter, r *http.Request) { metric.User = userId clientID := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_CLIENT_ID")) requestUrl := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_AUTH_URL")) pollingRequestUrl := strings.TrimSpace(os.Getenv("MEEP_OAUTH_GITHUB_POLL_URL")) log.Info("Client ID is ", clientID) log.Info("REQUEST URL is ", requestUrl) log.Info("POLLING REQUEST URL is ", pollingRequestUrl) // Prepare the request body body := strings.NewReader(fmt.Sprintf(`{"client_id": "%s"}`, clientID)) // Create a new HTTP request req, err := http.NewRequest("POST", request_url, body) req, err := http.NewRequest("POST", requestUrl, body) if err != nil { log.Info("Error creating request:", err) return Loading
go-apps/meepctl/cmd/deploy.go +5 −1 Original line number Diff line number Diff line Loading @@ -495,20 +495,24 @@ func deployRunScriptsAndGetFlags(targetName string, chart string, cobraCmd *cobr flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_GC_POSTGIS_ENABLED="+strconv.FormatBool(gcPostgisEnabled)) } case "meep-sandbox-api": authEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.enabled") sessionKeySecret := utils.RepoCfg.GetString("repo.deployment.auth.session.key-secret") if sessionKeySecret != "" { flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_SESSION_KEY.name="+sessionKeySecret) } githubEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.github.enabled") if githubEnabled { authUrl := utils.RepoCfg.GetString("repo.deployment.auth.github.auth-url") secret := utils.RepoCfg.GetString("repo.deployment.auth.github.secret") pollUrl := utils.RepoCfg.GetString("repo.deployment.auth.github.poll-url") flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_ENABLED=true") flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_AUTH_URL="+authUrl) flags = utils.HelmFlags(flags, "--set", "image.env.MEEP_OAUTH_GITHUB_POLL_URL="+pollUrl) if secret != "" { flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_OAUTH_GITHUB_CLIENT_ID.name="+secret) flags = utils.HelmFlags(flags, "--set", "image.envSecret.MEEP_OAUTH_GITHUB_SECRET.name="+secret) } } authEnabled := utils.RepoCfg.GetBool("repo.deployment.auth.enabled") if authEnabled { flags = utils.HelmFlags(flags, "--set", authUrlAnnotation+"="+authUrl+"?svc=meep-sandbox-api") } Loading