Skip to content

list of service binding and added binding using oc - #6000

Merged
vrubezhny merged 4 commits into
redhat-developer:mainfrom
msivasubramaniaan:add-binding-without-odo
Aug 20, 2026
Merged

list of service binding and added binding using oc#6000
vrubezhny merged 4 commits into
redhat-developer:mainfrom
msivasubramaniaan:add-binding-without-odo

Conversation

@msivasubramaniaan

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 130 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.86%. Comparing base (da60441) to head (ff84dc2).
⚠️ Report is 1967 commits behind head on main.

Files with missing lines Patch % Lines
src/k8s/servicebinding/bindableService.ts 49.66% 76 Missing ⚠️
src/openshift/component.ts 22.22% 28 Missing ⚠️
...iew/add-service-binding/addServiceBindingLoader.ts 20.00% 24 Missing ⚠️
src/oc/ocWrapper.ts 88.23% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6000       +/-   ##
===========================================
+ Coverage   32.37%   50.86%   +18.49%     
===========================================
  Files          85      116       +31     
  Lines        6505    10635     +4130     
  Branches     1349     2394     +1045     
===========================================
+ Hits         2106     5410     +3304     
- Misses       4399     5222      +823     
- Partials        0        3        +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@msivasubramaniaan
msivasubramaniaan marked this pull request as ready for review August 3, 2026 15:25
@vrubezhny
vrubezhny force-pushed the add-binding-without-odo branch 3 times, most recently from b024e55 to d6c0788 Compare August 10, 2026 18:51
@vrubezhny vrubezhny mentioned this pull request Aug 10, 2026
12 tasks
@vrubezhny
vrubezhny force-pushed the add-binding-without-odo branch 7 times, most recently from 3f69a54 to 932a51f Compare August 10, 2026 23:09
@vrubezhny

Copy link
Copy Markdown
Contributor

SBO Migration Required

PR #6000 brings the service binding feature back by:

  1. Removing odo dependency — addBinding() and loadView() no longer use Odo.Instance, all binding operations go through BindableService and the K8s API directly
  2. Fixing bugs — early return with empty password preventing TokenStore persistence, stale KubeConfig in singleton, wrong module import, missing componentName parameter
  3. Restoring tests — unit, integration, and UI tests for the binding flow, renamed from operatorBackedService to bindableService to reflect the direction away from SBO

However, the current implementation still depends on the Service Binding Operator (SBO) for two critical functions:

  • Service discovery via the BindableKinds CRD (oc get bindablekinds.binding.operators.coreos.com)
  • Binding creation via the ServiceBinding CRD

SBO was deprecated in February 2024. Testing revealed that SBO's BindableKinds does not auto-discover operators that implement the Provisioned Service pattern (e.g., CloudNativePG), even when both SBO and the
operator are installed on the same cluster. The old odo-based code worked because odo had its own discovery mechanism independent of BindableKinds.

This means the binding feature restored in this PR is effectively non-functional on clusters where operators don't explicitly register themselves with SBO via CSV descriptors — which includes most modern
operators that follow the servicebinding.io spec instead.

This PR does not resolve #4682 — Make "Bind Service" feature to use servicebinding.io API instead of the deprecated Service Binding Operator. It removes the odo dependency and restores the infrastructure, but
the underlying SBO dependency remains and must be replaced in a follow-up.

Next step: Replace SBO-based discovery and binding with pure K8s API operations:

  • Discovery: Scan cluster CRDs/resources for .status.binding.name (Provisioned Service pattern)
  • Binding: Patch Deployments directly to mount the binding secret as a volume at /bindings// and set SERVICE_BINDING_ROOT=/bindings

This eliminates the SBO dependency entirely and supports any operator that implements the Provisioned Service pattern.

msivasubramaniaan and others added 4 commits August 20, 2026 02:37
- Fix "no bindable services" check: return from addBinding(), not just
  the .then() callback, so the webview doesn't open with empty services
- Fix wrong import: ServiceBindingFormResponse from addServiceBindingLoader
- Fix singleton KubeConfig caching: create fresh KubeConfig on each call
  so cluster/context switches are reflected
- Remove odo dependency from webview loader: pass componentName directly
  from ComponentWorkspaceFolder metadata
- Add @clusterRequired() and @projectRequired() decorators to addBinding()

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
@vrubezhny
vrubezhny force-pushed the add-binding-without-odo branch from 932a51f to ff84dc2 Compare August 20, 2026 01:25
@vrubezhny

Copy link
Copy Markdown
Contributor

Merging as it's a good base to start migrating out of SBO

@vrubezhny
vrubezhny merged commit b61109c into redhat-developer:main Aug 20, 2026
8 of 9 checks passed
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.

2 participants