injector changes for health check, pilot agent take over app readines…#10175
injector changes for health check, pilot agent take over app readines…#10175istio-testing merged 3 commits intoistio:release-1.1from
Conversation
…s check. (istio#9266) * WIP injector change to modify istio-proxy. * move out to app_probe.go * Iterating sidecartmpl to find the statusPort. * use the same name for ready path. * Get rewrite work, almost. * Some clean up on test and check one container criteria. * fix the injected test file. * Add inject test for readiness probe itself. * Add missing added test file. * fix helm test. * fix lint. * update header based finding the port. * return to previous injected file status. * fixing TestIntoResource test. * sed fixing all remaining injecting files. * handling named port. * fixing merginge failure. * remove the debug print. * lint fixing. * Apply the suggestions for finding statusPort arg. * Address comments, regex support more port value format. * add app_probe_test.go * add more test. * merge fix the test.
|
/cc @liminw FYI after this merge, release 1.1 mtls can work with liveness and readiness probe. |
|
/test e2e-mixer-no_auth |
| injectCmd.PersistentFlags().StringVar(&imagePullPolicy, "imagePullPolicy", inject.DefaultImagePullPolicy, | ||
| "Sets the container image pull policy. Valid options are Always,IfNotPresent,Never."+ | ||
| "The default policy is IfNotPresent.") | ||
| injectCmd.PersistentFlags().IntVar(&statusPort, "statusPort", inject.DefaultStatusPort, |
There was a problem hiding this comment.
I don't think we can make backward incompatible flag changes.
Keep old flag, add new if needed.
There was a problem hiding this comment.
This is the same flag. I just refactor the flag name with inject.StatusPortCmdFlagName which equals to "statusPort".
| statusPortPattern = regexp.MustCompile(fmt.Sprintf(`^-{1,2}%s(=(?P<port>\d+))?$`, StatusPortCmdFlagName)) | ||
| ) | ||
|
|
||
| func rewriteAppHTTPProbe(spec *SidecarInjectionSpec, podSpec *corev1.PodSpec) { |
There was a problem hiding this comment.
For new (and risky) features - please add a flag or env variable to disable the behavior (that's a generic requirement)
costinm
left a comment
There was a problem hiding this comment.
In general lgtm, but please add env variable or flag, and setting in values.yaml.
I think it should be disabled by default since it changes the behavior, and existing users without mtls should not be affected ( same for mtls users using different port ).
Should this be opt-in at pod level ?
|
I'll do helm install option in a spearate PR on master and then cherrypick that one here. |
Codecov Report
@@ Coverage Diff @@
## release-1.1 #10175 +/- ##
==============================================
+ Coverage 64% 70% +7%
==============================================
Files 559 443 -116
Lines 50830 41529 -9301
==============================================
- Hits 32120 28989 -3131
+ Misses 16904 11134 -5770
+ Partials 1806 1406 -400
Continue to review full report at Codecov.
|
|
I've already have an PR on top of this one ready to do a helm flag guarded. https://github.com/incfly/istio/compare/release-1.1...incfly:health-flag?expand=1 Let's get this in first and I'll send out the other PR separately. This way we can avoid the conflicts we'll have when merging back to master. PTAL, @costinm @nmittler @hzxuzhonghu |
|
/test e2e-dashboard |
|
/lgtm |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu, incfly, nmittler The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@incfly: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/test istio-unit-tests |
* [incubator/jaeger] fix hotrod demo application Signed-off-by: Sébastien Prud'homme <sebastien.prudhomme@gmail.com> * [incubator/jaeger} bump version Signed-off-by: Sébastien Prud'homme <sebastien.prudhomme@gmail.com>
CP #9266 in release 1.1. Pilot agent status server part is already in this branch.
WIP injector change to modify istio-proxy.
move out to app_probe.go
Iterating sidecartmpl to find the statusPort.
use the same name for ready path.
Get rewrite work, almost.
Some clean up on test and check one container criteria.
fix the injected test file.
Add inject test for readiness probe itself.
Add missing added test file.
fix helm test.
fix lint.
update header based finding the port.
return to previous injected file status.
fixing TestIntoResource test.
sed fixing all remaining injecting files.
handling named port.
fixing merginge failure.
remove the debug print.
lint fixing.
Apply the suggestions for finding statusPort arg.
Address comments, regex support more port value format.
add app_probe_test.go
add more test.
merge fix the test.