Skip to content

Commit

Permalink
kubeinject test is working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jianfei Hu committed Jan 23, 2019
1 parent 14c99b5 commit 0815695
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pilot/pkg/kube/inject/app_probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func createProbeRewritePatch(podSpec *corev1.PodSpec, spec *SidecarInjectionSpec
return nil
}
// Change the application containers' probe to point to sidecar's status port.
// TODO: here rewrite teh rewriteProbe function in new approach.
// TODO: here rewrite the rewriteProbe function in new approach.
rewriteProbe := func(probe *corev1.Probe, portMap map[string]int32, path string) *rfc6902PatchOperation {
return nil
// if probe == nil || probe.HTTPGet == nil {
Expand Down Expand Up @@ -163,13 +163,6 @@ func createProbeRewritePatch(podSpec *corev1.PodSpec, spec *SidecarInjectionSpec
return patch
}

// // rewriteAppHTTPProbe modifies the podSpec HTTP probers to redirect to pilot agent.
// func rewriteAppHTTPProbe(podSpec *corev1.PodSpec, spec *SidecarInjectionSpec) {
// if spec == nil || podSpec == nil || !spec.RewriteAppHTTPProbe {
// return
// }
// statusPort := extractStatusPort(spec)

// extractStatusPort accepts the sidecar container spec and returns its port for healthiness probing.
func extractStatusPort(sidecar *corev1.Container) int {
for i, arg := range sidecar.Args {
Expand Down Expand Up @@ -230,7 +223,7 @@ func rewriteProbe(probe *corev1.Probe, appProbers *status.KubeAppProbers,
httpGet.Path = newURL
}

func rewriteAppHTTPProbe(spec *SidecarInjectionSpec, podSpec *corev1.PodSpec) {
func rewriteAppHTTPProbe(podSpec *corev1.PodSpec, spec *SidecarInjectionSpec) {
if spec == nil || podSpec == nil {
return
}
Expand Down

0 comments on commit 0815695

Please sign in to comment.