From f2f734bee65abc945ec0b02f4729134097259725 Mon Sep 17 00:00:00 2001 From: Sanskarzz Date: Fri, 15 Mar 2024 15:03:41 +0530 Subject: [PATCH] fix: change ports and little changes into istio/demo/readme Signed-off-by: Sanskarzz --- demo/istio/README.md | 22 +++++++++++----------- main.go | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/demo/istio/README.md b/demo/istio/README.md index 3ab3da28..351a397c 100644 --- a/demo/istio/README.md +++ b/demo/istio/README.md @@ -158,16 +158,16 @@ In the editor, add the extension provider definitions to the mesh configmap. ```yaml data: mesh: |- - extensionProviders: - - name: "kyverno-ext-authz-grpc" - envoyExtAuthzGrpc: - service: "ext-authz.demo.svc.cluster.local" - port: "9000" - - name: "kyverno-ext-authz-http" - envoyExtAuthzHttp: - service: "ext-authz.demo.svc.cluster.local" - port: "8000" - includeRequestHeadersInCheck: ["x-ext-authz"] + extensionProviders: + - name: "kyverno-ext-authz-grpc" + envoyExtAuthzGrpc: + service: "ext-authz.demo.svc.cluster.local" + port: "9000" + - name: "kyverno-ext-authz-http" + envoyExtAuthzHttp: + service: "ext-authz.demo.svc.cluster.local" + port: "8000" + includeRequestHeadersInCheck: ["x-ext-authz"] ``` ### Authorization service @@ -232,7 +232,7 @@ kubectl run test -it --rm --restart=Never --image=busybox -- wget -q --header="x }pod "test" deleted ``` -Calling the sample application again at the `/foo` path with with header `x-ext-authz: deny` will be de. +Calling the sample application again at the `/foo` path with with header `x-ext-authz: deny` will be denied. ```console diff --git a/main.go b/main.go index 5344af74..a933f058 100644 --- a/main.go +++ b/main.go @@ -25,10 +25,10 @@ func NewServers() *Servers { func (s *Servers) startHTTPServer(ctx context.Context) { s.httpServer = &http.Server{ - Addr: ":8080", + Addr: ":8000", Handler: http.HandlerFunc(handler), } - fmt.Println("Starting HTTP server on Port 8080") + fmt.Println("Starting HTTP server on Port 8000") go func() { <-ctx.Done() @@ -51,12 +51,12 @@ func handler(w http.ResponseWriter, r *http.Request) { func (s *Servers) startGRPCServer(ctx context.Context) { - lis, err := net.Listen("tcp", ":9090") + lis, err := net.Listen("tcp", ":9000") if err != nil { log.Fatalf("failed to listen: %v", err) } s.grpcServer = grpc.NewServer() - fmt.Println("Starting GRPC server on Port 9090") + fmt.Println("Starting GRPC server on Port 9000") go func() { <-ctx.Done()