mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-08 06:52:26 -04:00
bootstrapper: calculate duration for all Helm charts
This commit is contained in:
parent
4bf2498793
commit
c1112addff
2 changed files with 7 additions and 4 deletions
|
@ -214,9 +214,14 @@ func (h *Client) install(ctx context.Context, chartRaw []byte, values map[string
|
||||||
// Other errors will not be retried.
|
// Other errors will not be retried.
|
||||||
newCtx, cancel := context.WithTimeout(ctx, 10*time.Minute)
|
newCtx, cancel := context.WithTimeout(ctx, 10*time.Minute)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
retryLoopStartTime := time.Now()
|
||||||
if err := retrier.Do(newCtx); err != nil {
|
if err := retrier.Do(newCtx); err != nil {
|
||||||
return fmt.Errorf("helm install: %w", err)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +235,7 @@ type installDoer struct {
|
||||||
|
|
||||||
// Do logs which chart is installed and tries to install it.
|
// Do logs which chart is installed and tries to install it.
|
||||||
func (i installDoer) Do(ctx context.Context) error {
|
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)
|
_, 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.
|
// cert-manager is necessary for our operator deployments.
|
||||||
log.Infof("Installing cert-manager")
|
log.Infof("Installing cert-manager")
|
||||||
timeToStartWaiting = time.Now()
|
|
||||||
if err = k.helmClient.InstallCertManager(ctx, helmReleases.CertManager); err != nil {
|
if err = k.helmClient.InstallCertManager(ctx, helmReleases.CertManager); err != nil {
|
||||||
return nil, fmt.Errorf("installing cert-manager: %w", err)
|
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)
|
operatorVals, err := k.setupOperatorVals(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("setting up operator vals: %w", err)
|
return nil, fmt.Errorf("setting up operator vals: %w", err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue