abelsromero / asciiboot

Asciidoctorj + SpringBoot example
4 stars 0 forks source link

Explore quicker k8s life reload #14

Open abelsromero opened 3 years ago

abelsromero commented 3 years ago

https://github.com/dsyer/inner-loop-boot-k8s project uses a different approacj for skaffold based on spring-dev + directily coping only modified classes to pod.

apiVersion: skaffold/v2beta10
kind: Config
build:
  artifacts:
    - image: localhost:5000/apps/demo
#      custom:
#        buildCommand: ./mvnw spring-boot:build-image -P devtools -D spring-boot.build-image.imageName=$IMAGE && docker push $IMAGE
      buildpacks:
        builder: paketobuildpacks/builder:base
        env:
          - BP_MAVEN_BUILD_ARGUMENTS=-P devtools package
        dependencies:
          paths:
            - pom.xml
            - src/main/resources
            - target/classes
      sync:
        manual:
          - src: "src/main/resources/**/*"
            dest: /workspace/BOOT-INF/classes
            strip: src/main/resources/
          - src: "target/classes/**/*"
            dest: /workspace/BOOT-INF/classes
            strip: target/classes/
deploy:
  kustomize:
    paths:
      - "src/k8s/demo/"
abelsromero commented 1 year ago

Tilt could be an options https://github.com/ThomasVitale/developer-experience-java-kubernetes/blob/main/04-tilt/basic/book-service/Tiltfile