busola icon indicating copy to clipboard operation
busola copied to clipboard

merge `Resource` and `ResourceRef` components

Open qbalukom opened this issue 2 years ago • 9 comments

Get rid of the Resource/ResourceRef split and keep only one component, or even consider removing them altogether (but it might be beneficial to have some extra support such as provideVar so keeping one

implement after #2311

  • [ ] consider possible options (with team) and implement
  • [ ] update docs
  • [ ] update schema
  • [ ] introduce a migrator

possible implementation would be to just keep the resource, then something like this could possibly work as a replacement for ResourceRef:

- path: spec.secretRef
  children:
    - path: namespace
      widget: Resource
      source: namespaces
      provideVar: secretNamespace
    - path: name
      widget: Resource
      source: secrets
      filter: $item.metadata.namespace = $secretNamespace.metadata.name

in this example it might be worth considering providing default data sources (at least for the system resources), for example if not overridden, always provide all namespaces as a var.

qbalukom avatar Jan 26 '23 06:01 qbalukom