The Spring Boot Convention Server is a bundle of smaller conventions applied to any Spring Boot Application submitted to the supply chain in which the convention controller is configured.
The Spring Boot Convention Server looks inside the image such as the following docker inspect
command:
$ docker inspect springio/petclinic
[
{
"Id": "sha256:...",
"RepoTags": [
"springio/petclinic:latest"
],
"RepoDigests": [
"springio/petclinic@sha256:..."
],
"Parent": "",
"Container": "",
...
"ContainerConfig": {
"Hostname": "",
"Domainname": "",
"User": "",
...
"Labels": null
},
"DockerVersion": "",
"Author": "",
"Config": {
...
]
The convention server searches inside the image for Config -> Labels -> io.buildpacks.build.metadata
to find the bom
file. It looks inside the bom
file for metadata to evaluate whether the convention is to be applied.
For the list of conventions, see Conventions.
If you have trouble, you can retrieve and examine the logs from the Spring Boot Convention Server as follows:
-
The Spring Boot Convention Server creates a namespace to contain all of the associated resources, by default the namespace is
spring-boot-convention
. Inspect the logs using the following command:$ kubectl logs -l app=spring-boot-webhook -n spring-boot-convention {"level":"info","timestamp":"2021-11-11T16:00:26.597Z","caller":"spring-boot-conventions/server.go:83","msg":"Successfully applied convention: spring-boot","component":"spring-boot-conventions"} {"level":"info","timestamp":"2021-11-11T16:00:26.597Z","caller":"spring-boot-conventions/server.go:83","msg":"Successfully applied convention: spring-boot-graceful-shutdown","component":"spring-boot-conventions"} {"level":"info","timestamp":"2021-11-11T16:00:26.597Z","caller":"spring-boot-conventions/server.go:83","msg":"Successfully applied convention: spring-boot-web","component":"spring-boot-conventions"} {"level":"info","timestamp":"2021-11-11T16:00:26.597Z","caller":"spring-boot-conventions/server.go:83","msg":"Successfully applied convention: spring-boot-actuator","component":"spring-boot-conventions"} {"level":"info","timestamp":"2021-11-11T16:00:26.597Z","caller":"spring-boot-conventions/server.go:83","msg":"Successfully applied convention: service-intent-mysql","component":"spring-boot-conventions"}
-
For all of the conventions that were applied successfully, a log entry is added. In case of an error, a log entry is added with a description.