java-spring-boot

by it@M

Helm chartv1.1.4Verified publisher

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

KeyTypeDefaultDescription
replicaCountint1replicaset count
revisionHistoryLimitint10number of old history to retain to allow rollback
deploymentStrategyobjecttype: RollingUpdateDeployment strategy, default RollingUpdate
imagePullSecretslist[]Image pull secrets specification
image.pullPolicystring"IfNotPresent"Image pull policy
image.repositorystring""Image to use for deploying, required
image.tagstring""Image tag, required
nameOverridestring""Override chart name
fullnameOverridestring""Override fullname
serviceAccount.createbooltrueCreate service account
serviceAccount.automountbooltrueAutomatically mount the ServiceAccount's API credentials
serviceAccount.annotationsobject{}Service account annotations
serviceAccount.namestring""Service account name. If not set and create is true, a name is generated using the fullname template
podAnnotationsobject{}Pod annotations
podLabelsobject{}Pod labels
podSecurityContextobject{}Pod Security Context
securityContextobject{}Security Context
service.portint8080Service port
service.typestring"ClusterIP"Service type
ingress.enabledboolfalseEnable ingress
ingress.extraLabelsobject{}Extra labels for the ingress
ingress.annotationsobject{}
ingress.classNamestring""
ingress.hostslist[]
ingress.tlslist[]
resourcesobject{}CPU / Memory resource requests and limits
livenessProbeobjecthttpGet:  path: /actuator/health/liveness  port: httptimeoutSeconds: 15periodSeconds: 10failureThreshold: 5Liveness probe
readinessProbeobjecthttpGet:  path: /actuator/health/readiness  port: httptimeoutSeconds: 15periodSeconds: 10failureThreshold: 5Readiness probe
startupProbeobjecthttpGet:  path: /actuator/health/liveness  port: httptimeoutSeconds: 5periodSeconds: 10failureThreshold: 30Startup probe
autoscaling.enabledboolfalseEnables Horizontal Pod Autoscaling (HPA)
autoscaling.minReplicasint1HPA minimum replicas
autoscaling.maxReplicasint5HPA maximum replicas
autoscaling.targetCPUUtilizationPercentageint80

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartjava-spring-boot is pinned at v1.1.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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