mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-24 08:31:47 +00:00
Add git implementation to generate sync options
Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
parent
ad9b0ae067
commit
d236a9af57
7 changed files with 31 additions and 27 deletions
|
|
@ -171,6 +171,7 @@ func generateSyncManifests(url, branch, name, namespace, targetPath, tmpDir stri
|
||||||
Interval: interval,
|
Interval: interval,
|
||||||
TargetPath: targetPath,
|
TargetPath: targetPath,
|
||||||
ManifestFile: sync.MakeDefaultOptions().ManifestFile,
|
ManifestFile: sync.MakeDefaultOptions().ManifestFile,
|
||||||
|
GitImplementation: sync.MakeDefaultOptions().GitImplementation,
|
||||||
}
|
}
|
||||||
|
|
||||||
manifest, err := sync.Generate(opts)
|
manifest, err := sync.Generate(opts)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ type Options struct {
|
||||||
Branch string
|
Branch string
|
||||||
TargetPath string
|
TargetPath string
|
||||||
ManifestFile string
|
ManifestFile string
|
||||||
|
GitImplementation string
|
||||||
}
|
}
|
||||||
|
|
||||||
func MakeDefaultOptions() Options {
|
func MakeDefaultOptions() Options {
|
||||||
|
|
@ -37,5 +38,6 @@ func MakeDefaultOptions() Options {
|
||||||
Branch: "main",
|
Branch: "main",
|
||||||
ManifestFile: "gotk-sync.yaml",
|
ManifestFile: "gotk-sync.yaml",
|
||||||
TargetPath: "",
|
TargetPath: "",
|
||||||
|
GitImplementation: "go-git",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ func Generate(options Options) (*manifestgen.Manifest, error) {
|
||||||
SecretRef: &corev1.LocalObjectReference{
|
SecretRef: &corev1.LocalObjectReference{
|
||||||
Name: options.Name,
|
Name: options.Name,
|
||||||
},
|
},
|
||||||
|
GitImplementation: options.GitImplementation,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue