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

Implementing a global build strategy #1799

Closed
nicolaferraro opened this issue Nov 2, 2020 · 9 comments · Fixed by #2058
Closed

Implementing a global build strategy #1799

nicolaferraro opened this issue Nov 2, 2020 · 9 comments · Fixed by #2058
Assignees
Labels
area/build-operator Related to the internal image build operator
Milestone

Comments

@nicolaferraro
Copy link
Member

I'm thinking to how we can improve global mode and I ended up with the following mechanism.

When using global mode, the platform where the global Operator is installed (camel-system will be the one) should be the default for all namespaces.

If a namespace has no platform (or it has a "empty" special platform, to deal with issues e.g. default kamelets are not installed in current namespace without a platform), then the global platform is used.

The global platform imposes a global build strategy. A local integration kit is not processed locally, instead it is linked to a global kit. It can be linked to an existing global kit, or a new global kit can be created. Status of the local kit will mirror the status of the liked global kit. In the case of OpenShift, upon completion of the global kit, the imagestreams can be also copied over to the local namespace if needed.

This way:

  • Builds are executed in the global namespace and existing kits are shared among all namespaces in the cluster
  • A local namespace can still have a custom platform, falling back to current way of working
  • There seems to be no way for a user in a namespace to "pollute" the global environment, hitting security issues

Wdyt @astefanutti , @lburgazzoli ?

@nicolaferraro nicolaferraro added this to the 1.3.0 milestone Nov 2, 2020
@astefanutti astefanutti added the area/build-operator Related to the internal image build operator label Nov 2, 2020
@lburgazzoli
Copy link
Contributor

lburgazzoli commented Nov 2, 2020

I think we may need to revisit some of the options we have for kits, as example you can define properties, secrets and configmaps and you don't want to share them across tenants I guess.

@nicolaferraro
Copy link
Member Author

Right, restricting this to "platform" traits may be an option. I.e. using the existing strategy for edge cases.

@astefanutti
Copy link
Member

Sounds good to me.

A couple of questions on top of my head:

  • Do IntegrationKit (resp. ImageStream) really need to be mirrored (resp. copied)? It may be possible to avoid copying the ImageStream by binding the system:image-puller role for the global namespace to the local namespace integration service account. Though integration pod defaults to using the default ServiceAccount, and it can be configured in the Integration resource, so I'm not sure how practical that would be.

  • Do we want to share build cache among tenants? For example, do we want to enable the routine build strategy in that global setup?

Relates to #1693.

@nicolaferraro
Copy link
Member Author

Cool, the system:image-puller strategy seems much better.

Yes, I'd like using routine to speed up, as often the external builder download times take a lot of time, especially in local clusters.
Afair, registries cannot be changed by some local user, so libraries should be safe. Except for the Jitpack case...

@astefanutti
Copy link
Member

Right, I think it's also important to revisit the build scheduling that serialises builds, as it is likely to become a bottleneck in a multi-tenant setup.

@nicolaferraro
Copy link
Member Author

Yeah, @lburgazzoli was proposing to experiment with mvnd #1784 , which afaik supports parallel builds. Also the part that pushes to the registry can be parallelized. By parallelizing, we may not do chained builds, but the overall time should be reduced.

@nicolaferraro
Copy link
Member Author

And that's worth doing it in general, not only in the global scenario tbh.

@lburgazzoli
Copy link
Contributor

We also discussed to have some ordering when executing builds: #592

@astefanutti
Copy link
Member

Great, I think that use case is a good driver to move forward on the build ordering / parallelisation work. Granted it's worth doing it in the general case also, as noted by @nicolaferraro.

@nicolaferraro nicolaferraro self-assigned this Nov 13, 2020
@nicolaferraro nicolaferraro modified the milestones: 1.3.0, 1.4.0 Dec 22, 2020
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Feb 19, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Feb 19, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Feb 19, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 1, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Mar 2, 2021
nicolaferraro added a commit that referenced this issue Mar 3, 2021
nicolaferraro added a commit that referenced this issue Mar 3, 2021
nicolaferraro added a commit that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-operator Related to the internal image build operator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants