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

[TEST] [WIP] Debug https_serving_main #15027

Closed
wants to merge 8 commits into from
Closed
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
8 changes: 7 additions & 1 deletion test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function install() {
fi

if (( ENABLE_HA )); then
YTT_FILES+=("${E2E_YAML_DIR}/test/config/chaosduck/chaosduck.yaml")
# YTT_FILES+=("${E2E_YAML_DIR}/test/config/chaosduck/chaosduck.yaml")
YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/ha")
fi

Expand Down Expand Up @@ -401,6 +401,12 @@ function install() {
kubectl delete pod -n ${SYSTEM_NAMESPACE} -l app=activator
kubectl wait --timeout=60s --for=condition=Available deployment -n ${SYSTEM_NAMESPACE} activator
fi

echo "Enable request logging etc"
toggle_feature "loglevel.activator" debug config-logging
toggle_feature "loglevel.queueproxy" debug config-logging
toggle_feature "logging.enable-request-log" true config-observability
toggle_feature "logging.enable-probe-request-log" true config-observability
}

# Check if we should use --resolvabledomain. In case the ingress only has
Expand Down
18 changes: 9 additions & 9 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ toggle_feature cluster-local-domain-tls enabled config-network || fail_test
go_test_e2e -timeout=2m ./test/e2e/clusterlocaldomaintls ${E2E_TEST_FLAGS} || failed=1
toggle_feature cluster-local-domain-tls disabled config-network || fail_test

toggle_feature system-internal-tls enabled config-network || fail_test
toggle_feature "logging.enable-request-log" true config-observability || fail_test
toggle_feature "logging.request-log-template" "TLS: {{.Request.TLS}}" config-observability || fail_test
# with current implementation, Activator must be restarted when configuring system-internal-tls. See https://github.com/knative/serving/issues/13754
restart_pod ${SYSTEM_NAMESPACE} "app=activator"
go_test_e2e -timeout=2m ./test/e2e/systeminternaltls ${E2E_TEST_FLAGS} || failed=1
toggle_feature system-internal-tls disabled config-network || fail_test
toggle_feature enable-request-log false config-observability || fail_test
toggle_feature request-log-template '' config-observability || fail_test
#toggle_feature system-internal-tls enabled config-network || fail_test
#toggle_feature "logging.enable-request-log" true config-observability || fail_test
#toggle_feature "logging.request-log-template" "TLS: {{.Request.TLS}}" config-observability || fail_test
## with current implementation, Activator must be restarted when configuring system-internal-tls. See https://github.com/knative/serving/issues/13754
#restart_pod ${SYSTEM_NAMESPACE} "app=activator"
#go_test_e2e -timeout=2m ./test/e2e/systeminternaltls ${E2E_TEST_FLAGS} || failed=1
#toggle_feature system-internal-tls disabled config-network || fail_test
##toggle_feature enable-request-log false config-observability || fail_test
#toggle_feature request-log-template '' config-observability || fail_test
# with the current implementation, Activator is always in the request path, and needs to be restarted after configuring system-internal-tls
restart_pod ${SYSTEM_NAMESPACE} "app=activator"

Expand Down
11 changes: 6 additions & 5 deletions test/e2e/autoscale_hpa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ func setupHPASvc(t *testing.T, metric string, target int) *TestContext {
resources, err := v1test.CreateServiceReady(t, clients, names,
[]rtesting.ServiceOption{
rtesting.WithConfigAnnotations(map[string]string{
autoscaling.ClassAnnotationKey: autoscaling.HPA,
autoscaling.MetricAnnotationKey: metric,
autoscaling.TargetAnnotationKey: strconv.Itoa(target),
autoscaling.MaxScaleAnnotationKey: fmt.Sprintf("%d", int(maxPods)),
autoscaling.WindowAnnotationKey: "20s",
autoscaling.ClassAnnotationKey: autoscaling.HPA,
autoscaling.MetricAnnotationKey: metric,
autoscaling.TargetAnnotationKey: strconv.Itoa(target),
autoscaling.MaxScaleAnnotationKey: fmt.Sprintf("%d", int(maxPods)),
autoscaling.WindowAnnotationKey: "20s",
"features.knative.dev/http-full-duplex": "Enabled",
}), rtesting.WithResourceRequirements(corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("30m"),
Expand Down
1 change: 1 addition & 0 deletions test/e2e/autoscale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func TestAutoscaleSustaining(t *testing.T) {
test.Options{},
rtesting.WithConfigAnnotations(map[string]string{
autoscaling.MetricAggregationAlgorithmKey: algo,
"features.knative.dev/http-full-duplex": "Enabled",
}))
test.EnsureTearDown(t, ctx.Clients(), ctx.Names())

Expand Down
2 changes: 1 addition & 1 deletion third_party/cert-manager-latest/net-certmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ spec:
memory: 40Mi
limits:
cpu: 300m
memory: 400Mi
memory: 600Mi
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand Down
5 changes: 5 additions & 0 deletions vendor/github.com/tsenart/vegeta/v12/lib/attack.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vendor/knative.dev/pkg/test/logstream/interface.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check failure on line 1 in vendor/knative.dev/pkg/test/logstream/interface.go

View workflow job for this annotation

GitHub Actions / verify / Verify Deps and Codegen

Please run ./hack/update-codegen.sh. diff --git a/vendor/knative.dev/pkg/test/logstream/interface.go b/vendor/knative.dev/pkg/test/logstream/interface.go index 3ce1c8e..a1b39aa 100644 --- a/vendor/knative.dev/pkg/test/logstream/interface.go +++ b/vendor/knative.dev/pkg/test/logstream/interface.go @@ -24,6 +24,7 @@ import ( "sync" "k8s.io/client-go/kubernetes" + "knative.dev/pkg/system" "knative.dev/pkg/test" "knative.dev/pkg/test/helpers" logstreamv2 "knative.dev/pkg/test/logstream/v2" @@ -48,7 +49,7 @@ type ti interface { func Start(t ti) Canceler { // Do this lazily to make import ordering less important. once.Do(func() { - if ns := os.Getenv("serving-tests"); ns != "" { + if ns := os.Getenv(system.NamespaceEnvKey); ns != "" { var err error // handle case when ns contains a csv list namespaces := strings.Split(ns, ",")
Copyright 2019 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -24,7 +24,6 @@
"sync"

"k8s.io/client-go/kubernetes"
"knative.dev/pkg/system"
"knative.dev/pkg/test"
"knative.dev/pkg/test/helpers"
logstreamv2 "knative.dev/pkg/test/logstream/v2"
Expand All @@ -49,7 +48,7 @@
func Start(t ti) Canceler {
// Do this lazily to make import ordering less important.
once.Do(func() {
if ns := os.Getenv(system.NamespaceEnvKey); ns != "" {
if ns := os.Getenv("serving-tests"); ns != "" {
var err error
// handle case when ns contains a csv list
namespaces := strings.Split(ns, ",")
Expand Down
Loading