fix: call ensureProjectJWTSecret in AddComponentBatch
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
AddComponent (single-component path) already calls ensureProjectJWTSecret,
but AddComponentBatch has its own parallel implementation that bypassed it.
Components added via the /batch endpoint never had JWT_SECRET provisioned,
causing CrashLoopBackOff on startup ("JWT_SECRET must be set").
Add the call before the createInitialComponentDeployment loop so the secret
is stored in the credential store before K8s Secrets are created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ad1f19739d
commit
a593605caa
@ -297,12 +297,16 @@ func (s *ComponentService) AddComponentBatch(ctx context.Context, projectID stri
|
||||
"components", componentNames,
|
||||
)
|
||||
|
||||
// 9. Create initial K8s deployments for components that need one
|
||||
// 9. Ensure a JWT_SECRET exists for this project (required by skeleton service startup).
|
||||
// Generated once per project on the first code component; reused for all subsequent components.
|
||||
s.ensureProjectJWTSecret(ctx, projectID)
|
||||
|
||||
// 10. Create initial K8s deployments for components that need one
|
||||
for _, comp := range codeComponents {
|
||||
s.createInitialComponentDeployment(ctx, projectID, projectDomain, comp)
|
||||
}
|
||||
|
||||
// 10. Combine infrastructure and code component results
|
||||
// 11. Combine infrastructure and code component results
|
||||
results = append(results, codeComponents...)
|
||||
|
||||
return results, nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user