Skip to content

Create dashboard ClusterProfile content in the namespace ui-backend runs in - #197

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:namespace
Oct 19, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:namespace

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

ui-backend stored the ConfigMap of a ClusterProfile created from pasted YAML in a hardcoded projectsveltos namespace.
When Sveltos is installed in a different namespace (for instance sveltos), that namespace does not exist and the creation fails.

ui-backend now reads its own namespace from the NAMESPACE environment variable, set through the downward API (metadata.namespace), and creates the ConfigMap there. If the variable is not set, it falls back to projectsveltos, so existing manifests keep working. The namespace is not configurable through a flag: it always follows where ui-backend is deployed. A Profile still uses its own namespace.

The env var is added to config/manager/manager.yaml and the regenerated manifest/manifest.yaml.

Tests: the ClusterProfile case of contentConfigMapNamespace asserts the namespace from NAMESPACE, the ConfigMap creation test sets it, and a new test covers the fallback.

Fixes #190

…uns in

ui-backend stored the ConfigMap of a ClusterProfile created from pasted YAML in a hardcoded
`projectsveltos` namespace.
When Sveltos is installed in a different namespace (for instance `sveltos`), that namespace
does not exist and the creation fails.

ui-backend now reads its own namespace from the `NAMESPACE` environment variable, set through
the downward API (`metadata.namespace`), and creates the ConfigMap there.
If the variable is not set, it falls back to `projectsveltos`, so existing manifests keep working.
The namespace is not configurable through a flag: it always follows where ui-backend is deployed.
A Profile still uses its own namespace.

The env var is added to `config/manager/manager.yaml` and the regenerated `manifest/manifest.yaml`.

Tests: the ClusterProfile case of `contentConfigMapNamespace` asserts the namespace from `NAMESPACE`,
the ConfigMap creation test sets it, and a new test covers the fallback.

Fixes projectsveltos#190
@gianlucam76
gianlucam76 merged commit b634731 into projectsveltos:main Oct 19, 2026
5 checks passed
@gianlucam76
gianlucam76 deleted the namespace branch October 19, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Make the dashboard's ClusterProfile content namespace configurable

1 participant