-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- These reflect the different test cases - sameness.yaml defines the ordered list of failovers - static-server responds with a unique name so we can track failover order - static-client includes both DNS and CURL in the image used so we can exec in for testing
- Loading branch information
1 parent
7bb0a57
commit 4759de7
Showing
22 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
acceptance/tests/fixtures/bases/exportedservices-ap1/exportedservices-ap1.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,9 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ExportedServices | ||
metadata: | ||
name: ap1 | ||
spec: | ||
services: [] |
5 changes: 5 additions & 0 deletions
5
acceptance/tests/fixtures/bases/exportedservices-ap1/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,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- exportedservices-ap1.yaml |
5 changes: 5 additions & 0 deletions
5
acceptance/tests/fixtures/bases/sameness-defaults/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,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- sameness.yaml |
12 changes: 12 additions & 0 deletions
12
acceptance/tests/fixtures/bases/sameness-defaults/sameness.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,12 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: SamenessGroup | ||
metadata: | ||
name: mine | ||
spec: | ||
members: | ||
- partition: default | ||
- partition: ap1 | ||
- peer: cluster-01-a | ||
- peer: cluster-01-b | ||
- peer: cluster-02-a | ||
- peer: cluster-03-a |
5 changes: 5 additions & 0 deletions
5
acceptance/tests/fixtures/bases/sameness-peering/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,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- mesh.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 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: Mesh | ||
metadata: | ||
name: mesh | ||
spec: | ||
peering: | ||
peerThroughMeshGateways: 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,12 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceIntentions | ||
metadata: | ||
name: static-server | ||
spec: | ||
destination: | ||
name: static-server | ||
sources: | ||
- name: static-client | ||
namespace: ns1 | ||
samenessGroup: mine | ||
action: allow |
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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- intentions.yaml | ||
- payments-service-resolver.yaml | ||
- service-defaults.yaml |
13 changes: 13 additions & 0 deletions
13
acceptance/tests/fixtures/bases/sameness/payments-service-resolver.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,13 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceResolver | ||
metadata: | ||
name: static-server | ||
spec: | ||
connectTimeout: 15s | ||
failover: | ||
'*': | ||
samenessGroup: mine | ||
policy: | ||
mode: order-by-locality | ||
regions: | ||
- us-west-2 |
6 changes: 6 additions & 0 deletions
6
acceptance/tests/fixtures/bases/sameness/service-defaults.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,6 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceDefaults | ||
metadata: | ||
name: static-server | ||
spec: | ||
protocol: http |
8 changes: 8 additions & 0 deletions
8
acceptance/tests/fixtures/cases/sameness-exported-services/ap1-partition/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/exportedservices-ap1 | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
16 changes: 16 additions & 0 deletions
16
acceptance/tests/fixtures/cases/sameness-exported-services/ap1-partition/patch.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,16 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ExportedServices | ||
metadata: | ||
name: ap1 | ||
spec: | ||
services: | ||
- name: static-server | ||
namespace: ns2 | ||
consumers: | ||
- samenessGroup: mine | ||
- name: mesh-gateway | ||
consumers: | ||
- samenessGroup: mine |
8 changes: 8 additions & 0 deletions
8
...ance/tests/fixtures/cases/sameness-exported-services/default-partition/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/exportedservices-default | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
16 changes: 16 additions & 0 deletions
16
acceptance/tests/fixtures/cases/sameness-exported-services/default-partition/patch.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,16 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ExportedServices | ||
metadata: | ||
name: default | ||
spec: | ||
services: | ||
- name: static-server | ||
namespace: ns2 | ||
consumers: | ||
- samenessGroup: mine | ||
- name: mesh-gateway | ||
consumers: | ||
- samenessGroup: mine |
8 changes: 8 additions & 0 deletions
8
acceptance/tests/fixtures/cases/static-client-sameness/default/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/static-client | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
22 changes: 22 additions & 0 deletions
22
acceptance/tests/fixtures/cases/static-client-sameness/default/patch.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,22 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: static-client | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
'consul.hashicorp.com/connect-inject': 'true' | ||
consul.hashicorp.com/connect-service-upstreams: "static-server.ns2.default:8080" | ||
spec: | ||
containers: | ||
- name: static-client | ||
image: anubhavmishra/tiny-tools:latest | ||
# Just spin & wait forever, we'll use `kubectl exec` to demo | ||
command: ['/bin/sh', '-c', '--'] | ||
args: ['while true; do sleep 30; done;'] | ||
# If ACLs are enabled, the serviceAccountName must match the Consul service name. | ||
serviceAccountName: static-client |
8 changes: 8 additions & 0 deletions
8
acceptance/tests/fixtures/cases/static-client-sameness/partition/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/static-client | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
22 changes: 22 additions & 0 deletions
22
acceptance/tests/fixtures/cases/static-client-sameness/partition/patch.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,22 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: static-client | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
'consul.hashicorp.com/connect-inject': 'true' | ||
consul.hashicorp.com/connect-service-upstreams: "static-server.ns2.ap1:8080" | ||
spec: | ||
containers: | ||
- name: static-client | ||
image: anubhavmishra/tiny-tools:latest | ||
# Just spin & wait forever, we'll use `kubectl exec` to demo | ||
command: ['/bin/sh', '-c', '--'] | ||
args: ['while true; do sleep 30; done;'] | ||
# If ACLs are enabled, the serviceAccountName must match the Consul service name. | ||
serviceAccountName: static-client |
8 changes: 8 additions & 0 deletions
8
acceptance/tests/fixtures/cases/static-server-sameness/default/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/static-server | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
23 changes: 23 additions & 0 deletions
23
acceptance/tests/fixtures/cases/static-server-sameness/default/patch.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,23 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: static-server | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
"consul.hashicorp.com/connect-inject": "true" | ||
spec: | ||
containers: | ||
- name: static-server | ||
image: hashicorp/http-echo:latest | ||
args: | ||
- -text="cluster-01-a" | ||
- -listen=:8080 | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
serviceAccountName: static-server |
8 changes: 8 additions & 0 deletions
8
acceptance/tests/fixtures/cases/static-server-sameness/partition/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 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resources: | ||
- ../../../bases/static-server | ||
|
||
patchesStrategicMerge: | ||
- patch.yaml |
23 changes: 23 additions & 0 deletions
23
acceptance/tests/fixtures/cases/static-server-sameness/partition/patch.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,23 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: static-server | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
"consul.hashicorp.com/connect-inject": "true" | ||
spec: | ||
containers: | ||
- name: static-server | ||
image: hashicorp/http-echo:latest | ||
args: | ||
- -text="cluster-01-b" | ||
- -listen=:8080 | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
serviceAccountName: static-server |