|
|
@ -84,7 +84,7 @@ func Generate(options Options, manifestsBase string) (*manifestgen.Manifest, err
|
|
|
|
|
|
|
|
|
|
|
|
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: string(content),
|
|
|
|
Content: fmt.Sprintf("%s\n%s", GetGenWarning(options), string(content)),
|
|
|
|
}, nil
|
|
|
|
}, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -142,3 +142,11 @@ func ExistingVersion(version string) (bool, error) {
|
|
|
|
return false, fmt.Errorf("GitHub API returned an unexpected status code (%d)", res.StatusCode)
|
|
|
|
return false, fmt.Errorf("GitHub API returned an unexpected status code (%d)", res.StatusCode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GetGenWarning generates a consistent generation warning in the install and bootstrap case in the following format:
|
|
|
|
|
|
|
|
// # This manifest was generated by flux. DO NOT EDIT.
|
|
|
|
|
|
|
|
// # Flux version: v0.21.1
|
|
|
|
|
|
|
|
// # Components: source-controller,kustomize-controller,helm-controller,notification-controller,image-reflector-controller,image-automation-controller
|
|
|
|
|
|
|
|
func GetGenWarning(options Options) string {
|
|
|
|
|
|
|
|
return fmt.Sprintf("---\n%s\n# Flux Version: %s\n# Components: %s", manifestgen.GenWarning, options.Version, strings.Join(options.Components, ","))
|
|
|
|
|
|
|
|
}
|
|
|
|