Skip to content

Commit

Permalink
helm: Rename newChartFromCiliumVersion function
Browse files Browse the repository at this point in the history
This commit is to rename newChartFromCiliumVersion function to
newChartFromEmbeddedFile.

Signed-off-by: Tam Mach <[email protected]>
  • Loading branch information
sayboras authored and tklauser committed Sep 19, 2022
1 parent 6453c72 commit 29981e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func newClient(namespace, k8sVersion string) (*action.Install, error) {
return helmClient, nil
}

func newChartFromCiliumVersion(ciliumVersion semver2.Version) (*chart.Chart, error) {
func newChartFromEmbeddedFile(ciliumVersion semver2.Version) (*chart.Chart, error) {
helmTgz, err := helm.HelmFS.ReadFile(fmt.Sprintf("cilium-%s.tgz", ciliumVersion))
if err != nil {
return nil, fmt.Errorf("cilium version not found: %s", err)
Expand Down Expand Up @@ -216,7 +216,7 @@ func GenManifests(
return nil, err
}
} else {
helmChart, err = newChartFromCiliumVersion(ciliumVer)
helmChart, err = newChartFromEmbeddedFile(ciliumVer)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -332,7 +332,7 @@ func ResolveHelmChartVersion(versionFlag, chartDirectoryFlag string) (semver2.Ve
if err != nil {
return semver2.Version{}, err
}
if _, err = newChartFromCiliumVersion(version); err != nil {
if _, err = newChartFromEmbeddedFile(version); err != nil {
return semver2.Version{}, err
}
return version, nil
Expand Down

0 comments on commit 29981e6

Please sign in to comment.