Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2583 from sebikul/feature/manifest-generation-flag
Browse files Browse the repository at this point in the history
Added manifest generation flag
  • Loading branch information
2opremio authored Nov 6, 2019
2 parents 4d40750 + aa4dede commit 3275577
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmd/fluxctl/install_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ fluxctl install --git-url '[email protected]:<your username>/flux-get-started' | ku
"Email to use as git committer")
cmd.Flags().BoolVar(&opts.GitReadOnly, "git-readonly", false,
"Tell flux it has readonly access to the repo")
cmd.Flags().BoolVar(&opts.ManifestGeneration, "manifest-generation", false,
"Whether to enable manifest generation")
cmd.Flags().StringVar(&opts.Namespace, "namespace", getKubeConfigContextNamespace("default"),
"Cluster namespace where to install flux")
cmd.Flags().StringVarP(&opts.outputDir, "output-dir", "o", "", "a directory in which to write individual manifests, rather than printing to stdout")
Expand Down
3 changes: 3 additions & 0 deletions deploy/flux-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ spec:
# - --connect=wss://cloud.weave.works/api/flux
# - --token=abc123abc123abc123abc123

# Enable manifest generation (default `false`)
# - --manifest-generation=false

# Serve /metrics endpoint at different port;
# make sure to set prometheus' annotation to scrape the port value.
- --listen-metrics=:3031
Expand Down
4 changes: 2 additions & 2 deletions pkg/install/generated_templates.gogen.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type TemplateParameters struct {
GitEmail string
GitReadOnly bool
Namespace string
ManifestGeneration bool
AdditionalFluxArgs []string
}

Expand Down
1 change: 1 addition & 0 deletions pkg/install/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func TestFillInTemplatesAllParameters(t *testing.T) {
GitEmail: "[email protected]",
Namespace: "flux",
GitReadOnly: true,
ManifestGeneration: true,
AdditionalFluxArgs: []string{"arg1=foo", "arg2=bar"},
})

Expand Down
7 changes: 7 additions & 0 deletions pkg/install/templates/flux-deployment.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ spec:
# - --connect=wss://cloud.weave.works/api/flux
# - --token=abc123abc123abc123abc123

# Enable manifest generation (default `false`)
{{- if .ManifestGeneration }}
- --manifest-generation=true
{{- else }}
# - --manifest-generation=false
{{- end }}

# Serve /metrics endpoint at different port;
# make sure to set prometheus' annotation to scrape the port value.
- --listen-metrics=:3031
Expand Down

0 comments on commit 3275577

Please sign in to comment.