Skip to content

Commit b92a634

Browse files
committed
🐛 Allow Helm execution
1 parent f39ac6a commit b92a634

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pkg/plugins/factories.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,8 @@ func NewPluginHelpers() (*resmap.PluginHelpers, error) {
155155
return nil, err
156156
}
157157

158-
return resmap.NewPluginHelpers(ldr, depProvider.GetFieldValidator(), resmapFactory, types.DisabledPluginConfig()), nil
158+
config := types.DisabledPluginConfig()
159+
config.HelmConfig.Enabled = true
160+
config.HelmConfig.Command = "helm"
161+
return resmap.NewPluginHelpers(ldr, depProvider.GetFieldValidator(), resmapFactory, config), nil
159162
}

pkg/utils/utils.go

+4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ func TransferAnnotations(list []*yaml.RNode, config *yaml.RNode) (err error) {
6262
annotations[FunctionAnnotationLocalConfig] = "true"
6363
}
6464
if path != "" {
65+
//lint:ignore SA1019 used by kustomize
6566
annotations[kioutil.LegacyPathAnnotation] = path
6667
annotations[kioutil.PathAnnotation] = path
6768

6869
curIndex := strconv.Itoa(startIndex + index)
70+
//lint:ignore SA1019 used by kustomize
6971
annotations[kioutil.LegacyIndexAnnotation] = curIndex
7072
annotations[kioutil.IndexAnnotation] = curIndex
7173
}
@@ -85,11 +87,13 @@ func unLocal(list []*yaml.RNode) ([]*yaml.RNode, error) {
8587
// For the remaining resources, if a path and/or index was specified
8688
// we copy it.
8789
if path, ok := annotations[FunctionAnnotationPath]; ok {
90+
//lint:ignore SA1019 used by kustomize
8891
annotations[kioutil.LegacyPathAnnotation] = path
8992
annotations[kioutil.PathAnnotation] = path
9093
delete(annotations, FunctionAnnotationPath)
9194
}
9295
if index, ok := annotations[FunctionAnnotationIndex]; ok {
96+
//lint:ignore SA1019 used by kustomize
9397
annotations[kioutil.LegacyIndexAnnotation] = index
9498
annotations[kioutil.IndexAnnotation] = index
9599
delete(annotations, FunctionAnnotationIndex)

0 commit comments

Comments
 (0)