Skip to content

Commit

Permalink
docs: Provider can deploy to pre-existing namespace
Browse files Browse the repository at this point in the history
If `flux-system` already exists, then the provider will
use it as scope for installation of Flux manifests.

It seems important to document this behaviour to
indicate there is no need for to add a boolean
e.g. `create_namespace=true|false`.

Signed-off-by: Mateusz Łoskot <[email protected]>
  • Loading branch information
mloskot committed Nov 28, 2023
1 parent e152daf commit 1124c38
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/resources/bootstrap_git.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "flux_bootstrap_git" "this" {
- `kustomization_override` (String) Kustomization to override configuration set by default.
- `log_level` (String) Log level for toolkit components. Defaults to `info`.
- `manifests_path` (String) The install manifests are built from a GitHub release or kustomize overlay if using a local path. Defaults to `https:/fluxcd/flux2/releases`.
- `namespace` (String) The namespace scope for install manifests. Defaults to `flux-system`.
- `namespace` (String) The namespace scope for install manifests. Defaults to `flux-system`. It will be created if it does not exist.
- `network_policy` (Boolean) Deny ingress access to the toolkit controllers from other namespaces using network policies. Defaults to `true`.
- `path` (String) Path relative to the repository root, when specified the cluster sync will be scoped to this path.
- `recurse_submodules` (Boolean) Configures the GitRepository source to initialize and include Git submodules in the artifact it produces.
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/data_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (s *installDataSource) Schema(ctx context.Context, req datasource.SchemaReq
},
},
"namespace": schema.StringAttribute{
Description: fmt.Sprintf("The namespace scope for install manifests. Defaults to `%s`.", opts.Namespace),
Description: fmt.Sprintf("The namespace scope for install manifests. Defaults to `%s`. It will be created if it does not exist.", opts.Namespace),
Optional: true,
},
"cluster_domain": schema.StringAttribute{
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_bootstrap_git.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (r *bootstrapGitResource) Schema(ctx context.Context, req resource.SchemaRe
},
},
"namespace": schema.StringAttribute{
Description: fmt.Sprintf("The namespace scope for install manifests. Defaults to `%s`.", defaultOpts.Namespace),
Description: fmt.Sprintf("The namespace scope for install manifests. Defaults to `%s`. It will be created if it does not exist.", defaultOpts.Namespace),
Optional: true,
Computed: true,
Default: stringdefault.StaticString(defaultOpts.Namespace),
Expand Down

0 comments on commit 1124c38

Please sign in to comment.