Skip to content

Commit a4c5ad1

Browse files
author
rishabh998186
committed
fix: complete createNewSecret function body after merge conflict
Signed-off-by: rishabh998186 <[email protected]>
1 parent 4016b1f commit a4c5ad1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,15 @@ func handleEnvFileSecret(ctx context.Context, k8sClient client.Client, cfg *Depl
346346
// createNewSecret creates a new Kubernetes secret with the provided API key
347347
func createNewSecret(ctx context.Context, k8sClient client.Client, cfg *DeployCfg, manifest *common.AgentManifest, apiKeyEnvVar string) (string, error) {
348348
secretName := fmt.Sprintf("%s-%s", sanitizeResourceName(manifest.Name), strings.ToLower(manifest.ModelProvider))
349-
// parseEnvFile reads and parses a .env file, returning a map of environment variables
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+
357+
// parseEnvFile reads and parses a .env file, returning a map of environment variable
350358
func parseEnvFile(filePath string) (map[string]string, error) {
351359
file, err := os.Open(filePath)
352360
if err != nil {

0 commit comments

Comments
 (0)