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

add an option to always generate a docker image #253

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

lburgazzoli
Copy link
Contributor

Fixes #246

Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

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

Some comments inline..

@@ -25,6 +25,8 @@ import (
"path"
"strings"

"github.com/scylladb/go-set/strset"
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bored to roll my own set collection :)

{
Key: "integration",
Path: strings.TrimPrefix(s.Name, "/"),
if d.ContainerImage == false {
Copy link
Member

Choose a reason for hiding this comment

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

I think a similar thing should be done for the Knative trait.

return true
}

if d.ContainerImage == true &&
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it makes more sense to move this code in a separate trait, there seems to be two distinct sections in this trait and the deployment trait is not active in all profiles.

Copy link
Contributor Author

@lburgazzoli lburgazzoli Dec 5, 2018

Choose a reason for hiding this comment

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

maybe we should add the deployment to all the profiles and differentiate according to the platform ? I can of course create a new trait but then we have to introduce dependencies among traits i.e. the deploy trait need to know if the integration image has to be created or not to determine if configmaps have to be included or not (and maybe something else)

@lburgazzoli
Copy link
Contributor Author

so I've added some logic in the deploy trait to skip creating resources when running on knative.

btw, I'm wondering if the concept of profiles still matters or if each trait should be responsible about detecting what to do according to the environment.

@nicolaferraro
Copy link
Member

I have the same concerns around profiles, but I think the concept is still useful.

I'm also working on the knative side of deployment. I'm going to open a PR. Sometimes the knative side should create a deployment unfortunately, so I've made the knative trait include a deployment trait by composition.. Let's discuss it in the PR.

@lburgazzoli
Copy link
Contributor Author

maybe a profile should act on the configuration of the traits instead of include/exclude them ?

@nicolaferraro
Copy link
Member

Well, sometimes you need to inspect metadata and cluster configuration to understand the flow you've to use.

Their use to exclude completely a trait from the flow (e.g. exclude Knative in std deployment flow) is useful.. I just don't want to over-engineer them..

@lburgazzoli
Copy link
Contributor Author

yup, don't know what's better.

@nicolaferraro nicolaferraro merged commit 1e1565d into apache:master Dec 6, 2018
@nicolaferraro nicolaferraro mentioned this pull request Dec 6, 2018
@lburgazzoli lburgazzoli deleted the github-246 branch December 6, 2018 08:46
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.

2 participants