Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change ports and little changes into istio/demo/readme #52

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -27,10 +27,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 @@ -53,12 +53,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