Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Replace remaining Dashboard calls to K8s API server #3896

@absoludity

Description

@absoludity

Description:

With #3779 nearing completion, the main use-case for the Kubeapps dashboard to interact with the K8s API server (fetch and watch resources related to an install) has been replaced with the new resources plugin.

There is still the Operator support which requires talking directly to the K8s API server (from shared/Operators), which will be handled in the short-term with a flag to enable/disable it (so that Kubeapps can run without proxying to the K8s API server) as documented in #3252 .

The other remaining call-sites to the K8s API are:

  • shared/Namespace, both Namespaces.create and Namespace.get use the k8s API directly and need to switch to use the resources plugin.
  • shared/Secret, used to get and list secrets as well as create pull secrets when interacting with Helm AppRepositories.
  • shared/Auth, used to validate a token credential when not using OIDC, as well as to determine if the app is authenticated with an http-only cookie (by simply doing a request to check the response, as by design there's no way to determine from javascript if there's an http-only cookie present). We should be able to replace these with calls to the resources plugin, since it uses the same user credential.
  • shared/AppRepository has a .getSelfLink which uses the k8s API and is used in actions/repos. Replace with list or a backend get. Edit: Actually, this code path (for SelectForm) is no longer used afaict, since we don't enable the Upgrade button if we don't have an available/installed pkg.
  • integration/02-private-repository uses the k8s API to verify that a secret is created and used with a deployment.

These are the only three remaining call-sites found by grepping for url.api.k8s (it's possible this grep misses files that may import specific parts of the url module. EDIT: verified with rg "import .* from.*url\"" dashboard/src that the only place this happens is in the operator modules).

With those three call-sites taken care of, we should then be able to finally:

  • Update the frontend config so that we are no longer proxying to the K8s API server, unless the operator support has been enabled (for now).

Metadata

Metadata

Assignees

Labels

component/apis-serverIssue related to kubeapps api-servercomponent/uiIssue related to kubeapps UIkind/featureAn issue that reports a feature (approved) to be implemented

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions