-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into profiling
- Loading branch information
Showing
24 changed files
with
461 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
943115bd3d7cf4bb44ce0a01d4d618984d497d4d | ||
d1c990b8e308d92fe3a76db64f2c9ad11714b0ba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Test description | ||
|
||
This is a TLS ingress gateway SDS test. | ||
The test sets up a number of TLS ingress gateways for a group of httpbin services. | ||
The test creates a group of sleep pods, where each sleep sends HTTPS requests to a httpbin | ||
service periodically. For example, sleep-1 sends HTTPS requests to httpbin-1.example.com, | ||
and sleep-2 sends HTTPS requests to httpbin-2.example.com. The sleep and httpbin are deployed | ||
in a test namespace with prefix "httpbin". | ||
|
||
## To run the SDS test that goes to Citadel | ||
|
||
- Create a GKE cluster and set it as the current cluster. | ||
Here this test is run on the cluster *istio-testing* | ||
on GCP project *istio-security-testing*. | ||
You may use `kubectl config current-context` to confirm that your newly created cluster | ||
is set as the current cluster. | ||
|
||
- Deploy Istio: | ||
Let the root directory of this repo be *ROOT-OF-REPO*. | ||
Run the following commands: | ||
|
||
```bash | ||
cd ROOT-OF-REPO/perf/istio-install | ||
DNS_DOMAIN=your-example-domain EXTRA_VALUES=values-istio-sds-auth.yaml ./setup_istio.sh release-1.5.1 | ||
``` | ||
|
||
You may replace the Istio release | ||
in the command to the Istio release to test. | ||
After running the above script to deploy Istio, wait a moment for Istio to be ready. | ||
|
||
- Deploy workloads that request for certificates through SDS. | ||
*NUM* variable specifies the number of TLS gateway and client workloads. For example, `NUM=100` will | ||
create 100 TLS ingress gateway and 100 ingress secrets, and 100 sleep workloads as clients. | ||
*CLUSTER* variable specifies the cluster for running the test | ||
(the list of clusters can be viewed through "kubectl config get-contexts"). | ||
The following example command will deploy a test namespace, with 10 TLS ingress gateway and 10 sleep workloads in | ||
the namespace. | ||
Note: the number of workloads can be ran depends on the size of your cluster. | ||
|
||
```bash | ||
NUM=100 CLUSTER=gke_istio-security-testing_us-central1-a_istio-testing ./setup_test.sh | ||
``` | ||
|
||
The log in sleep container shows number of requests sent to httpbin and number of successful responses. | ||
|
||
To download a specific version of istioctl and deploy the test worloads using that istioctl binary. | ||
|
||
```bash | ||
NUM=100 CLUSTER=gke_istio-security-testing_us-central1-a_istio-testing ./setup_test.sh 1.5.1 pre-release | ||
``` | ||
|
||
To delete the ingress secrets, use util script cleanup_ingress_secrets.sh. The example below deletes | ||
100 ingress secrets. | ||
|
||
```bash | ||
NUM=100 CLUSTER=gke_istio-security-testing_us-central1-a_istio-testing ./cleanup_ingress_secrets.sh | ||
``` |
27 changes: 27 additions & 0 deletions
27
perf/security/sds-tests/ingress-sds/cleanup_ingress_secrets.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Copyright Istio Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -ex | ||
|
||
NUM=${NUM:?"specify the number of gateway"} | ||
CLUSTER=${CLUSTER:?"specify the cluster for running the test"} | ||
|
||
kubectl -n istio-system delete secret ingress-root | ||
# shellcheck disable=SC2022 | ||
for s in $(kubectl -n istio-system get secrets -oname | grep "httpbin-credential*") | ||
do | ||
kubectl -n istio-system delete "${s}" | ||
done |
Oops, something went wrong.