Skip to content

Commit

Permalink
fixup! feat: Unattended Flux installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Jun 4, 2020
1 parent 9ac1704 commit 8e6afca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/gitops/flux/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ func getFluxManifests(opts *api.Git, cs kubeclient.Interface) (map[string][]byte
if !fluxNSExists {
manifests[fluxNamespaceFileName] = kubernetes.NewNamespaceYAML(opts.Operator.Namespace)
}

additionalFluxArgs := []string{"--sync-garbage-collection"}
if opts.Operator.ReadOnly {
additionalFluxArgs = append(additionalFluxArgs, "--registry-disable-scanning")
}

fluxParameters := fluxinstall.TemplateParameters{
GitURL: opts.Repo.URL,
GitBranch: opts.Repo.Branch,
Expand All @@ -287,7 +293,7 @@ func getFluxManifests(opts *api.Git, cs kubeclient.Interface) (map[string][]byte
GitReadOnly: opts.Operator.ReadOnly,
Namespace: opts.Operator.Namespace,
ManifestGeneration: true,
AdditionalFluxArgs: []string{"--sync-garbage-collection"},
AdditionalFluxArgs: additionalFluxArgs,
}
fluxManifests, err := fluxinstall.FillInTemplates(fluxParameters)
if err != nil {
Expand Down

0 comments on commit 8e6afca

Please sign in to comment.