Skip to content

Commit

Permalink
Merge pull request #5570 from jtyr/jtyr-valid
Browse files Browse the repository at this point in the history
Adding support for Functions in crank validate (fixes #5491)
  • Loading branch information
phisco committed Apr 16, 2024
2 parents a62a085 + 068648f commit 7ca1220
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/crank/beta/validate/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,17 @@ func (m *Manager) addDependencies() error {
deps := cfg.Spec.MetaSpec.DependsOn
for _, dep := range deps {
image := ""
if dep.Configuration != nil {
if dep.Configuration != nil { //nolint:gocritic // switch is not suitable here
image = *dep.Configuration
} else if dep.Provider != nil {
image = *dep.Provider
} else if dep.Function != nil {
image = *dep.Function
}
if len(image) > 0 {
image = fmt.Sprintf(imageFmt, image, dep.Version)
m.deps[image] = true
}
image = fmt.Sprintf(imageFmt, image, dep.Version)
m.deps[image] = true
}
}

Expand Down

0 comments on commit 7ca1220

Please sign in to comment.