Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call utils.CheckVersion() in Helm mode #1697

Merged
merged 2 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ func (p *Parameters) validate() error {

p.configOverwrites[t[0]] = t[1]
}
if p.AgentImage != "" || p.OperatorImage != "" || p.RelayImage != "" {
if utils.IsInHelmMode() {
// Version validation logic does not apply to Helm mode.
return nil
} else if p.AgentImage != "" || p.OperatorImage != "" || p.RelayImage != "" {
return nil
} else if err := utils.CheckVersion(p.Version); err != nil {
return err
Expand Down
7 changes: 7 additions & 0 deletions install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

"github.com/cilium/cilium-cli/clustermesh"
"github.com/cilium/cilium-cli/defaults"
"github.com/cilium/cilium-cli/internal/utils"
"github.com/cilium/cilium-cli/k8s"
)

Expand Down Expand Up @@ -46,6 +47,12 @@ func NewK8sUninstaller(client k8sInstallerImplementation, p UninstallParameters)
client: client,
params: p,
}

// Version detection / validation is unnecessary in Helm mode.
if utils.IsInHelmMode() {
return uninstaller
}

ciliumVersion, err := client.GetRunningCiliumVersion(context.Background(), p.Namespace)
if err != nil {
uninstaller.Log("Error getting Cilium Version: %s", err)
Expand Down