Fix Istio-proxy cannot collect HTTP-level information (#1209)

This commit is contained in:
Ta-Ching Chen
2019-07-02 00:08:29 +08:00
committed by GitHub
parent 36e544b537
commit 2ba66afb9f
3 changed files with 27 additions and 17 deletions
+8 -6
View File
@@ -217,6 +217,13 @@ func (deploy *NewDeploy) getDeploymentSpec(fn *fv1.Function, env *fv1.Environmen
},
},
},
// https://istio.io/docs/setup/kubernetes/additional-setup/requirements/
Ports: []apiv1.ContainerPort{
{
Name: "http-env",
ContainerPort: int32(8888),
},
},
Resources: resources,
}, env.Spec.Runtime.Container),
},
@@ -362,15 +369,10 @@ func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, svcName
Spec: apiv1.ServiceSpec{
Ports: []apiv1.ServicePort{
{
Name: "runtime-env-port",
Name: "http-env",
Port: int32(80),
TargetPort: intstr.FromInt(8888),
},
{
Name: "fetcher-port",
Port: int32(8000),
TargetPort: intstr.FromInt(8000),
},
},
Selector: deployLabels,
Type: apiv1.ServiceTypeClusterIP,