summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/helm/helm.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/internal/helm/helm.go')
-rw-r--r--src/k8splugin/internal/helm/helm.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/k8splugin/internal/helm/helm.go b/src/k8splugin/internal/helm/helm.go
index d39e8404..31047eb6 100644
--- a/src/k8splugin/internal/helm/helm.go
+++ b/src/k8splugin/internal/helm/helm.go
@@ -305,14 +305,6 @@ func (h *TemplateClient) GenerateKubernetesArtifacts(inputPath string, valueFile
continue
}
- hook, _ := isHook(b, data)
- // if hook is not nil, then append it to hooks list and continue
- // if it's not, disregard error
- if hook != nil {
- hookList = append(hookList, hook)
- continue
- }
-
mfilePath := filepath.Join(outputDir, m.Name)
utils.EnsureDirectory(mfilePath)
err = ioutil.WriteFile(mfilePath, []byte(data), 0666)
@@ -320,6 +312,14 @@ func (h *TemplateClient) GenerateKubernetesArtifacts(inputPath string, valueFile
return retData, hookList, err
}
+ hook, _ := isHook(mfilePath, data)
+ // if hook is not nil, then append it to hooks list and continue
+ // if it's not, disregard error
+ if hook != nil {
+ hookList = append(hookList, hook)
+ continue
+ }
+
gvk, err := getGroupVersionKind(data)
if err != nil {
return retData, hookList, err