Skip to content

Commit

Permalink
Specify Version For Templating Tools (#4463)
Browse files Browse the repository at this point in the history
* specify version for templating tools

Signed-off-by: Viet Anh Pham Nhu <[email protected]>

* Handle Error Both Install Helm And Kustomize

Signed-off-by: Viet Anh Pham Nhu <[email protected]>

---------

Signed-off-by: Viet Anh Pham Nhu <[email protected]>
  • Loading branch information
anhpnv authored and kentakozuka committed Jul 12, 2023
1 parent 07b1b37 commit c5ec529
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/app/piped/platformprovider/kubernetes/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package kubernetes

import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -90,13 +91,12 @@ func (l *loader) LoadManifests(ctx context.Context) (manifests []Manifest, err e
sortManifests(manifests)
}()
l.initOnce.Do(func() {
var initErrorHelm, initErrorKustomize error
l.templatingMethod = determineTemplatingMethod(l.input, l.appDir)
switch l.templatingMethod {
case TemplatingMethodHelm:
l.helm, l.initErr = l.findHelm(ctx, l.input.HelmVersion)

case TemplatingMethodKustomize:
l.kustomize, l.initErr = l.findKustomize(ctx, l.input.KustomizeVersion)
if l.templatingMethod != TemplatingMethodNone {
l.helm, initErrorHelm = l.findHelm(ctx, l.input.HelmVersion)
l.kustomize, initErrorKustomize = l.findKustomize(ctx, l.input.KustomizeVersion)
l.initErr = errors.Join(initErrorHelm, initErrorKustomize)
}
})
if l.initErr != nil {
Expand Down

0 comments on commit c5ec529

Please sign in to comment.