Skip to content

Commit

Permalink
use new flag name
Browse files Browse the repository at this point in the history
* we have switched to system-internal-tls
  • Loading branch information
KauzClay committed Oct 5, 2023
1 parent 58256a7 commit bf69494
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
8 changes: 4 additions & 4 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ toggle_feature allow-zero-initial-scale false config-autoscaler || fail_test

go_test_e2e -timeout=2m ./test/e2e/domainmapping ${E2E_TEST_FLAGS} || failed=1

toggle_feature dataplane-trust enabled 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/internalencryption ${E2E_TEST_FLAGS} || failed=1
toggle_feature dataplane-trust disabled config-network || fail_test
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 dataplane-trust
# 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"

kubectl get cm "config-gc" -n "${SYSTEM_NAMESPACE}" -o yaml > "${TMP_DIR}"/config-gc.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Internal Encryption E2E Tests
# System Internal TLS E2E Tests

In order to test Internal Encryption, this test turns enables request logging and sets the request log template to `TLS: {{.Request.TLS}}`.
In order to test System Internal TLS, this test turns enables request logging and sets the request log template to `TLS: {{.Request.TLS}}`.

The test setup will enable Internal Encryption, and then configure the logging settings.
The test setup will enable System Internal TLS, and then configure the logging settings.

The test then deploys and attempts to reach the HelloWorld test image.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package internalencryption
package systeminternaltls

import (
"bufio"
"bytes"
"context"
"crypto/tls"
"fmt"
"io"
"strings"
Expand All @@ -32,23 +31,13 @@ import (
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
netcfg "knative.dev/networking/pkg/config"
"knative.dev/pkg/system"
pkgTest "knative.dev/pkg/test"
"knative.dev/pkg/test/spoof"
"knative.dev/serving/test"
v1test "knative.dev/serving/test/v1"
)

var (
ExpectedSecurityMode = netcfg.TrustEnabled
)

type RequestLog struct {
RequestURL string `json:"requestUrl"`
TLS tls.ConnectionState `json:"tls"`
}

// TestInternalEncrytion tests the TLS connections between system components.
func TestInternalEncryption(t *testing.T) {
if !test.ServingFlags.EnableAlphaFeatures {
Expand Down

0 comments on commit bf69494

Please sign in to comment.