Skip to content

Commit

Permalink
update-annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dao Xuan Son committed Jan 3, 2024
1 parent eeb02e7 commit c168884
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/chartutil/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ metadata:
labels:
{{- include "<CHARTNAME>.labels" . | nindent 4 }}
annotations:
"github.com/xuanson2406/hook": test
"meta.helm.sh/hook": test
spec:
containers:
- name: wget
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/resource_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package kube // import "github.com/xuanson2406/helm/v3/pkg/kube"

// ResourcePolicyAnno is the annotation name for a resource policy
const ResourcePolicyAnno = "github.com/xuanson2406/resource-policy"
const ResourcePolicyAnno = "helm.sh/resource-policy"

// KeepPolicy is the resource policy type for keep
//
Expand Down
4 changes: 2 additions & 2 deletions pkg/lint/rules/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ func validateListAnnotations(yamlStruct *K8sYamlStruct, manifest string) error {
}

for _, i := range m.Items {
if _, ok := i.Metadata.Annotations["github.com/xuanson2406/resource-policy"]; ok {
return errors.New("Annotation 'github.com/xuanson2406/resource-policy' within List objects are ignored")
if _, ok := i.Metadata.Annotations["helm.sh/resource-policy"]; ok {
return errors.New("Annotation 'helm.sh/resource-policy' within List objects are ignored")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/release/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ const (
func (x HookDeletePolicy) String() string { return string(x) }

// HookAnnotation is the label name for a hook
const HookAnnotation = "github.com/xuanson2406/hook"
const HookAnnotation = "helm.sh/hook"

// HookWeightAnnotation is the label name for a hook weight
const HookWeightAnnotation = "github.com/xuanson2406/hook-weight"
const HookWeightAnnotation = "helm.sh/hook-weight"

// HookDeleteAnnotation is the label name for the delete policy for a hook
const HookDeleteAnnotation = "github.com/xuanson2406/hook-delete-policy"
const HookDeleteAnnotation = "helm.sh/hook-delete-policy"

// Hook defines a hook object.
type Hook struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/release/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var MockHookTemplate = `apiVersion: v1
kind: Job
metadata:
annotations:
"github.com/xuanson2406/hook": pre-install
"helm.sh/hook": pre-install
`

// MockManifest is the manifest used for all mock release objects.
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/driver/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func newSecretsObject(key string, rls *rspb.Release, lbs labels) (*v1.Secret, er
Name: key,
Labels: lbs.toMap(),
},
Type: "github.com/xuanson2406/release.v1",
Type: "helm.sh/release.v1",
Data: map[string][]byte{"release": []byte(s)},
}, nil
}
2 changes: 1 addition & 1 deletion pkg/storage/driver/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const (

const (
sqlReleaseDefaultOwner = "helm"
sqlReleaseDefaultType = "github.com/xuanson2406/release.v1"
sqlReleaseDefaultType = "helm.sh/release.v1"
)

// SQL is the sql storage driver implementation.
Expand Down

0 comments on commit c168884

Please sign in to comment.