Documentation ¶
Index ¶
- Constants
- Variables
- func Prepare(fileName string, validateOnly bool, casMax, casMin int) (clusterName string, modifiedYaml []byte, err error)
- func PrepareGitDir(creds *argocd.RepoCreds, repoUrl string, repoRevision string, repoPath string, ...) (clusterName string, changed bool, err error)
- func Validate(fileName string) (clusterName string, err error)
- func ValidateGitDir(creds *argocd.RepoCreds, repoUrl string, repoRevision string, repoPath string) (clusterName string, err error)
- type KustomizationTemplateParams
Constants ¶
View Source
const ConfigurationsYaml = `` /* 4402-byte string literal not displayed */
Variables ¶
View Source
var ( ErrMultipleManifests = errors.New("multiple manifests found") ErrNoManifest = errors.New("failed to find base cluster manifest file") ErrNoKustomizationYaml = errors.New("kustomization.yaml is missing") ErrNoConfigurationsYaml = errors.New("configurations.yaml is missing") ErrMultipleClusters = errors.New("there are 2 or more clusters") ErrNoClusterResource = errors.New("no cluster resource found") ErrBuilderFailedRun = errors.New("builder failed to run") ErrResourceHasNamespace = errors.New("resource has a namespace defined") Err2orMoreClusters = errors.New("there are 2 or more clusters") )
Functions ¶
func Prepare ¶
func Prepare(fileName string, validateOnly bool, casMax, casMin int) (clusterName string, modifiedYaml []byte, err error)
Prepare checks a cluster API manifest file for problems, and if validateOnly is false, outputs a modified copy as modifiedYaml if some resources have a namespace that needs removal. If validateOnly is true or no modifications are necessary, then modifiedYaml is nil. An error is returned if other types of (non-namespace related) issues are found in the manifest.
func PrepareGitDir ¶
Types ¶
type KustomizationTemplateParams ¶
type KustomizationTemplateParams struct {
ManifestFileName string
}
Click to show internal directories.
Click to hide internal directories.