https://github.com/javajon/cdc-with-k8s
A complete tutorial on how to use the code can be found in my Katacoda scenario here: https://katacoda.com/javajon/courses/kubernetes-pipelines/cdc-with-k8s
https://github.com/javajon/cdc-with-k8s
cdc h2 java kubernetes pact springboot testing
Last synced: 5 months ago
JSON representation
A complete tutorial on how to use the code can be found in my Katacoda scenario here: https://katacoda.com/javajon/courses/kubernetes-pipelines/cdc-with-k8s
- Host: GitHub
- URL: https://github.com/javajon/cdc-with-k8s
- Owner: javajon
- Created: 2020-07-14T01:46:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T19:05:23.000Z (over 1 year ago)
- Last Synced: 2025-03-11T20:22:23.928Z (over 1 year ago)
- Topics: cdc, h2, java, kubernetes, pact, springboot, testing
- Language: Java
- Homepage:
- Size: 49.4 MB
- Stars: 6
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Consumer-driven Contracts with Kubernetes
## Learn how to use the Pact Foundation's framework for CDC testing
This project contains the source code for demonstrating consumer-driven contact testing using [Pact](https://docs.pact.io/). The application aggregates population and COVID-19 datasources and presents data at an API gateway. The entire application and Pact testing runs on Kubernetes. Here is a networking representation of the Pod relationships.

There are 6 directories for the following purposes:
| Directory Name | Purpose |
|-----------------|--------------------------------------------------------|
| aggregator | Public API gateway, aggregates data from _world-pop_ and _covid-19_ microservices. This is the API you will test with Pact. |
| cluster | A collection of Kubernetes YAML-based manifests that define how each microservice, Pod, Deployment, and Service will run on your Kubernetes cluster. |
| covid-19 | A microservice that serves the COVID-19 data, updated daily, for each country on our blue marble. |
| h2-seeder | A small container that runs as an _initContainer_ that seeds the H2 database Pod when it starts. The data is the human population for all the countries and major cities on our blue marble. |
| pact | Here is one consumer. The Node.js code is independent of the Kubernetes cluster and by running a Pact test it creates a Pact contract |
| world-pop | A microservice that serves the world population data in the H2 database. |
In summary, the aggregator serves data combining the daily COVID-19 metrics with the world population.
For a complete tutorial on how this all works follow this interactive O'Reilly Media lab: [Consumer-driven Contracts with Kubernetes](https://www.dijure.com/categories/testing/)