diff --git a/pkg/manifestgen/manifest.go b/pkg/manifestgen/manifest.go index 9509e0b1e251adf0dc639719608b1696fcb30123..693b22ebe67a85bacf6c0a73c5d94778712fd04c 100644 --- a/pkg/manifestgen/manifest.go +++ b/pkg/manifestgen/manifest.go @@ -24,6 +24,8 @@ import ( securejoin "github.com/cyphar/filepath-securejoin" ) +const GenWarning = "# This manifest was generated by flux bootstrap. DO NOT EDIT." + // Manifest holds the data of a multi-doc YAML type Manifest struct { // Relative path to the YAML file diff --git a/pkg/manifestgen/sync/sync.go b/pkg/manifestgen/sync/sync.go index ddddbf894da004f615414905ad04b6595c226773..757d6bef6837888ad4f7582f8fcb3aef8d935e8e 100644 --- a/pkg/manifestgen/sync/sync.go +++ b/pkg/manifestgen/sync/sync.go @@ -107,7 +107,7 @@ func Generate(options Options) (*manifestgen.Manifest, error) { return &manifestgen.Manifest{ Path: path.Join(options.TargetPath, options.Namespace, options.ManifestFile), - Content: fmt.Sprintf("---\n%s---\n%s", resourceToString(gitData), resourceToString(ksData)), + Content: fmt.Sprintf("%s\n---\n%s---\n%s", manifestgen.GenWarning, resourceToString(gitData), resourceToString(ksData)), }, nil }