Skip to content

Commit

Permalink
Merge pull request #33 from viadee/feat-32/add-k8s-config
Browse files Browse the repository at this point in the history
Feat 32/add k8s config
  • Loading branch information
CrowdSalat authored Jun 7, 2022
2 parents c11e385 + b76f103 commit 9605ba8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down Expand Up @@ -46,6 +46,11 @@
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-client-config</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<footer>

<script type="text/javascript"
src="webjars/bootstrap/4.1.1/js/bootstrap.min.js"></script>
src="webjars/bootstrap/5.1.3/js/bootstrap.min.js"></script>

</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div th:fragment="header-css">
<!-- this is header-css -->
<link rel="stylesheet" type="text/css"
href="webjars/bootstrap/4.1.1/css/bootstrap.min.css" />
href="webjars/bootstrap/5.1.3/css/bootstrap.min.css" />
<title>K8s Test App</title>
</div>
</head>
Expand Down

0 comments on commit 9605ba8

Please sign in to comment.