kcp-dev / contrib-tmc

An experimental add-on readding some Kubernetes compute APIs and impement transparent multi-cluster scheduling
Apache License 2.0
5 stars 3 forks source link

bug: error: bind compute is not ready : resource name may not be empty #55

Open kasturinarra opened 1 year ago

kasturinarra commented 1 year ago

Describe the bug

When trying to bind an apiexport using the command ‘kubectl kcp bind compute --apiexports :’ error described above is hit.

[knarra@knarra root-org]$ kubectl kcp bind compute root:users:qf:vg:rh-sso-knarra-redhat-com:lw1 --apiexports=root:users:qf:vg:rh-sso-knarra-redhat-com:lw1:kubernetes

apibinding kubernetes-1pre20xf for apiexport root:compute:kubernetes created. placement created. error: bind compute is not ready : resource name may not be empty

[knarra@knarra root-org]$ kubectl kcp --version kcp version v1.24.3+kcp-v0.10.0

Steps To Reproduce

  1. Install KCP
  2. create location workspace called lw1
  3. create synctarget which supports knative
  4. create workload workspace called ww1
  5. Bind compute to workload workspace using the commandkcp bind compute root:users:qf:vg:rh-sso-knarra-redhat-com:lw1
  6. Realize that have not added required resources for knative during synctarget addition, so run'workload sync --resources & kubectl apply -f " again
  7. create clusterrole and rolebindings in lw1 workspace due to bug https://github.com/kcp-dev/contrib-tmc/issues/61
  8. Now run the command from the workload workspace ww1 kubectl kcp bind compute root:users:qf:vg:rh-sso-knarra-redhat-com:lw1 --apiexports=root:users:qf:vg:rh-sso-knarra-redhat-com:lw1:kubernetes
  9. Since there is a placement already created after step5, i see that command fails with error as described above

Expected Behaviour

Command should not throw any error as it is misleading the user

Additional Context

Tried with -v=9 command and i see that command is trying to create another placement and since there is a placement that already exists the above error is shown is what i understand

verbose output here: https://privatebin.corp.redhat.com/?28c3892a05a334f1#D9QK4pEA4SPxWh2bu32SDTw5wJkmthFKmxALGZaVK3yQ

mjudeikis commented 1 year ago

/transfer-issue contrib-tmc