java-spring-boot
by it@M
Generic Helm chart to deploy a Spring Boot application on Kubernetes
About this chart
java-spring-boot
Introduction
This chart bootstraps a generic Java / Spring Boot application deployment on a Kubernetes cluster using the Helm package manager.
Installing the Chart
As this is a "generic" chart, make sure you configure at least the image (image.repository and image.tag, see Configuration) you want to rollout.
Then proceed to install this chart using:
helm install my-app-release it-at-m/java-spring-boot --values values.yaml
The command deploys your application on the Kubernetes cluster with minimal configuration. The Configuration section lists the parameters that can be configured during installation.
All noteworthy changes are documented in the CHANGELOG.
Configuration
| Key | Type | Default | Description |
|---|---|---|---|
| replicaCount | int | 1 | replicaset count |
| revisionHistoryLimit | int | 10 | number of old history to retain to allow rollback |
| deploymentStrategy | object | type: RollingUpdate | Deployment strategy, default RollingUpdate |
| imagePullSecrets | list | [] | Image pull secrets specification |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy |
| image.repository | string | "" | Image to use for deploying, required |
| image.tag | string | "" | Image tag, required |
| nameOverride | string | "" | Override chart name |
| fullnameOverride | string | "" | Override fullname |
| serviceAccount.create | bool | true | Create service account |
| serviceAccount.automount | bool | true | Automatically mount the ServiceAccount's API credentials |
| serviceAccount.annotations | object | {} | Service account annotations |
| serviceAccount.name | string | "" | Service account name. If not set and create is true, a name is generated using the fullname template |
| podAnnotations | object | {} | Pod annotations |
| podLabels | object | {} | Pod labels |
| podSecurityContext | object | {} | Pod Security Context |
| securityContext | object | {} | Security Context |
| service.port | int | 8080 | Service port |
| service.type | string | "ClusterIP" | Service type |
| ingress.enabled | bool | false | Enable ingress |
| ingress.extraLabels | object | {} | Extra labels for the ingress |
| ingress.annotations | object | {} | |
| ingress.className | string | "" | |
| ingress.hosts | list | [] | |
| ingress.tls | list | [] | |
| resources | object | {} | CPU / Memory resource requests and limits |
| livenessProbe | object | httpGet: path: /actuator/health/liveness port: httptimeoutSeconds: 15periodSeconds: 10failureThreshold: 5 | Liveness probe |
| readinessProbe | object | httpGet: path: /actuator/health/readiness port: httptimeoutSeconds: 15periodSeconds: 10failureThreshold: 5 | Readiness probe |
| startupProbe | object | httpGet: path: /actuator/health/liveness port: httptimeoutSeconds: 5periodSeconds: 10failureThreshold: 30 | Startup probe |
| autoscaling.enabled | bool | false | Enables Horizontal Pod Autoscaling (HPA) |
| autoscaling.minReplicas | int | 1 | HPA minimum replicas |
| autoscaling.maxReplicas | int | 5 | HPA maximum replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 |
Deploy java-spring-boot with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has java-spring-boot on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartjava-spring-boot is pinned at v1.1.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply