update documentation to expose multi-namespace install modes - #49966
Conversation
|
not totally sure this documentation isn't lying... |
vmuzikar
left a comment
There was a problem hiding this comment.
As discussed offline, we'll need some code changes as well. Especially:
Also, this will need to be removed/adjusted:
keycloak/.github/workflows/operator-ci.yml
Line 208 in c334a82
|
done |
shawkins
left a comment
There was a problem hiding this comment.
Either here or in a follow-up we'll need a release note about cluster wide install mode.
| ---- | ||
|
|
||
| <@profile.ifCommunity> | ||
| [[installing_cluster_wide_with_kubectl]] |
There was a problem hiding this comment.
This is fine for a placeholder, but we'll mostly remove / rewrite this based upon the other PR.
| spec: {} | ||
| ---- | ||
|
|
||
| Approve the install plan if you are using manual approval, then verify that the Operator pod is running. |
There was a problem hiding this comment.
We recommend only using manual approval.
|
|
||
| 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: |
There was a problem hiding this comment.
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.
|
|
||
| ==== 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Should we even expose the MultiNamespace install mode in the CSV metadata?
As discussed on the meeting yesterday, I lean towards no.
There was a problem hiding this comment.
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
MultiNamespaceandAllNamespacesas 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. |
|
|
||
| * `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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
The bullet point should've stayed, just be wrapped by profile.ifCommunity.
There was a problem hiding this comment.
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.
|
|
||
| ==== Installing with OLM | ||
|
|
||
| To install in `AllNamespaces` mode, create an OperatorGroup without `spec.targetNamespaces`, subscribe to the Operator, and approve the install plan. |
There was a problem hiding this comment.
This makes an impression that the cluster-wide OLM install is possible only via CLI. We should mention the web console way as well.
There was a problem hiding this comment.
how do you want me to put that?
There was a problem hiding this comment.
We should split the instructions for CLI and web console, similarly how we have it in the chapters above for installing using OLM.
| 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 | ||
| |=== |
|
|
||
| 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: |
|
@edewit What is the status of this PR? It is needed for the 26.7 release. |
|
I need to do the web console stuff, but I haven't setup my environment yet |
|
|
||
| <@profile.ifCommunity> | ||
| [[installing_cluster_wide_with_kubectl]] | ||
| ==== Installing cluster-wide with kubectl |
There was a problem hiding this comment.
@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).
There was a problem hiding this comment.
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.
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>
Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>
e50c6e6 to
0482c73
Compare
…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>
fixes: #49037
Signed-off-by: Erik Jan de Wit erikjan.dewit@gmail.com