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

chore: add istio access logging to tests #3311

Merged
merged 2 commits into from
Nov 13, 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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestKubeScaling(t *testing.T) {
go func() {
defer func() {
if r := recover(); r != nil {
failure.Store(fmt.Errorf("panic in verb: %v at %v", r, time.Now()))
failure.Store(fmt.Errorf("panic calling verb: %v at %v", r, time.Now()))
}
routineStopped.Done()
}()
Expand Down
4 changes: 4 additions & 0 deletions backend/provisioner/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,18 @@ func (s *Service) UploadArtefact(ctx context.Context, req *connect.Request[ftlv1
func (s *Service) GetSchema(ctx context.Context, req *connect.Request[ftlv1.GetSchemaRequest]) (*connect.Response[ftlv1.GetSchemaResponse], error) {
resp, err := s.controllerClient.GetSchema(ctx, req)
if err != nil {
logger := log.FromContext(ctx)
logger.Errorf(err, "get schema failed")
return nil, fmt.Errorf("call to ftl-controller failed: %w", err)
}
return connect.NewResponse(resp.Msg), nil
}

func (s *Service) PullSchema(ctx context.Context, req *connect.Request[ftlv1.PullSchemaRequest], to *connect.ServerStream[ftlv1.PullSchemaResponse]) error {
logger := log.FromContext(ctx)
stream, err := s.controllerClient.PullSchema(ctx, req)
if err != nil {
logger.Errorf(err, "pull schema failed")
return fmt.Errorf("call to ftl-controller failed: %w", err)
}
defer stream.Close()
Expand Down
1 change: 1 addition & 0 deletions deployment/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ setup-istio-cluster: setup-cluster
helm install istiod istio/istiod -n istio-system --wait
fi
kubectl label namespace default istio-injection=enabled --overwrite
kubectl apply -f istio-access-logs.yaml

setup: setup-registry setup-istio-cluster

Expand Down
9 changes: 9 additions & 0 deletions deployment/istio-access-logs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: telemetry.istio.io/v1
kind: Telemetry
metadata:
name: mesh-default
namespace: istio-system
spec:
accessLogging:
- providers:
- name: envoy
Loading