Skip to content

update documentation to expose multi-namespace install modes - #49966

Merged
vmuzikar merged 12 commits into
keycloak:mainfrom
edewit:multi-namespace
Jun 30, 2026
Merged

update documentation to expose multi-namespace install modes#49966
vmuzikar merged 12 commits into
keycloak:mainfrom
edewit:multi-namespace

Conversation

@edewit

@edewit edewit commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

fixes: #49037
Signed-off-by: Erik Jan de Wit erikjan.dewit@gmail.com

@edewit
edewit requested a review from shawkins June 12, 2026 14:40
@edewit

edewit commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

not totally sure this documentation isn't lying...

@vmuzikar vmuzikar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, we'll need some code changes as well. Especially:

@CSVMetadata.InstallMode(
type = "AllNamespaces",
supported = false
)

Also, this will need to be removed/adjusted:

kubectl patch csv keycloak-operator.v86400000.0.0 --type merge --patch '{"spec": {"installModes": [{"type": "AllNamespaces","supported": true}]}}'

@edewit

edewit commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

done

@shawkins shawkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either here or in a follow-up we'll need a release note about cluster wide install mode.

Comment thread docs/guides/operator/installation.adoc Outdated
Comment thread docs/guides/operator/installation.adoc Outdated
----

<@profile.ifCommunity>
[[installing_cluster_wide_with_kubectl]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for a placeholder, but we'll mostly remove / rewrite this based upon the other PR.

Comment thread docs/guides/operator/installation.adoc Outdated
spec: {}
----

Approve the install plan if you are using manual approval, then verify that the Operator pod is running.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We recommend only using manual approval.

Comment thread docs/guides/operator/installation.adoc Outdated

Approve the install plan if you are using manual approval, then verify that the Operator pod is running.

If the Operator is already installed in single-namespace mode, you can switch to cluster-wide mode by removing `spec.targetNamespaces` from the OperatorGroup:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed. It's not recommended to simply switch from single namespace to cluster-wide - a cluster-wide operator should be in it's own namespace.

Comment thread docs/guides/operator/installation.adoc Outdated

==== Installing with OLM

To install in `MultiNamespace` or `AllNamespaces` mode, create an OperatorGroup with the desired namespace selection, subscribe to the Operator, and approve the install plan.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave MultiNamespace instructions out of the guide - that install mode is effectively going away.

I also don't see any forward support for namespace selection by label, nor is that currently supported in the java operator sdk.

So it seems better to not even mention the possibility of doing this.

Should we even expose the MultiNamespace install mode in the CSV metadata? cc @vmuzikar

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even expose the MultiNamespace install mode in the CSV metadata?

As discussed on the meeting yesterday, I lean towards no.

@edewit
edewit marked this pull request as ready for review June 17, 2026 18:12
@edewit
edewit requested a review from a team as a code owner June 17, 2026 18:12
Copilot AI review requested due to automatic review settings June 17, 2026 18:12
@edewit
edewit requested a review from a team as a code owner June 17, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #49037 by exposing and documenting multi-namespace and cluster-wide installation modes for the Keycloak Operator, aligning OLM metadata with the Operator’s existing capabilities and expanding the installation guide accordingly.

Changes:

  • Enable MultiNamespace and AllNamespaces as supported OLM install modes in the Operator CSV metadata.
  • Extend the Operator installation guide with a new multi-namespace/cluster-wide section (OLM + non-OLM guidance).
  • Simplify OLM CI by removing the CSV installModes patch step now that the CSV metadata supports these modes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
operator/src/main/java/org/keycloak/operator/controllers/KeycloakSharedCsvMetadata.java Marks MultiNamespace and AllNamespaces as supported install modes in the shared CSV metadata.
docs/guides/operator/installation.adoc Adds multi-namespace/cluster-wide installation documentation (OLM + non-OLM), including limitations and guidance.
.github/workflows/operator-ci.yml Removes the CSV patch used to force AllNamespaces support during OLM CI testing.

Comment thread docs/guides/operator/installation.adoc Outdated
@vmuzikar
vmuzikar requested a review from shawkins June 19, 2026 11:40
shawkins
shawkins previously approved these changes Jun 22, 2026

@shawkins shawkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @edewit

Comment thread docs/guides/operator/installation.adoc Outdated
Comment thread docs/guides/operator/installation.adoc Outdated

* `spec.podTemplate.spec.serviceAccountName` cannot be used on a `Keycloak` custom resource. The Operator ignores this field and reports a warning.
* The Operator does not reconcile multiple {project_name} versions in one cluster.
* You need cluster-admin permissions, or equivalent permissions, to configure cluster-scoped RBAC for non-OLM installations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be guarded by the community profile as non-OLM installs are supported upstream only. In other words, this bullet point must be excluded downstream.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bullet point should've stayed, just be wrapped by profile.ifCommunity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bullet-point is still missing. However, thinking about it more, you need cluster-admin permissions even for OLM installations. So the bullet point should be:

* You need cluster-admin permissions, or equivalent permissions.

Comment thread docs/guides/operator/installation.adoc Outdated

==== Installing with OLM

To install in `AllNamespaces` mode, create an OperatorGroup without `spec.targetNamespaces`, subscribe to the Operator, and approve the install plan.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes an impression that the cluster-wide OLM install is possible only via CLI. We should mention the web console way as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you want me to put that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should split the instructions for CLI and web console, similarly how we have it in the chapters above for installing using OLM.

Comment thread docs/guides/operator/installation.adoc Outdated
Copilot AI review requested due to automatic review settings June 23, 2026 09:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread docs/guides/operator/installation.adoc Outdated
Comment thread docs/guides/operator/installation.adoc Outdated
Comment on lines +143 to +157
The Operator supports the standard OLM install modes:

[cols="1,2",options="header"]
|===
| Install mode | Operator watches

| `OwnNamespace`
| The namespace where the Operator is installed

| `SingleNamespace`
| One namespace other than the Operator namespace

| `AllNamespaces`
| All namespaces in the cluster
|===
Copilot AI review requested due to automatic review settings June 23, 2026 10:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread docs/guides/operator/installation.adoc Outdated

A single {project_name} Operator can reconcile custom resources in all namespaces in the cluster. This avoids running one Operator per namespace while still allowing {project_name} instances to be deployed in separate namespaces.

The Operator supports the standard OLM install modes:
@vmuzikar

Copy link
Copy Markdown
Contributor

@edewit What is the status of this PR? It is needed for the 26.7 release.

@edewit

edewit commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

I need to do the web console stuff, but I haven't setup my environment yet

Copilot AI review requested due to automatic review settings June 26, 2026 15:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comment thread docs/guides/operator/installation.adoc Outdated

<@profile.ifCommunity>
[[installing_cluster_wide_with_kubectl]]
==== Installing cluster-wide with kubectl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edewit Thank you for the update. There's one last thing from my perspective.

#46980 is ready and will be merged sooner than this. Can you please update this chapter for installing cluster-wide with kubectl to match the current state of #46980?

Additionally, we'll need to mention kustomize in the release notes – both in the context of all-namespaces mode, as well as in the context of generally new deployment method (that the Operator can now be deployed using kustomize).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, #46980 already include kustomize instructions for cluster-wide. So let's just wait until it's merged, rebase this PR and update the docs so cluster-wide instructions for OLM and kustomize are in the same chapter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

edewit and others added 11 commits June 30, 2026 08:34
fixes: keycloak#49037
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
also changed docs and ci to no longer mention/execute patching the csv

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
@edewit
edewit force-pushed the multi-namespace branch from 2ce7f04 to 17bbe6e Compare June 30, 2026 06:45

@vmuzikar vmuzikar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good now.

@shawkins Do you want to give it one final look too?

Comment thread docs/guides/operator/installation.adoc Outdated
Comment thread docs/guides/operator/installation.adoc Outdated
Comment thread docs/documentation/release_notes/topics/26_7_0.adoc
shawkins
shawkins previously approved these changes Jun 30, 2026

@shawkins shawkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @edewit

Copilot AI review requested due to automatic review settings June 30, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread docs/guides/operator/installation.adoc Outdated
Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>

@vmuzikar vmuzikar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the liberty and pushed some cosmetic changes, mainly to remove the extra + signs.

LGTM, thanks @edewit.

@vmuzikar
vmuzikar enabled auto-merge (squash) June 30, 2026 17:05
@vmuzikar
vmuzikar merged commit b1c293f into keycloak:main Jun 30, 2026
89 checks passed
@edewit
edewit deleted the multi-namespace branch July 2, 2026 09:03
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
…k#49966)

* update documentation to expose multi-namespace install modes

fixes: keycloak#49037
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* updated csv

also changed docs and ci to no longer mention/execute patching the csv

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* changed experimental to preview

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* PR review commments

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Update docs/guides/operator/installation.adoc

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Update docs/guides/operator/installation.adoc

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* removed rbac reference

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* web based installation

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* PR comments

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* merged clusterwide with kustomize

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Cosmetic tweaks

Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose multi-namespace install modes

6 participants