-
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.
* Add sail operator to dependency kustomizations * Add hack/testing to run multi cluster testing scenarios manually on kind clusters * Add kustomize_overlays make targets * Add basic dns testing config for aws,azure,gcp and inmem providers Signed-off-by: Michael Nairn <[email protected]>
- Loading branch information
Showing
18 changed files
with
727 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- istio.yaml |
11 changes: 11 additions & 0 deletions
11
config/dependencies/istio/sail/operator/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,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: istio-system | ||
resources: | ||
- namespace.yaml | ||
helmCharts: | ||
- name: sail-operator | ||
repo: https://istio-ecosystem.github.io/sail-operator | ||
version: 0.1.0 | ||
namespace: istio-system | ||
includeCRDs: true |
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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: istio-system |
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,21 @@ | ||
|
||
|
||
Create two kind clusters (Minimal setup, no kuadrant): | ||
```bash | ||
CLUSTER_COUNT=2 ./hack/testing/test.sh kind-create | ||
``` | ||
|
||
Generate kuadrant deployment overlays for each cluster: | ||
```bash | ||
CLUSTER_COUNT=2 ./hack/testing/test.sh generate-cluster-overlay | ||
``` | ||
|
||
Apply kuadrant deployment overlays for each cluster: | ||
```bash | ||
CLUSTER_COUNT=2 ./hack/testing/test.sh apply-cluster-overlay | ||
``` | ||
|
||
Run a test: | ||
```bash | ||
CLUSTER_COUNT=2 TEST_NS_COUNT=1 ./hack/testing/test.sh test_dnspolicy_simple | ||
``` |
35 changes: 35 additions & 0 deletions
35
hack/testing/config/test-namespace/dns-providers/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,35 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
secretGenerator: | ||
- literals: | ||
- INMEM_INIT_ZONES=kuadrant.local | ||
name: dns-provider-credentials-inmemory | ||
options: | ||
disableNameSuffixHash: true | ||
labels: | ||
kuadrant.io/test-dns-provider: inmemory | ||
type: kuadrant.io/inmemory | ||
#- envs: | ||
# - gcp-credentials.env | ||
# name: dns-provider-credentials-gcp | ||
# options: | ||
# disableNameSuffixHash: true | ||
# labels: | ||
# kuadrant.io/test-dns-provider: gcp | ||
# type: kuadrant.io/gcp | ||
#- envs: | ||
# - aws-credentials.env | ||
# name: dns-provider-credentials-aws | ||
# options: | ||
# disableNameSuffixHash: true | ||
# labels: | ||
# kuadrant.io/test-dns-provider: aws | ||
# type: kuadrant.io/aws | ||
#- envs: | ||
# - azure-credentials.env | ||
# name: dns-provider-credentials-azure | ||
# options: | ||
# disableNameSuffixHash: true | ||
# labels: | ||
# kuadrant.io/test-dns-provider: azure | ||
# type: kuadrant.io/azure |
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/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
hack/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/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 |
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: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: my-route-inmemory | ||
labels: | ||
kuadrant.io/test-dns-provider: inmemory | ||
spec: | ||
parentRefs: | ||
- kind: Gateway | ||
name: prod-web-istio-inmemory | ||
hostnames: | ||
- "myapp.kuadrant.local" | ||
- "myapp2.kuadrant.local" | ||
rules: | ||
- backendRefs: | ||
- name: echo | ||
port: 8080 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: my-route-aws | ||
labels: | ||
kuadrant.io/test-dns-provider: aws | ||
spec: | ||
parentRefs: | ||
- kind: Gateway | ||
name: prod-web-istio-aws | ||
hostnames: | ||
- "myapp.mn.hcpapps.net" | ||
- "myapp2.mn.hcpapps.net" | ||
rules: | ||
- backendRefs: | ||
- name: echo | ||
port: 8080 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: my-route-gcp | ||
labels: | ||
kuadrant.io/test-dns-provider: gcp | ||
spec: | ||
parentRefs: | ||
- kind: Gateway | ||
name: prod-web-istio-gcp | ||
hostnames: | ||
- "myapp.mn.google.hcpapps.net" | ||
- "myapp2.mn.google.hcpapps.net" | ||
rules: | ||
- backendRefs: | ||
- name: echo | ||
port: 8080 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: my-route-azure | ||
labels: | ||
kuadrant.io/test-dns-provider: azure | ||
spec: | ||
parentRefs: | ||
- kind: Gateway | ||
name: prod-web-istio-azure | ||
hostnames: | ||
- "myapp.mn.azure.hcpapps.net" | ||
- "myapp2.mn.azure.hcpapps.net" | ||
rules: | ||
- backendRefs: | ||
- name: echo | ||
port: 8080 |
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/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 |
Oops, something went wrong.