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

[WIP] [KOGITO-8945] Defined a Traits API to customize a Kubernetes Service #87

Closed
wants to merge 6 commits into from

Conversation

amadhusu
Copy link
Contributor

@amadhusu amadhusu commented Apr 4, 2023

Description of the change: https://issues.redhat.com/browse/KOGITO-8945

Motivation for the change: Setting up Traits API similar to Camel's approach to enhance the Profile model of deployment.

Checklist

  • Add or Modify a unit test for your change
  • Have you verified that tall the tests are passing?
How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

@amadhusu amadhusu changed the title [KOGITO-8945] Defined a Traits API to customize a Kubernetes Service [WIP] [KOGITO-8945] Defined a Traits API to customize a Kubernetes Service Apr 4, 2023
@@ -0,0 +1,21 @@
// Copyright 2023 Red Hat, Inc. and/or its affiliates
Copy link
Member

Choose a reason for hiding this comment

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

instead being inside v1alpha08, maybe move to another place, maybe api/common_objects.go or something else, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could do that, but do you suggest moving the trait directory here as well? So all future traits like ingress etc are in something like api/trait/ingress.go for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@spolti As I am not using this struct anymore, this file base.go became unnecessary. Also I moved out the trait directory under api/trait to simplify the hierarchy. Let me know what you think.

api/v1alpha08/trait/base.go Outdated Show resolved Hide resolved
@amadhusu amadhusu requested a review from spolti April 5, 2023 18:42
@@ -86,6 +87,13 @@ type KogitoServerlessPlatformSpec struct {
BuildPlatform api.PlatformBuildSpec `json:"platform,omitempty"`
// Configuration list of configuration properties to be attached to all the Workflow built from this Platform
Configuration ConfigurationSpec `json:"configuration,omitempty"`
// Trait is list of trait properties attached to all Workflows built with Platform
Copy link
Member

Choose a reason for hiding this comment

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

@davidesalerno @amadhusu the purpose of the traits is to identify which trait needs to be configured automatically, right?

if so, don't we need to define it on the cr?

@amadhusu can you please provide a example CR as well the tests for this? If the service trait is auto == true, the service for the workflows needs to be created.

Copy link
Contributor Author

@amadhusu amadhusu Apr 12, 2023

Choose a reason for hiding this comment

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

@spolti There is a sample CR with a basic test case for checking the workflow. I will work on the controller for the implementation of this so we can see it in action. I will create other examples and test cases for different Service Types as well once I am done with the Controller Implementation for the same.

Signed-off-by: Achyut Madhusudan <[email protected]>
MarianMacik pushed a commit to MarianMacik/kogito-serverless-operator that referenced this pull request Oct 3, 2023
Corrected inclusion of template files into Binaries
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.

4 participants