Skip to content

Commit

Permalink
fix: change ports and little changes into istio/demo/readme
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskarzz <[email protected]>
  • Loading branch information
Sanskarzz committed Mar 15, 2024
1 parent 597eb36 commit f2f734b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions demo/istio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()
Expand Down

0 comments on commit f2f734b

Please sign in to comment.