summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/helm
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2021-03-12 08:46:20 +0100
committerKonrad Bańka <k.banka@samsung.com>2021-03-31 18:34:14 +0200
commit120019529489b5cbcf82d77eec228283fb12d43a (patch)
treedd404d0816bf0c86db0ced390c67fadd619900a1 /src/k8splugin/internal/helm
parent4068b83937c490e638db0b8b0aceb8b7a88b7461 (diff)
Fix Healthcheck API
Fix several issues related to Healthcheck creation. Updated GET/DELETE methods to work properly. This commit leaves few FIXME/TODOs that will be handled within Helm3 Rebase commit Issue-ID: MULTICLOUD-1308 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I5da50363bb240fdc85d3624f43cb0526786da542
Diffstat (limited to 'src/k8splugin/internal/helm')
-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