mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-03 08:38:52 +00:00
Refactor components status check
- run install/bootstrap checks in parallel (1m timeout) - list not found components Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
c708e390a7
commit
e055c9ddc1
5 changed files with 60 additions and 49 deletions
|
|
@ -126,7 +126,7 @@ func generateInstallManifests(targetPath, namespace, tmpDir string, localManifes
|
|||
opts := install.Options{
|
||||
BaseURL: localManifests,
|
||||
Version: bootstrapArgs.version,
|
||||
Namespace: rootArgs.namespace,
|
||||
Namespace: namespace,
|
||||
Components: bootstrapComponents(),
|
||||
Registry: bootstrapArgs.registry,
|
||||
ImagePullSecret: bootstrapArgs.imagePullSecret,
|
||||
|
|
@ -162,14 +162,14 @@ func applyInstallManifests(ctx context.Context, manifestPath string, components
|
|||
return fmt.Errorf("install failed")
|
||||
}
|
||||
|
||||
statusChecker := StatusChecker{}
|
||||
err := statusChecker.New(time.Second, rootArgs.timeout)
|
||||
statusChecker, err := NewStatusChecker(time.Second, time.Minute)
|
||||
if err != nil {
|
||||
return fmt.Errorf("install failed with: %v", err)
|
||||
return fmt.Errorf("install failed: %w", err)
|
||||
}
|
||||
err = statusChecker.Assess(components...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("install timed out waiting for rollout")
|
||||
|
||||
logger.Waitingf("verifying installation")
|
||||
if err := statusChecker.Assess(components...); err != nil {
|
||||
return fmt.Errorf("install failed")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue