Skip to content

Instantly share code, notes, and snippets.

View ojhughes's full-sized avatar

Ollie Hughes ojhughes

View GitHub Profile
@Override
public Flux<DeploymentState> deploy(AppDeploymentRequest request) {
logger.trace("Entered deploy: Deploying AppDeploymentRequest: AppDefinition = {}, Resource = {}, Deployment Properties = {}",
request.getDefinition(), request.getResource(), request.getDeploymentProperties());
String deploymentId = deploymentId(request);
logger.trace("deploy: Pushing application");
return pushApplication(deploymentId, request)
.timeout(Duration.ofSeconds(this.deploymentProperties.getApiTimeout()))
.doOnError(error -> {
@ojhughes
ojhughes / bootstrap-k8s-spring-project.md
Last active January 25, 2024 21:51
Bootstrapping a Spring project for deployment on Kubernetes with a few commands.

This is my current "dev workflow" for quickly bootstrapping an Spring app on a Kubernetes cluster. The general approach is polyglot but you will need to use something like https://buildpacks.io instead of Jib to support non-JVM projects

This example uses skaffold and kapp so you will need to install from https://skaffold.dev/docs/install/ & https://k14s.io/ You will also need kubectl installed and a Kubernetes cluster targetted. You can use Minikube, Kind or K3S for lightweight, local Kubernetes environment

export APPNAME=bootstrap-k8s
export DOCKER_REGISTRY=ojhughes