From 6462888ba41e0db3123cb760cd2f3b307b843e56 Mon Sep 17 00:00:00 2001 From: Jan Weyrich Date: Mon, 6 Jun 2022 12:56:32 +0200 Subject: [PATCH 1/4] fix typos Signed-off-by: Jan Weyrich --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 56a438d..3473a41 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,27 @@ # Simple demo app for k8s -The goal is to have a simple app which can be used to demonstrate some features you can use in k8s. + +The goal is to have a simple app that can be used to demonstrate some features you can use in k8s. This demo app uses spring boot and a h2-database as technologies. ## Features - - endpoint for heath check, which can be controled via environment variable - - endpoint for readiness check, which can be controled via rest endpoint + + - endpoint for a health check, which can be controlled via environment variable + - endpoint for a readiness check, which can be controlled via rest endpoint - background-color and some text customizable via spring config ## Running + Run with docker ```shell docker run -p 8080:8080 viadee/k8s-demo-app:latest ``` - Then browse to ```http://localhost:8080``` + Then browse to `http://localhost:8080` ## Building - This is a simple maven project. Just run ```maven package```. - Or just do a local docker build: ```docker build -t imagename .``` + This is a simple maven project. Just run `maven package`. + + Or just do a local docker build: `docker build -t imagename .` Then you can run the container locally. From 57aa2024adc61346284555c7c81ca12a92c72a97 Mon Sep 17 00:00:00 2001 From: Jan Weyrich Date: Mon, 6 Jun 2022 12:56:46 +0200 Subject: [PATCH 2/4] bump up spring boot parent to 2.7.0 Signed-off-by: Jan Weyrich --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0fdc2c..c7df19c 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.6.5 + 2.7.0 From 81aa81a9a767c5d096eefd5c824c8d2f609c2487 Mon Sep 17 00:00:00 2001 From: Jan Weyrich Date: Mon, 6 Jun 2022 12:57:01 +0200 Subject: [PATCH 3/4] fix bootstrap refs Signed-off-by: Jan Weyrich --- src/main/resources/templates/fragments/footer.html | 2 +- src/main/resources/templates/fragments/header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html index 5ce769d..7b441be 100644 --- a/src/main/resources/templates/fragments/footer.html +++ b/src/main/resources/templates/fragments/footer.html @@ -9,7 +9,7 @@
+ src="webjars/bootstrap/5.1.3/js/bootstrap.min.js">
diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index 3bbaca4..2444632 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -3,7 +3,7 @@
+ href="webjars/bootstrap/5.1.3/css/bootstrap.min.css" /> K8s Test App
From b76f103dffca113b91fa2d6846e8dc41b9e2c0bf Mon Sep 17 00:00:00 2001 From: Jan Weyrich Date: Mon, 6 Jun 2022 13:08:27 +0200 Subject: [PATCH 4/4] add k8s config Signed-off-by: Jan Weyrich --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index c7df19c..5d906a6 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,11 @@ h2 runtime + + org.springframework.cloud + spring-cloud-starter-kubernetes-client-config + 2.1.3 + org.springframework.boot spring-boot-starter-test