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

Upgrade sbo #2627

Merged
merged 15 commits into from
Sep 27, 2021
Merged

Upgrade sbo #2627

merged 15 commits into from
Sep 27, 2021

Conversation

johnpoth
Copy link
Member

@johnpoth johnpoth commented Sep 9, 2021

This leverages some of the work by @pedjak in sbo-919 that allows us to use SBO as a library. This means that the Service Binding Operator no longers needs to be installed.

This has the benefit of simplifying the code a bit and allows us to upgrade to the latest version (#2553) without having to wait for sbo-#927. It also avoids us having to use SBO as a service through CRDs which was a little messy. I've removed:

  • IntegrationPhaseWaitingForBindings
  • IntegrationConditionServiceBindingsCollectionReady
  • The ability to bind to an existing ServiceBinding (part of the updated specification)
  • Renamed ServiceBinding trait property to "service"

As the specification is still work in progress (which we mention in the docs), I think that's o.k

Thanks !

Release Note

NONE

Copy link
Member

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Much simpler!

You may have to run make build-resources to update the embedded resources.

func installServiceBindings(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error {
return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer,
"/rbac/operator-role-service-binding.yaml",
"/rbac/operator-role-binding-service-binding.yaml",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the operator-role-binding-service-binding.yaml file can also be removed.

@astefanutti
Copy link
Member

The install is failing on OpenShift because of privileges escalation. The admin user that is used to install the operator is not granted permission to get CRDs. I think we can keep a separate RBAC manifest for the permissions required by the embedded SBO, and warn when the install user cannot create it, as we already do for other "addons".

@johnpoth johnpoth force-pushed the upgrade-sbo branch 4 times, most recently from 4af5f1b to 8a56858 Compare September 14, 2021 07:30
@johnpoth
Copy link
Member Author

Thanks for reviewing ! PR should be ok now, switched to ClusterRole/ClusterRoleBinding for CRD rights ... thanks !

}

secret := createSecret(ctx, e.Integration.Namespace)
if secret != nil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason for not injecting binding through SBO default pipeline?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pedjak ! Thanks for taking a look!

The Camel K Operator has it's own pipeline for creating Kubernetes resources (here the Secret). This allows to do versioning and garbage collection when those resources aren't needed anymore. This is why I didn't want SBO to create the Secret through it's default pipeline. I also didn't want it to create the "ServiceBinding" CR as it's not really needed in our "simple" case.

All in all it was a pretty fluid experience using the API

@astefanutti
Copy link
Member

@johnpoth could you please rebase the PR so we can have it merged? Thanks.

@astefanutti
Copy link
Member

The TestBasicSetup test fails consistently. I suspect there is a discrepancy that sneaked in during conflict resolution with the Kustomize PR and the embedded resources. Maybe worth re-running make build-resources.

@johnpoth
Copy link
Member Author

Yeah looks like there was a new test to make sure the correct number of Roles etc... were installed. Looks all good now

@astefanutti
Copy link
Member

Awesome, thanks!

@astefanutti astefanutti merged commit f21b9af into apache:main Sep 27, 2021
@johnpoth johnpoth deleted the upgrade-sbo branch September 27, 2021 15:26
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.

None yet

4 participants