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

Better Knative and Istio integration #261

Merged
merged 6 commits into from
Dec 6, 2018

Conversation

nicolaferraro
Copy link
Member

Submitting for quick review before rebasing.

I've moved the examples in the /examples dir (so they can be easily found).

I've added a Istio trait that adds a rule for contacting the "outside" without hassle.
Added minScale and maxScale config to Knative, with minScale computed automatically to 1 for services that cannot scale down to 0.
I've also changed a bit meta computation.

Also added a full Knative example (with video recording that I'm going to share publicly within a blog post).

@nicolaferraro nicolaferraro added the status/wip Work in progress label Dec 6, 2018
Copy link
Contributor

@lburgazzoli lburgazzoli left a comment

Choose a reason for hiding this comment

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

LGTM, added a few notes about future development

"stub": true,
"test": true,
"validator": true,
"vm": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think such information can be included in the camel catalog and endpoint metadata, do you mind raising an issue at camel side ?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can also add some "hacks" to our catalog generator so we do not need to hard code bits in operator' source

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

And #264

if annotations == nil {
annotations = make(map[string]string)
}
annotations[istioIncludeAnnotation] = t.Allow
Copy link
Contributor

@lburgazzoli lburgazzoli Dec 6, 2018

Choose a reason for hiding this comment

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

for future development: we also need a generic way to inject annotations/labels from integration/context to the resources generated by the traits

Copy link
Member Author

Choose a reason for hiding this comment

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

Tracked here: #263

@nicolaferraro
Copy link
Member Author

I've rebased but now I see in the logs that debug is always enabled (in knative services). Does it happens also in normal deployments @zregvart ?

@nicolaferraro
Copy link
Member Author

Oh, I think I know what happens. Traits are enabled by default when no flag is specified.. We need to rethink it a bit, but for the moment I disable it when not explicitly enabled.

}
return nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this logic could be simple moved down to the apply method, something like:

if r.Enabled != nil && *r.Enabled {
    e.EnvVars["JAVA_DEBUG"] = True
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, the reason why there's a autoconfigure method is mostly because it will be nice in the future to save back in the Integration status (or in the logs) the actual trait configuration used in order to speed-up troubleshooting. Changing it to false in the autoconfigure method already allows to determine if the trait code (apply) has been executed.

Copy link
Contributor

@lburgazzoli lburgazzoli Dec 6, 2018

Choose a reason for hiding this comment

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

yes and no, there's also appliesTo that could determine if a trait should be applied or not :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We're still Java programmers...

Copy link
Contributor

Choose a reason for hiding this comment

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

we definitively need to review traits ...

@lburgazzoli
Copy link
Contributor

@nicolaferraro unless you have anything else to add, I think we can remove wip

@nicolaferraro nicolaferraro removed the status/wip Work in progress label Dec 6, 2018
@lburgazzoli lburgazzoli merged commit e2cb3f0 into apache:master Dec 6, 2018
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