This is a template repository for kicking off a cloud native spring boot java microservice.
It's solely focused on deployment to kubernetes, the primary build artifacts of the repository are a OCI image and a helm chart. The helm chart is dynamically generated using jkube and it's associated gradle plugin.
- Gradle
- Spring Boot
- Spring MVC
- Spring JPA and JDBC
- Tomcat
- JKube (Kubernetes Deployment and Development Tools)
- Liquibase
Use make deploy
, if the namespace does not exist already run make create-namespace
Use make run
.
If you wish to run directly in your IDE:
- Run
docker-compose up -d
to start the postgres database server. - Run
./gradlew update bootRun
,update
runs the migrations andbootRun
launches the spring boot application
Target | Description |
---|---|
jar | Builds the standalone jar |
image | Builds the OCI image |
run | Runs the OCI image using docker locally |
create | Creates the kubernetes namespace a deploy will go to |
build | Runs the gradle tasks to build the helm chart |
build-dependencies | Runs the helm tasks to pull in sub chart dependencies |
deploy | Deploys the chart to your current kubernetes context |
template | Renders the chart templates to standard kubernetes manifests |
kics | Scan the chart resources with KICS |
- Find and replace all references to
io.github.bryopsida
with appropriate values for your project - Find and replace all references to
spring-boot-starter
with appropriate values for your project - Find and replace all references to
spring-boot-starter-tomcat
with appropriate values for your poject - Find and replace all references to
bryopsida
with appropriate values for your project - Adjust renovate.json (or remove) settings to meet your needs
- After a successful image build, create your first release to trigger a helm publish, this is needed for the upgrade tests to pass