-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add consumer driven contract testing
- Loading branch information
1 parent
0cf39ca
commit f12d80f
Showing
24 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
address-validation-service/deployment/base/deployment.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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: address-validation-deployment | ||
labels: | ||
app: address-validation-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: address-validation-service | ||
template: | ||
metadata: | ||
labels: | ||
app: address-validation-service | ||
spec: | ||
containers: | ||
- name: address-validation | ||
image: address-validation:latest | ||
ports: | ||
- containerPort: 4003 | ||
name: http |
6 changes: 6 additions & 0 deletions
6
address-validation-service/deployment/base/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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- deployment.yaml | ||
- service.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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: address-validation-service | ||
spec: | ||
selector: | ||
app: address-validation-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4003 | ||
targetPort: 4003 | ||
nodePort: 30090 | ||
name: service |
19 changes: 19 additions & 0 deletions
19
address-validation-service/deployment/overlays/prod/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,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: prod | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
version: v1 | ||
kind: Service | ||
name: address-validation-service | ||
path: ./patches/port-patch.yaml | ||
|
||
images: | ||
- name: address-validation | ||
newName: localhost:30010/address-validation | ||
newTag: 1.1.0-SNAPSHOT |
14 changes: 14 additions & 0 deletions
14
address-validation-service/deployment/overlays/prod/patches/port-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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: address-validation-service | ||
spec: | ||
selector: | ||
app: address-validation-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4003 | ||
targetPort: 4003 | ||
nodePort: 31090 | ||
name: service |
12 changes: 12 additions & 0 deletions
12
address-validation-service/deployment/overlays/test/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,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: test | ||
|
||
resources: | ||
- ../../base | ||
|
||
images: | ||
- name: address-validation | ||
newName: localhost:30010/address-validation | ||
newTag: 1.1.0-SNAPSHOT |
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: billing-deployment | ||
labels: | ||
app: billing-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: billing-service | ||
template: | ||
metadata: | ||
labels: | ||
app: billing-service | ||
spec: | ||
containers: | ||
- name: billing | ||
image: billing:latest | ||
ports: | ||
- containerPort: 4001 | ||
name: http |
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- deployment.yaml | ||
- service.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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: billing-service | ||
spec: | ||
selector: | ||
app: billing-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4001 | ||
targetPort: 4001 | ||
nodePort: 30070 | ||
name: service |
19 changes: 19 additions & 0 deletions
19
billing-service/deployment/overlays/prod/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,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: prod | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
version: v1 | ||
kind: Service | ||
name: billing-service | ||
path: ./patches/port-patch.yaml | ||
|
||
images: | ||
- name: billing | ||
newName: localhost:30010/billing | ||
newTag: 1.1.0-SNAPSHOT |
14 changes: 14 additions & 0 deletions
14
billing-service/deployment/overlays/prod/patches/port-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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: billing-service | ||
spec: | ||
selector: | ||
app: billing-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4001 | ||
targetPort: 4001 | ||
nodePort: 31070 | ||
name: service |
12 changes: 12 additions & 0 deletions
12
billing-service/deployment/overlays/test/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,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: test | ||
|
||
resources: | ||
- ../../base | ||
|
||
images: | ||
- name: billing | ||
newName: localhost:30010/billing | ||
newTag: 1.1.0-SNAPSHOT |
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: customer-deployment | ||
labels: | ||
app: customer-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: customer-service | ||
template: | ||
metadata: | ||
labels: | ||
app: customer-service | ||
spec: | ||
containers: | ||
- name: customer | ||
image: customer:latest | ||
ports: | ||
- containerPort: 4000 | ||
name: http | ||
env: | ||
- name: BILLING_SERVICE_URL | ||
value: http://billing-service:4001 | ||
- name: DELIVERY_SERVICE_URL | ||
value: http://delivery-service:4002 |
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- deployment.yaml | ||
- service.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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: customer-service | ||
spec: | ||
selector: | ||
app: customer-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4000 | ||
targetPort: 4000 | ||
nodePort: 30060 | ||
name: service |
19 changes: 19 additions & 0 deletions
19
customer-service/deployment/overlays/prod/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,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: prod | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
version: v1 | ||
kind: Service | ||
name: customer-service | ||
path: ./patches/port-patch.yaml | ||
|
||
images: | ||
- name: customer | ||
newName: localhost:30010/customer | ||
newTag: 1.1.0-SNAPSHOT |
14 changes: 14 additions & 0 deletions
14
customer-service/deployment/overlays/prod/patches/port-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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: customer-service | ||
spec: | ||
selector: | ||
app: customer-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4000 | ||
targetPort: 4000 | ||
nodePort: 31060 | ||
name: service |
12 changes: 12 additions & 0 deletions
12
customer-service/deployment/overlays/test/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,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: test | ||
|
||
resources: | ||
- ../../base | ||
|
||
images: | ||
- name: customer | ||
newName: localhost:30010/customer | ||
newTag: 1.1.0-SNAPSHOT |
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,52 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: delivery-deployment | ||
labels: | ||
app: delivery-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: delivery-service | ||
template: | ||
metadata: | ||
labels: | ||
app: delivery-service | ||
spec: | ||
containers: | ||
- name: delivery | ||
image: delivery:latest | ||
ports: | ||
- containerPort: 4002 | ||
name: http | ||
env: | ||
- name: ADDRESS_VALIDATION_SERVICE_URL | ||
value: http://address-validation-service:4003 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: delivery-db-deployment | ||
labels: | ||
app: delivery-db | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: delivery-db | ||
template: | ||
metadata: | ||
labels: | ||
app: delivery-db | ||
spec: | ||
containers: | ||
- name: delivery-postgres | ||
image: host.docker.internal:5000/delivery-db:local | ||
ports: | ||
- containerPort: 5432 | ||
env: | ||
- name: POSTGRES_USER | ||
value: delivery-service | ||
- name: POSTGRES_PASSWORD | ||
value: delivery-password |
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- deployment.yaml | ||
- service.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,28 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: delivery-service | ||
spec: | ||
selector: | ||
app: delivery-service | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 4002 | ||
targetPort: 4002 | ||
nodePort: 30080 | ||
name: service | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: delivery-db | ||
spec: | ||
selector: | ||
app: delivery-db | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 5432 | ||
targetPort: 5432 | ||
name: service |
19 changes: 19 additions & 0 deletions
19
delivery-service/deployment/overlays/prod/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,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: prod | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
version: v1 | ||
kind: Service | ||
name: delivery-service | ||
path: ./patches/port-patch.yaml | ||
|
||
images: | ||
- name: delivery | ||
newName: localhost:30010/delivery | ||
newTag: 1.1.0-SNAPSHOT |
Oops, something went wrong.