mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
bootstrapper: calculate duration for all Helm charts
This commit is contained in:
parent
4bf2498793
commit
c1112addff
@ -214,9 +214,14 @@ func (h *Client) install(ctx context.Context, chartRaw []byte, values map[string
|
||||
// Other errors will not be retried.
|
||||
newCtx, cancel := context.WithTimeout(ctx, 10*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
retryLoopStartTime := time.Now()
|
||||
if err := retrier.Do(newCtx); err != nil {
|
||||
return fmt.Errorf("helm install: %w", err)
|
||||
}
|
||||
retryLoopFinishDuration := time.Since(retryLoopStartTime)
|
||||
h.log.With(zap.String("chart", chart.Name()), zap.Duration("duration", retryLoopFinishDuration)).Infof("Helm chart installation finished")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -230,7 +235,7 @@ type installDoer struct {
|
||||
|
||||
// Do logs which chart is installed and tries to install it.
|
||||
func (i installDoer) Do(ctx context.Context) error {
|
||||
i.log.With(zap.String("chart", i.chart.Name())).Infof("Trying to install helm chart")
|
||||
i.log.With(zap.String("chart", i.chart.Name())).Infof("Trying to install Helm chart")
|
||||
|
||||
_, err := i.client.RunWithContext(ctx, i.chart, i.values)
|
||||
|
||||
|
@ -248,12 +248,10 @@ func (k *KubeWrapper) InitCluster(
|
||||
|
||||
// cert-manager is necessary for our operator deployments.
|
||||
log.Infof("Installing cert-manager")
|
||||
timeToStartWaiting = time.Now()
|
||||
if err = k.helmClient.InstallCertManager(ctx, helmReleases.CertManager); err != nil {
|
||||
return nil, fmt.Errorf("installing cert-manager: %w", err)
|
||||
}
|
||||
timeUntilFinishedWaiting = time.Since(timeToStartWaiting)
|
||||
log.With(zap.Duration("duration", timeUntilFinishedWaiting)).Infof("cert-manager installation finished")
|
||||
|
||||
operatorVals, err := k.setupOperatorVals(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("setting up operator vals: %w", err)
|
||||
|
Loading…
Reference in New Issue
Block a user