From b9ef8dbe563e6626c047d1cf91b1367ac7f087c2 Mon Sep 17 00:00:00 2001 From: Jonathan Chauncey Date: Mon, 3 Apr 2017 11:25:39 -0400 Subject: [PATCH] fix(hooks): Change annotation from hookWeight to hook-weight --- pkg/hooks/hooks.go | 2 +- pkg/tiller/hooks.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index d6966a87a..e1fccb416 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -24,7 +24,7 @@ import ( const HookAnno = "helm.sh/hook" // HookWeightAnno is the label name for a hook weight -const HookWeightAnno = "helm.sh/hookWeight" +const HookWeightAnno = "helm.sh/hook-weight" // Types of hooks const ( diff --git a/pkg/tiller/hooks.go b/pkg/tiller/hooks.go index b6dfeb9cd..3833ba9ea 100644 --- a/pkg/tiller/hooks.go +++ b/pkg/tiller/hooks.go @@ -111,9 +111,8 @@ func sortManifests(files map[string]string, apis chartutil.VersionSet, sort Sort continue } - hw := 0 hws, _ := sh.Metadata.Annotations[hooks.HookWeightAnno] - hw, err = strconv.Atoi(hws) + hw, err := strconv.Atoi(hws) if err != nil { hw = 0 }