mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-13 23:36:51 +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
|
|
@ -19,23 +19,25 @@ package sync
|
|||
import "time"
|
||||
|
||||
type Options struct {
|
||||
Interval time.Duration
|
||||
URL string
|
||||
Name string
|
||||
Namespace string
|
||||
Branch string
|
||||
TargetPath string
|
||||
ManifestFile string
|
||||
Interval time.Duration
|
||||
URL string
|
||||
Name string
|
||||
Namespace string
|
||||
Branch string
|
||||
TargetPath string
|
||||
ManifestFile string
|
||||
GitImplementation string
|
||||
}
|
||||
|
||||
func MakeDefaultOptions() Options {
|
||||
return Options{
|
||||
Interval: 1 * time.Minute,
|
||||
URL: "",
|
||||
Name: "flux-system",
|
||||
Namespace: "flux-system",
|
||||
Branch: "main",
|
||||
ManifestFile: "gotk-sync.yaml",
|
||||
TargetPath: "",
|
||||
Interval: 1 * time.Minute,
|
||||
URL: "",
|
||||
Name: "flux-system",
|
||||
Namespace: "flux-system",
|
||||
Branch: "main",
|
||||
ManifestFile: "gotk-sync.yaml",
|
||||
TargetPath: "",
|
||||
GitImplementation: "go-git",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ func Generate(options Options) (*manifestgen.Manifest, error) {
|
|||
SecretRef: &corev1.LocalObjectReference{
|
||||
Name: options.Name,
|
||||
},
|
||||
GitImplementation: options.GitImplementation,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue