Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the binding controller need to watch the cfapp resource #3527

Open
georgethebeatle opened this issue Oct 17, 2024 · 0 comments
Open

Does the binding controller need to watch the cfapp resource #3527

georgethebeatle opened this issue Oct 17, 2024 · 0 comments
Labels

Comments

@georgethebeatle
Copy link
Member

Background

While introducing support for service bindings to managed service instances we spotted two things

  • The binding controller is currently watching the cfapp resource

  • In the reconcile method of the binding controller we are getting the cfapp and do not do anything with the object (other than returning an error if the get operation fails)

Action to take

  • Find out if this behaviour is really needed and remove it if not.
  • If the app lookup is needed just to validate that the app is there we could just get it without assigning it to a local var to make it clear that the get is intentional and that we do not need to look at the result
r.k8sClient.Get(ctx, types.NamespacedName{Name: cfServiceBinding.Spec.AppRef.Name, Namespace: cfServiceBinding.Namespace}, new(korifiv1alpha1.CFApp))

Dev notes

  • One reason to watch apps from the binding controller might be to allow us to make a binding unready once its app goes away
  • Even if the avove is true do we still need to lookup the app? Wouldn't the servicebinding.io binding beome unready if the statefulset goes away? In this case the cfServiceBinding will also go into a bad state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🇪🇺 To do
Development

No branches or pull requests

1 participant