salaboy / from-monolith-to-k8s

Workshop-style guide for creating Cloud-Native applications running on top of Kubernetes
http://salaboy.com
Apache License 2.0
342 stars 96 forks source link

Add Java objects for function input/output JSON structures #39

Closed ciberkleid closed 1 year ago

ciberkleid commented 2 years ago

Changes

  1. Add instructions to deploy Conference Application to a separate namespace
  2. Update app to compile and build container using Java 17 (to support records in code)
  3. Create Java objects for JSON structures for input and output of controller function
  4. Update controller function code to use new input and output objects

/kind enhancement

ciberkleid commented 2 years ago

Additional changes:

  1. Added kubernetes-controllers/metacontroller/func-conference-controller/setup.sh file to document setup steps more precisely. This script is really intended to be a guide for manually running each command, not really for executing the script all at once, but I think it is useful a step towards clarifying the guidance on running the example (WIP).
  2. Incorporated use of Kubernetes API for creating Deployment resource
  3. Re-factored code for organization and clarity (moved records representing input and output to separate classes, and other minor refactoring)

Pending:

  1. Enhance Java objects representing input and output to cover more of the CompositeController structure defined here
  2. Move Java objects representing Metacontroller types to a separate repo and make accessible as a maven download
  3. Bonus: Provide a Spring Boot Starter that pulls in library from #2 and also adds hints for AOT compilation. Starting to explore this here (WIP)
salaboy commented 2 years ago

@ciberkleid do you want me to merge these changes.. i think they are ready, but I am not sure if you will keep adding changes here.

ciberkleid commented 2 years ago

Additional changes:

  1. Updated controller to create separate Deployments per Conference resource (added parent name to Deployment name)
  2. Updated README (added images and explanations)
  3. Pushing func-amd.yaml and func-arm.yaml files to be used as appropriate. Leaving default func.yaml file as is (same as func-amd.yaml)
  4. Backed out a change from pom.xml that was causing build to fail if javaformatter was not called first

Also: Added README2.md with text that was originally in README.md but that I am not sure if it needs to stay. If there is value to be transferred from README2.md to README.md, I am happy to do it.

salaboy commented 1 year ago

@ciberkleid can I merge this PR as my Xmas gift? All these changes are awesome, but I need to know if they are working or not.. I am really considering adding this material as an appendix on my book