Skip to content

Commit be81c1c

Browse files
author
rishabh998186
committed
fix: add missing for loop in extractEnvVarsFromManifest.
Signed-off-by: rishabh998186 <[email protected]>
1 parent a4c5ad1 commit be81c1c

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

go/cli/internal/cli/agent/deploy.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,6 @@ func extractEnvVarsFromManifest(manifest *common.AgentManifest) []string {
214214

215215
// Extract from MCP servers
216216
for _, mcpServer := range manifest.McpServers {
217-
if mcpServer.URL != "" {
218-
matches := envVarRegex.FindAllStringSubmatch(mcpServer.URL, -1)
219-
for _, match := range matches {
220-
varName := extractEnvVarName(match)
221-
envVarSet[varName] = true
222-
}
223-
}
224-
225217
// Check headers
226218
for _, headerValue := range mcpServer.Headers {
227219
matches := envVarRegex.FindAllStringSubmatch(headerValue, -1)
@@ -343,17 +335,6 @@ func handleEnvFileSecret(ctx context.Context, k8sClient client.Client, cfg *Depl
343335
}, nil
344336
}
345337

346-
// createNewSecret creates a new Kubernetes secret with the provided API key
347-
func createNewSecret(ctx context.Context, k8sClient client.Client, cfg *DeployCfg, manifest *common.AgentManifest, apiKeyEnvVar string) (string, error) {
348-
secretName := fmt.Sprintf("%s-%s", sanitizeResourceName(manifest.Name), strings.ToLower(manifest.ModelProvider))
349-
350-
if err := createSecret(ctx, k8sClient, cfg.Config.Namespace, secretName, apiKeyEnvVar, cfg.APIKey, IsVerbose(cfg.Config), cfg.DryRun); err != nil {
351-
return "", err
352-
}
353-
354-
return secretName, nil
355-
}
356-
357338
// parseEnvFile reads and parses a .env file, returning a map of environment variable
358339
func parseEnvFile(filePath string) (map[string]string, error) {
359340
file, err := os.Open(filePath)

0 commit comments

Comments
 (0)