1
0
mirror of synced 2026-02-10 12:15:55 +00:00

Merge pull request #2050 from fluxcd/do-not-edit-warn

Add `DO NOT EDIT` warn to bootstrap sync manifests
This commit is contained in:
Stefan Prodan
2021-11-04 18:47:50 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -24,6 +24,8 @@ import (
securejoin "github.com/cyphar/filepath-securejoin" 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 // Manifest holds the data of a multi-doc YAML
type Manifest struct { type Manifest struct {
// Relative path to the YAML file // Relative path to the YAML file

View File

@@ -107,7 +107,7 @@ func Generate(options Options) (*manifestgen.Manifest, error) {
return &manifestgen.Manifest{ return &manifestgen.Manifest{
Path: path.Join(options.TargetPath, options.Namespace, options.ManifestFile), 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 }, nil
} }