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

[KOGITO-9265] Add the PodSpecTemplate to the SonataFlow CR #255

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

ricardozanini
Copy link
Member

@ricardozanini ricardozanini commented Sep 11, 2023

Description of the change:
In this PR:

  1. Complete refactor of controllers/profiles method. Now more clear and easier to maintain. Each profile has its own module and a common one to share features between them. Smaller names, funcs, and revisited structs. Unused code removed.
  2. Since now the SonataFlow CRD is huge (thanks, podSpecTemplate!) we needed to change from kubectl apply to kubectl create in CRDs creation. I'll try to revisit the makefile since the deploy and install are trying to apply the same artifacts. The first one should only install the CRDs, the latter the other resources.

TODO:

Motivation for the change:
See https://issues.redhat.com/browse/KOGITO-9265

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the SonataFlow status, when an image is specified, the condition states the following:

status:
  address: {}
  conditions:
  - lastUpdateTime: "2023-09-19T08:32:17Z"
    status: Unknown
    type: Built

Perhaps when an image is specified the status can be set to Obsolete or Skipped to highlight no build was executed by this flow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Usually Unknown is the convention, but I liked Skipped for this use case. I'll add it. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@masayag what I did was Built = False, Reason: BuildSkipped. Can you give it a try?

Signed-off-by: Ricardo Zanini <[email protected]>
@apache apache deleted a comment from kie-ci Sep 21, 2023
@ricardozanini ricardozanini marked this pull request as ready for review September 22, 2023 16:00
Copy link
Contributor

@wmedvede wmedvede left a comment

Choose a reason for hiding this comment

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

I have left some comments in case it could make sense and some silly questions.
Thanks.

Signed-off-by: Ricardo Zanini <[email protected]>
@ricardozanini
Copy link
Member Author

ricardozanini commented Sep 25, 2023

@wmedvede I've made small changes to the API to reflect the PodTemplateSpec naming. Not sure why I inverted, might be a brain fart or due to discussions with @masayag. We used to call it that. @masayag wanna chime in about the naming change in the API?

Basically, we now have spec.podTemplate.container and spec.podTemplate for custom deployment changes. I think shorter is better.

Signed-off-by: Ricardo Zanini <[email protected]>
@ricardozanini ricardozanini merged commit 2bfd0ff into apache:main Sep 27, 2023
4 checks passed
@ricardozanini ricardozanini deleted the kogito-9265 branch September 27, 2023 18:09
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.

6 participants