-
Notifications
You must be signed in to change notification settings - Fork 352
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
Conversation
There was a problem hiding this 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, |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracked here: #263
e6377b6
to
537c64e
Compare
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 ? |
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 | ||
} | ||
|
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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 ...
@nicolaferraro unless you have anything else to add, I think we can remove wip |
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).