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

Added manifest generation flag #2583

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 'git@github.com:<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: "this.is@anemail.com",
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