-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: dnspolicy scale testing (kind)
* Add hack/dnspolicy-scale-testing to run multi cluster testing scenarios manually on kind clusters * Add basic dns testing config for aws,azure,gcp and inmem providers Signed-off-by: Michael Nairn <mnairn@redhat.com>
- Loading branch information
Showing
13 changed files
with
575 additions
and
2 deletions.
There are no files selected for viewing
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,31 @@ | ||
## DNSPolicy Scale Testing | ||
|
||
Create two kind clusters with Kuadrant installed: | ||
```bash | ||
CLUSTER_COUNT=2 ./hack/dnspolicy-scale-testing/test.sh kind-create | ||
``` | ||
|
||
Installed namespaced dns operators (optional): | ||
```bash | ||
CLUSTER_COUNT=2 ./hack/dnspolicy-scale-testing/test.sh kind-install-namespaced-dns-operator | ||
``` | ||
|
||
Run a test: | ||
```bash | ||
CLUSTER_COUNT=2 TEST_NS_COUNT=5 ./hack/dnspolicy-scale-testing/test.sh test_dnspolicy_loadbalanced aws | ||
``` | ||
|
||
Cleanup after test: | ||
|
||
Delete all dnspolices created by tests first and ensure all dnsrecords are removed | ||
```shell | ||
kubectl get dnspolicy -l kuadrant.io/test-suite=manual -A --context kind-kuadrant-local-1 | ||
kubectl delete dnspolicy -l kuadrant.io/test-suite=manual -A --context kind-kuadrant-local-1 | ||
kubectl get dnsrecord -A --context kind-kuadrant-local-1 | ||
``` | ||
|
||
Delete all other test suite resources | ||
```shell | ||
kubectl get all,httproutes,gateway,tlspolicy,secrets,issuers -l kuadrant.io/test-suite=manual -A --context kind-kuadrant-local-1 | ||
kubectl delete all,httproutes,gateway,tlspolicy,secrets,issuers -l kuadrant.io/test-suite=manual -A --context kind-kuadrant-local-1 | ||
``` |
71 changes: 71 additions & 0 deletions
71
...g/config/test-namespace/dnspolicy/loadbalanced/dnspolicy_prod-web-istio-loadbalanced.yaml
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,71 @@ | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-inmemory | ||
labels: | ||
kuadrant.io/test-dns-provider: inmemory | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-inmemory | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-inmemory | ||
loadBalancing: | ||
defaultGeo: true | ||
geo: US | ||
weight: 100 | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-aws | ||
labels: | ||
kuadrant.io/test-dns-provider: aws | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-aws | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-aws | ||
loadBalancing: | ||
defaultGeo: true | ||
geo: US | ||
weight: 100 | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-gcp | ||
labels: | ||
kuadrant.io/test-dns-provider: gcp | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-gcp | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-gcp | ||
loadBalancing: | ||
defaultGeo: true | ||
geo: us-east1 | ||
weight: 100 | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-azure | ||
labels: | ||
kuadrant.io/test-dns-provider: azure | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-azure | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-azure | ||
loadBalancing: | ||
defaultGeo: true | ||
geo: GEO-NA | ||
weight: 100 |
8 changes: 8 additions & 0 deletions
8
hack/dnspolicy-scale-testing/config/test-namespace/dnspolicy/loadbalanced/kustomization.yaml
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,8 @@ | ||
resources: | ||
- dnspolicy_prod-web-istio-loadbalanced.yaml | ||
|
||
labels: | ||
- pairs: | ||
kuadrant.io/test-suite: manual | ||
kuadrant.io/test: dnspolicy_prod-web-istio-loadbalanced | ||
includeTemplates: true |
55 changes: 55 additions & 0 deletions
55
...scale-testing/config/test-namespace/dnspolicy/simple/dnspolicy_prod-web-istio-simple.yaml
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,55 @@ | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-inmemory | ||
labels: | ||
kuadrant.io/test-dns-provider: inmemory | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-inmemory | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-inmemory | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-aws | ||
labels: | ||
kuadrant.io/test-dns-provider: aws | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-aws | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-aws | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-gcp | ||
labels: | ||
kuadrant.io/test-dns-provider: gcp | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-gcp | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-gcp | ||
--- | ||
apiVersion: kuadrant.io/v1 | ||
kind: DNSPolicy | ||
metadata: | ||
name: prod-web-azure | ||
labels: | ||
kuadrant.io/test-dns-provider: azure | ||
spec: | ||
targetRef: | ||
name: prod-web-istio-azure | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
providerRefs: | ||
- name: dns-provider-credentials-azure |
8 changes: 8 additions & 0 deletions
8
hack/dnspolicy-scale-testing/config/test-namespace/dnspolicy/simple/kustomization.yaml
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,8 @@ | ||
resources: | ||
- dnspolicy_prod-web-istio-simple.yaml | ||
|
||
labels: | ||
- pairs: | ||
kuadrant.io/test-suite: manual | ||
kuadrant.io/test: dnspolicy_prod-web-istio-simple | ||
includeTemplates: true |
34 changes: 34 additions & 0 deletions
34
hack/dnspolicy-scale-testing/config/test-namespace/echo-app/echo-app.yaml
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,34 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: echo | ||
spec: | ||
ports: | ||
- name: http-port | ||
port: 8080 | ||
targetPort: http-port | ||
protocol: TCP | ||
selector: | ||
app: echo | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: echo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: echo | ||
template: | ||
metadata: | ||
labels: | ||
app: echo | ||
spec: | ||
containers: | ||
- name: echo | ||
image: docker.io/jmalloc/echo-server | ||
ports: | ||
- name: http-port | ||
containerPort: 8080 | ||
protocol: TCP |
7 changes: 7 additions & 0 deletions
7
hack/dnspolicy-scale-testing/config/test-namespace/echo-app/kustomization.yaml
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,7 @@ | ||
resources: | ||
- echo-app.yaml | ||
|
||
labels: | ||
- pairs: | ||
kuadrant.io/test-suite: manual | ||
includeTemplates: true |
151 changes: 151 additions & 0 deletions
151
hack/dnspolicy-scale-testing/config/test-namespace/gateway_prod-web-istio.yaml
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,151 @@ | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: prod-web-istio-inmemory | ||
labels: | ||
kuadrant.io/test-dns-provider: inmemory | ||
spec: | ||
gatewayClassName: istio | ||
listeners: | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api | ||
hostname: "myapp.kuadrant.local" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2 | ||
hostname: "myapp2.kuadrant.local" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api-secure | ||
hostname: "myapp.kuadrant.local" | ||
port: 443 | ||
protocol: HTTPS | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2-secure | ||
hostname: "myapp2.kuadrant.local" | ||
port: 443 | ||
protocol: HTTPS | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: prod-web-istio-aws | ||
labels: | ||
kuadrant.io/test-dns-provider: aws | ||
spec: | ||
gatewayClassName: istio | ||
listeners: | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api | ||
hostname: "myapp.scale.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2 | ||
hostname: "myapp2.scale.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api-secure | ||
hostname: "myapp.scale.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2-secure | ||
hostname: "myapp2.scale.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: prod-web-istio-gcp | ||
labels: | ||
kuadrant.io/test-dns-provider: gcp | ||
spec: | ||
gatewayClassName: istio | ||
listeners: | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api | ||
hostname: "myapp.scale.google.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2 | ||
hostname: "myapp2.scale.google.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api-secure | ||
hostname: "myapp.scale.google.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2-secure | ||
hostname: "myapp2.scale.google.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: prod-web-istio-azure | ||
labels: | ||
kuadrant.io/test-dns-provider: azure | ||
spec: | ||
gatewayClassName: istio | ||
listeners: | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api | ||
hostname: "myapp.scale.azure.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2 | ||
hostname: "myapp2.scale.azure.hcpapps.net" | ||
port: 80 | ||
protocol: HTTP | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api-secure | ||
hostname: "myapp.scale.azure.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS | ||
- allowedRoutes: | ||
namespaces: | ||
from: Same | ||
name: api2-secure | ||
hostname: "myapp2.scale.azure.hcpapps.net" | ||
port: 443 | ||
protocol: HTTPS |
Oops, something went wrong.