From d36b5e92fcf8a3e92f91369910f7e32301873715 Mon Sep 17 00:00:00 2001 From: ingmarfjolla Date: Mon, 20 Feb 2023 16:29:53 -0500 Subject: [PATCH 01/13] first draft adding helm charts --- .github/workflows/create-deploy-resources.yml | 4 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 13 + .../templates/deployment.yaml | 112 ++++++++ .../templates/secret.yaml | 10 + .../templates/service.yaml | 103 ++++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 13 + .../templates/deployment.yaml | 204 +++++++++++++++ .../templates/secret.yaml | 10 + .../templates/service.yaml | 72 ++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 13 + .../templates/deployment.yaml | 204 +++++++++++++++ .../templates/secret.yaml | 10 + .../templates/service.yaml | 73 ++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 13 + .../templates/deployment.yaml | 112 ++++++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/route.yaml | 46 ++++ .../templates/secret.yaml | 10 + .../templates/service.yaml | 73 ++++++ .../values.yaml | 24 ++ event-statistics/pom.xml | 7 +- .../Chart.yaml | 4 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 61 +++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 81 ++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 60 +++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 81 ++++++ .../values.yaml | 24 ++ .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 21 ++ .../templates/deployment.yaml | 148 +++++++++++ .../templates/rolebinding.yaml | 12 + .../templates/secret.yaml | 29 +++ .../templates/service.yaml | 134 ++++++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 153 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 50 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 152 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 50 ++++ .../values.yaml | 24 ++ .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 21 ++ .../templates/deployment.yaml | 240 ++++++++++++++++++ .../templates/rolebinding.yaml | 12 + .../templates/secret.yaml | 29 +++ .../templates/service.yaml | 89 +++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 153 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 152 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 21 ++ .../templates/deployment.yaml | 240 ++++++++++++++++++ .../templates/rolebinding.yaml | 12 + .../templates/secret.yaml | 29 +++ .../templates/service.yaml | 90 +++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 61 +++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/route.yaml | 25 ++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 60 +++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/route.yaml | 25 ++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 21 ++ .../templates/deployment.yaml | 148 +++++++++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/rolebinding.yaml | 12 + .../templates/route.yaml | 46 ++++ .../templates/secret.yaml | 29 +++ .../templates/service.yaml | 90 +++++++ .../values.yaml | 24 ++ rest-fights/pom.xml | 7 +- .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 61 +++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 81 ++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 153 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 50 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 153 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 61 +++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/route.yaml | 25 ++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ rest-heroes/pom.xml | 7 +- .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 60 +++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 81 ++++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 152 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 50 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 152 +++++++++++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ .../Chart.yaml | 4 + .../templates/NOTES.txt | 72 ++++++ .../templates/configmap.yaml | 28 ++ .../templates/deployment.yaml | 60 +++++ .../templates/deploymentconfig.yaml | 102 ++++++++ .../templates/imagestream.yaml | 44 ++++ .../templates/route.yaml | 25 ++ .../templates/secret.yaml | 27 ++ .../templates/service.yaml | 51 ++++ .../values.yaml | 24 ++ rest-villains/pom.xml | 7 +- scripts/generate-helm-charts.sh | 189 ++++++++++++++ 196 files changed, 9673 insertions(+), 4 deletions(-) create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml create mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml create mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml create mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml create mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml create mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml create mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml create mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml create mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml create mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml create mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml create mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml create mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml create mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml create mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml create mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml create mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml create mode 100755 scripts/generate-helm-charts.sh diff --git a/.github/workflows/create-deploy-resources.yml b/.github/workflows/create-deploy-resources.yml index 7b0a46592..f9cbfe7f4 100644 --- a/.github/workflows/create-deploy-resources.yml +++ b/.github/workflows/create-deploy-resources.yml @@ -52,6 +52,10 @@ jobs: shell: bash run: scripts/generate-k8s-resources.sh + - name: Create helm charts + shell: bash + run: scripts/generate-helm-charts.sh + - name: Create docker-compose resources shell: bash run: scripts/generate-docker-compose-resources.sh diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..dde66e33a --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..a718431f5 --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config +data: + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..4cea5ba21 --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,112 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + system: quarkus-super-heroes + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..9e4329d8c --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config-creds +type: Opaque diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..b765542c7 --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml @@ -0,0 +1,103 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:52:21 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app: event-statistics + app.openshift.io/runtime: quarkus + application: event-stats + system: quarkus-super-heroes + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + name: event-statistics +spec: + template: + spec: + containers: + - envFrom: + - configMapRef: + name: event-statistics-config + - secretRef: + name: event-statistics-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: event-statistics + ports: + - containerPort: 8085 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml new file mode 100644 index 000000000..4ae723bd6 --- /dev/null +++ b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: event-statistics:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..3383df0d9 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..a718431f5 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config +data: + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..420f7e730 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,204 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + name: event-statistics +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: event-statistics-config + - secretRef: + name: event-statistics-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: event-statistics + ports: + - containerPort: 8085 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + system: quarkus-super-heroes + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..9e4329d8c --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config-creds +type: Opaque diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..1a9ca660e --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,72 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8085 + selector: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..a675adbe8 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8085 + image: quay.io/quarkus-super-heroes/event-statistics:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8085 diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..98513e59f --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..a718431f5 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config +data: + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..ebc627592 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,204 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: event-statistics-config + - secretRef: + name: event-statistics-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: event-statistics + ports: + - containerPort: 8085 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + system: quarkus-super-heroes + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..9e4329d8c --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config-creds +type: Opaque diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..6a1dfa137 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,73 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics +spec: + ports: + - name: http + nodePort: 30938 + port: 80 + protocol: TCP + targetPort: 8085 + selector: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..3241037e5 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8085 + image: event-statistics:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8085 diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..e09ee3503 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..a718431f5 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config +data: + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..4cea5ba21 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,112 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + system: quarkus-super-heroes + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..637a415e5 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: event-statistics +spec: + replicas: 1 + selector: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - secretRef: + name: event-statistics-config-creds + - configMapRef: + name: event-statistics-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: event-statistics + ports: + - containerPort: 8085 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - event-statistics + from: + kind: ImageStreamTag + name: event-statistics:java11-latest + type: ImageChange diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..39845f8f2 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + name: event-statistics +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/event-statistics:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/event-statistics:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/event-statistics:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..1edfc760b --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: apicurio + name: apicurio +spec: + port: + targetPort: 8080 + to: + kind: Service + name: apicurio +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: event-statistics +spec: + port: + targetPort: http + to: + kind: Service + name: event-statistics diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..9e4329d8c --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: event-statistics + application: event-stats + system: quarkus-super-heroes + name: event-statistics-config-creds +type: Opaque diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..7ab6444cc --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,73 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8085" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + app: event-statistics + application: event-stats + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: event-statistics +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8085 + selector: + app.kubernetes.io/name: event-statistics + app.kubernetes.io/part-of: event-stats + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..a675adbe8 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8085 + image: quay.io/quarkus-super-heroes/event-statistics:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8085 diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index 3e1984e85..5a224464d 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes event-statistics - 1.0 + java11-latest Quarkus Sample :: Super-Heroes :: Statistics Microservice 3.24.2 @@ -87,6 +87,11 @@ io.quarkus quarkus-opentelemetry + + io.quarkiverse.helm + quarkus-helm + 0.2.5 + io.quarkus quarkus-junit5 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..fdf3c765f --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..fde30cb9f --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..ba350577d --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..fd7603896 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml @@ -0,0 +1,81 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:59 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + app.openshift.io/runtime: quarkus + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + name: rest-heroes +spec: + template: + spec: + containers: + - envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml new file mode 100644 index 000000000..36cb2ad8c --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..01c194532 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..58b9683f5 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..cbacc4fc2 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml @@ -0,0 +1,81 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:18 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + app.openshift.io/runtime: quarkus + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + name: rest-villains +spec: + template: + spec: + containers: + - envFrom: + - secretRef: + name: rest-villains-config-creds + - configMapRef: + name: rest-villains-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml new file mode 100644 index 000000000..c00aa64e9 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..25d7bd297 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config +data: + quarkus.liquibase-mongodb.migrate-at-start: "false" + quarkus.mongodb.hosts: fights-db:27017 + quarkus.stork.hero-service.service-discovery.type: kubernetes + quarkus.stork.hero-service.service-discovery.application: rest-heroes + quarkus.stork.hero-service.service-discovery.refresh-period: 1M + quarkus.stork.villain-service.service-discovery.type: kubernetes + quarkus.stork.villain-service.service-discovery.application: rest-villains + quarkus.stork.villain-service.service-discovery.refresh-period: 1M + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..aff3d87ce --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,148 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: mongodb + name: fights-db +spec: + replicas: 1 + selector: + matchLabels: + name: fights-db + template: + metadata: + labels: + application: fights-service + name: fights-db + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: fights-db-config + image: bitnami/mongodb:5.0 + name: fights-db + ports: + - containerPort: 27017 + resources: + limits: + memory: 256Mi + requests: + memory: 64Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml new file mode 100644 index 000000000..65b52a1c7 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default_view +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: view +subjects: + - kind: ServiceAccount + name: default diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..a7e8ab632 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config-creds +data: + quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== + quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db-config +data: + MONGODB_DATABASE: ZmlnaHRz + MONGODB_USERNAME: c3VwZXJmaWdodA== + MONGODB_PASSWORD: c3VwZXJmaWdodA== + MONGODB_ROOT_USER: c3VwZXI= + MONGODB_ROOT_PASSWORD: c3VwZXI= +type: Opaque diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..6a9640c62 --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml @@ -0,0 +1,134 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:51:43 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app: rest-fights + app.openshift.io/runtime: quarkus + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: java11-latest + name: rest-fights +spec: + template: + metadata: + annotations: + autoscaling.knative.dev/minScale: "1" + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + labels: + app: rest-fights + app.openshift.io/runtime: quarkus + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: java11-latest + spec: + containers: + - envFrom: + - secretRef: + name: rest-fights-config-creds + - configMapRef: + name: rest-fights-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-fights + ports: + - containerPort: 8082 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db +spec: + ports: + - port: 27017 + protocol: TCP + targetPort: 27017 + selector: + name: fights-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml new file mode 100644 index 000000000..1f1dd885b --- /dev/null +++ b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..c6b0fcd7c --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..595d6aa2d --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..82fec3323 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,153 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + name: rest-heroes +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + template: + metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..92a1aec90 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,50 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..4a47cbd83 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..c88fc8495 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..54adfcf49 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,152 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + name: rest-villains +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + template: + metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-villains-config + - secretRef: + name: rest-villains-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..39ee81c0e --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,50 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..534e6dbf8 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..25d7bd297 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config +data: + quarkus.liquibase-mongodb.migrate-at-start: "false" + quarkus.mongodb.hosts: fights-db:27017 + quarkus.stork.hero-service.service-discovery.type: kubernetes + quarkus.stork.hero-service.service-discovery.application: rest-heroes + quarkus.stork.hero-service.service-discovery.refresh-period: 1M + quarkus.stork.villain-service.service-discovery.type: kubernetes + quarkus.stork.villain-service.service-discovery.application: rest-villains + quarkus.stork.villain-service.service-discovery.refresh-period: 1M + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..08e7dc34f --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,240 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: java11-latest + name: rest-fights +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: java11-latest + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-fights-config + - secretRef: + name: rest-fights-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-fights + ports: + - containerPort: 8082 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: mongodb + name: fights-db +spec: + replicas: 1 + selector: + matchLabels: + name: fights-db + template: + metadata: + labels: + application: fights-service + name: fights-db + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: fights-db-config + image: bitnami/mongodb:5.0 + name: fights-db + ports: + - containerPort: 27017 + resources: + limits: + memory: 256Mi + requests: + memory: 64Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml new file mode 100644 index 000000000..65b52a1c7 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default_view +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: view +subjects: + - kind: ServiceAccount + name: default diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..a7e8ab632 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config-creds +data: + quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== + quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db-config +data: + MONGODB_DATABASE: ZmlnaHRz + MONGODB_USERNAME: c3VwZXJmaWdodA== + MONGODB_PASSWORD: c3VwZXJmaWdodA== + MONGODB_ROOT_USER: c3VwZXI= + MONGODB_ROOT_PASSWORD: c3VwZXI= +type: Opaque diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..566d749c1 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,89 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db +spec: + ports: + - port: 27017 + protocol: TCP + targetPort: 27017 + selector: + name: fights-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8082 + selector: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..bff575d81 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8082 + image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8082 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..3846c5ae2 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..bb2ab0360 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..4429831a2 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,153 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..0c17fe334 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + ports: + - name: http + nodePort: 30471 + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..4a47cbd83 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..293d898e9 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..33a335545 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,152 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-villains-config + - secretRef: + name: rest-villains-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..8442796c4 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + ports: + - name: http + nodePort: 30526 + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..51f5b3b0f --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..25d7bd297 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config +data: + quarkus.liquibase-mongodb.migrate-at-start: "false" + quarkus.mongodb.hosts: fights-db:27017 + quarkus.stork.hero-service.service-discovery.type: kubernetes + quarkus.stork.hero-service.service-discovery.application: rest-heroes + quarkus.stork.hero-service.service-discovery.refresh-period: 1M + quarkus.stork.villain-service.service-discovery.type: kubernetes + quarkus.stork.villain-service.service-discovery.application: rest-villains + quarkus.stork.villain-service.service-discovery.refresh-period: 1M + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..6a412ce2f --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,240 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-fights-config + - secretRef: + name: rest-fights-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-fights + ports: + - containerPort: 8082 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: mongodb + name: fights-db +spec: + replicas: 1 + selector: + matchLabels: + name: fights-db + template: + metadata: + labels: + application: fights-service + name: fights-db + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: fights-db-config + image: bitnami/mongodb:5.0 + name: fights-db + ports: + - containerPort: 27017 + resources: + limits: + memory: 256Mi + requests: + memory: 64Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml new file mode 100644 index 000000000..65b52a1c7 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default_view +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: view +subjects: + - kind: ServiceAccount + name: default diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..a7e8ab632 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config-creds +data: + quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== + quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db-config +data: + MONGODB_DATABASE: ZmlnaHRz + MONGODB_USERNAME: c3VwZXJmaWdodA== + MONGODB_PASSWORD: c3VwZXJmaWdodA== + MONGODB_ROOT_USER: c3VwZXI= + MONGODB_ROOT_PASSWORD: c3VwZXI= +type: Opaque diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..2bd6dc1ad --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db +spec: + ports: + - port: 27017 + protocol: TCP + targetPort: 27017 + selector: + name: fights-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights +spec: + ports: + - name: http + nodePort: 30489 + port: 80 + protocol: TCP + targetPort: 8082 + selector: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..bff575d81 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8082 + image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8082 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..f448a40d1 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..efdc05373 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..ba350577d --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..dd5b7c343 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + replicas: 1 + selector: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - secretRef: + name: rest-heroes-config-creds + - configMapRef: + name: rest-heroes-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - rest-heroes + from: + kind: ImageStreamTag + name: rest-heroes:java11-latest + type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..7d982c2a7 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + name: rest-heroes +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..843323120 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + port: + targetPort: http + to: + kind: Service + name: rest-heroes diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..1ac6e738c --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..885414b20 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..30228d5c2 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..58b9683f5 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..b35afb747 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + replicas: 1 + selector: + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - secretRef: + name: rest-villains-config-creds + - configMapRef: + name: rest-villains-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - rest-villains + from: + kind: ImageStreamTag + name: rest-villains:java11-latest + type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..613f2e5b0 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + name: rest-villains +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..078a40ce7 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + port: + targetPort: http + to: + kind: Service + name: rest-villains diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..f392c78b2 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..51f5b3b0f --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..25d7bd297 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config +data: + quarkus.liquibase-mongodb.migrate-at-start: "false" + quarkus.mongodb.hosts: fights-db:27017 + quarkus.stork.hero-service.service-discovery.type: kubernetes + quarkus.stork.hero-service.service-discovery.application: rest-heroes + quarkus.stork.hero-service.service-discovery.refresh-period: 1M + quarkus.stork.villain-service.service-discovery.type: kubernetes + quarkus.stork.villain-service.service-discovery.application: rest-villains + quarkus.stork.villain-service.service-discovery.refresh-period: 1M + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 + kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 + mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..aff3d87ce --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,148 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: mongodb + name: fights-db +spec: + replicas: 1 + selector: + matchLabels: + name: fights-db + template: + metadata: + labels: + application: fights-service + name: fights-db + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: fights-db-config + image: bitnami/mongodb:5.0 + name: fights-db + ports: + - containerPort: 27017 + resources: + limits: + memory: 256Mi + requests: + memory: 64Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fights-kafka + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.openshift.io/runtime: amq + name: fights-kafka +spec: + replicas: 1 + selector: + matchLabels: + name: fights-kafka + template: + metadata: + labels: + application: fights-service + name: fights-kafka + system: quarkus-super-heroes + spec: + containers: + - command: + - sh + - -c + - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" + env: + - name: LOG_DIR + value: /tmp/logs + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://fights-kafka:9092 + image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 + name: fights-kafka + ports: + - containerPort: 9092 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: apicurio + app.kubernetes.io/version: 2.2.3.Final + app.openshift.io/runtime: apicurio + name: apicurio +spec: + replicas: 1 + selector: + matchLabels: + name: apicurio + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + application: fights-service + name: apicurio + system: quarkus-super-heroes + spec: + containers: + - env: + - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED + value: "true" + image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: apicurio + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + memory: 768Mi + requests: + memory: 128Mi diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..820660dc2 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-fights +spec: + replicas: 1 + selector: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-fights-config + - secretRef: + name: rest-fights-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-fights + ports: + - containerPort: 8082 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - rest-fights + from: + kind: ImageStreamTag + name: rest-fights:java11-latest + type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..12a6d7cd1 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/name: rest-fights + name: rest-fights +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-fights:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-fights:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-fights:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml new file mode 100644 index 000000000..65b52a1c7 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: default_view +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: view +subjects: + - kind: ServiceAccount + name: default diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..611cd0acd --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: apicurio + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: apicurio + name: apicurio +spec: + port: + targetPort: 8080 + to: + kind: Service + name: apicurio +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-fights +spec: + port: + targetPort: http + to: + kind: Service + name: rest-fights diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..a7e8ab632 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-fights + application: fights-service + system: quarkus-super-heroes + name: rest-fights-config-creds +data: + quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== + quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db-config +data: + MONGODB_DATABASE: ZmlnaHRz + MONGODB_USERNAME: c3VwZXJmaWdodA== + MONGODB_PASSWORD: c3VwZXJmaWdodA== + MONGODB_ROOT_USER: c3VwZXI= + MONGODB_ROOT_PASSWORD: c3VwZXI= +type: Opaque diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..92c7c8e78 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-db + application: fights-service + system: quarkus-super-heroes + name: fights-db +spec: + ports: + - port: 27017 + protocol: TCP + targetPort: 27017 + selector: + name: fights-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: fights-kafka + application: fights-service + system: quarkus-super-heroes + name: fights-kafka +spec: + ports: + - port: 9092 + protocol: TCP + targetPort: 9092 + selector: + name: fights-kafka + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + name: apicurio + application: fights-service + system: quarkus-super-heroes + name: apicurio +spec: + ports: + - port: 8080 + protocol: TCP + targetPort: 8080 + selector: + name: apicurio + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8082" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + app: rest-fights + application: fights-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-fights +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8082 + selector: + app.kubernetes.io/name: rest-fights + app.kubernetes.io/part-of: fights-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..bff575d81 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8082 + image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8082 diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 61a739eec..8a169c328 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-fights - 1.0 + java11-latest Quarkus Sample :: Super-Heroes :: Fights Microservice 3.24.2 @@ -159,6 +159,11 @@ io.quarkus quarkus-opentelemetry + + io.quarkiverse.helm + quarkus-helm + 0.2.5 + io.quarkus quarkus-junit5 diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..fde30cb9f --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..ba350577d --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..fd7603896 --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml @@ -0,0 +1,81 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:59 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + app.openshift.io/runtime: quarkus + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + name: rest-heroes +spec: + template: + spec: + containers: + - envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml new file mode 100644 index 000000000..36cb2ad8c --- /dev/null +++ b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..595d6aa2d --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..82fec3323 --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,153 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + name: rest-heroes +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + template: + metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..92a1aec90 --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,50 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..4a47cbd83 --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..bb2ab0360 --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..4429831a2 --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,153 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..0c17fe334 --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes +spec: + ports: + - name: http + nodePort: 30471 + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..4a47cbd83 --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..efdc05373 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..b8dd3c89b --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..ba350577d --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: heroes-service + app.openshift.io/runtime: postgresql + name: heroes-db +spec: + replicas: 1 + selector: + matchLabels: + name: heroes-db + template: + metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + spec: + containers: + - envFrom: + - secretRef: + name: heroes-db-config + image: bitnami/postgresql:14 + name: heroes-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: heroes-db-data + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: heroes-db-init + - mountPath: /docker-entrypoint-initdb.d + name: heroes-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: heroes-db-data + - emptyDir: {} + name: heroes-db-init-data + - configMap: + name: heroes-db-init + name: heroes-db-init diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..dd5b7c343 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + replicas: 1 + selector: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - secretRef: + name: rest-heroes-config-creds + - configMapRef: + name: rest-heroes-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-heroes + ports: + - containerPort: 8083 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - rest-heroes + from: + kind: ImageStreamTag + name: rest-heroes:java11-latest + type: ImageChange diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..7d982c2a7 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes + name: rest-heroes +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-heroes:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..843323120 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + port: + targetPort: http + to: + kind: Service + name: rest-heroes diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..594569a2e --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + name: rest-heroes-config-creds +data: + quarkus.datasource.username: c3VwZXJtYW4= + quarkus.datasource.password: c3VwZXJtYW4= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db-config +data: + POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl + POSTGRESQL_USERNAME: c3VwZXJtYW4= + POSTGRESQL_PASSWORD: c3VwZXJtYW4= +type: Opaque diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..1ac6e738c --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: heroes-db + application: heroes-service + system: quarkus-super-heroes + name: heroes-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: heroes-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "heroes-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8083" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + app: rest-heroes + application: heroes-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-heroes +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8083 + selector: + app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..885414b20 --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8083 + image: rest-heroes:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8083 diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 5690c0b72..49638e1ed 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.workshop.super-heroes rest-heroes - 1.0 + java11-latest Quarkus Sample :: Super-Heroes :: Heroes Microservice 3.24.2 @@ -100,6 +100,11 @@ io.quarkus quarkus-opentelemetry + + io.quarkiverse.helm + quarkus-helm + 0.2.5 + io.quarkus quarkus-junit5 diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml new file mode 100644 index 000000000..01c194532 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml new file mode 100644 index 000000000..58b9683f5 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml new file mode 100644 index 000000000..cbacc4fc2 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml @@ -0,0 +1,81 @@ +--- +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:18 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + app.openshift.io/runtime: quarkus + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + name: rest-villains +spec: + template: + spec: + containers: + - envFrom: + - secretRef: + name: rest-villains-config-creds + - configMapRef: + name: rest-villains-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http1 + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml new file mode 100644 index 000000000..c00aa64e9 --- /dev/null +++ b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml new file mode 100644 index 000000000..c88fc8495 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml new file mode 100644 index 000000000..54adfcf49 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml @@ -0,0 +1,152 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + name: rest-villains +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + template: + metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/version: java11-latest + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-villains-config + - secretRef: + name: rest-villains-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml new file mode 100644 index 000000000..39ee81c0e --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml @@ -0,0 +1,50 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml new file mode 100644 index 000000000..534e6dbf8 --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml new file mode 100644 index 000000000..293d898e9 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml new file mode 100644 index 000000000..33a335545 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml @@ -0,0 +1,152 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + template: + metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: rest-villains-config + - secretRef: + name: rest-villains-config-creds + image: {{ .Values.app.image }} + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml new file mode 100644 index 000000000..8442796c4 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/vcs-ref: main + app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains +spec: + ports: + - name: http + nodePort: 30526 + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml new file mode 100644 index 000000000..51f5b3b0f --- /dev/null +++ b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml new file mode 100644 index 000000000..30228d5c2 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-java11-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt new file mode 100644 index 000000000..6eb7772d3 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt @@ -0,0 +1,72 @@ +# Quarkus Helm Notes + +To access the Helm annotations or properties you just need to have the following dependency in your +class path: + + + io.quarkiverse.helm + quarkus-helm + {quarkus-helm-version} + + +Build the project using: + + mvn clean package + +You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: +- Chart.yaml +- values.yaml +- templates/*.yml the generated resources by Quarkus Helm + +**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. + +# Requirements + +- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) +- Have connected/logged to a kubernetes cluster +- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. +- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. + +# How can it be used? + +You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: + +```shell +mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= +``` + +This command will push the image to a container registry and will become available when a pod or container is created. + +Finally, let's use Helm to deploy it into the cluster: + +```shell +helm install helm-example ./target/helm/kubernetes/ +``` + +The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: + +```shell +helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml +``` + +How can I update my deployment? + +- Via the `upgrade` option of Helm command line: + +After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ +``` + +- Via the `set` option of Helm command line: + +```shell +helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 +``` + +How can we delete my deployment? + +```shell +helm uninstall helm-example +``` diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml new file mode 100644 index 000000000..67fd7ccf3 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config +data: + quarkus.hibernate-orm.database.generation: validate + quarkus.hibernate-orm.sql-load-script: no-file + quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database + quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-init +data: + get-data.sh: |- + #!/bin/bash + + curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml new file mode 100644 index 000000000..58b9683f5 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + app.kubernetes.io/part-of: villains-service + app.openshift.io/runtime: postgresql + name: villains-db +spec: + replicas: 1 + selector: + matchLabels: + name: villains-db + template: + metadata: + labels: + application: villains-service + name: villains-db + spec: + containers: + - envFrom: + - secretRef: + name: villains-db-config + image: bitnami/postgresql:14 + name: villains-db + ports: + - containerPort: 5432 + resources: + limits: + memory: 128Mi + requests: + memory: 32Mi + volumeMounts: + - mountPath: /bitnami/postgresql + name: villains-db-data + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + initContainers: + - command: + - sh + - get-data.sh + image: registry.access.redhat.com/ubi8-minimal:8.6 + name: get-data + volumeMounts: + - mountPath: /docker-entrypoint-preinitdb.d + name: villains-db-init + - mountPath: /docker-entrypoint-initdb.d + name: villains-db-init-data + workingDir: /docker-entrypoint-preinitdb.d + volumes: + - emptyDir: {} + name: villains-db-data + - emptyDir: {} + name: villains-db-init-data + - configMap: + name: villains-db-init + name: villains-db-init diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml new file mode 100644 index 000000000..b35afb747 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml @@ -0,0 +1,102 @@ +--- +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + replicas: 1 + selector: + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + template: + metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - secretRef: + name: rest-villains-config-creds + - configMapRef: + name: rest-villains-config + image: {{ .Values.app.image }} + imagePullPolicy: Always + livenessProbe: + failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.livenessProbe.httpGet.path }} + port: {{ .Values.app.livenessProbe.httpGet.port }} + scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.app.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} + name: rest-villains + ports: + - containerPort: 8084 + name: http + protocol: TCP + readinessProbe: + failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.app.readinessProbe.httpGet.path }} + port: {{ .Values.app.readinessProbe.httpGet.port }} + scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.app.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} + resources: + limits: + memory: 768Mi + requests: + memory: 256Mi + triggers: + - imageChangeParams: + automatic: true + containerNames: + - rest-villains + from: + kind: ImageStreamTag + name: rest-villains:java11-latest + type: ImageChange diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml new file mode 100644 index 000000000..613f2e5b0 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app.kubernetes.io/name: rest-villains + name: rest-villains +spec: + lookupPolicy: + local: false + tags: + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:java11-latest + importPolicy: {} + name: java11-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:java17-latest + importPolicy: {} + name: java17-latest + referencePolicy: + type: Source + - from: + kind: DockerImage + name: quay.io/quarkus-super-heroes/rest-villains:native-latest + importPolicy: {} + name: native-latest + referencePolicy: + type: Source diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml new file mode 100644 index 000000000..078a40ce7 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + port: + targetPort: http + to: + kind: Service + name: rest-villains diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml new file mode 100644 index 000000000..b6ad8e319 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rest-villains + application: villains-service + system: quarkus-super-heroes + name: rest-villains-config-creds +data: + quarkus.datasource.username: c3VwZXJiYWQ= + quarkus.datasource.password: c3VwZXJiYWQ= +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db-config +data: + POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= + POSTGRESQL_USERNAME: c3VwZXJiYWQ= + POSTGRESQL_PASSWORD: c3VwZXJiYWQ= +type: Opaque diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml new file mode 100644 index 000000000..f392c78b2 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: villains-db + application: villains-service + system: quarkus-super-heroes + name: villains-db +spec: + ports: + - port: 5432 + protocol: TCP + targetPort: 5432 + selector: + name: villains-db + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes + app.openshift.io/connects-to: "villains-db,otel-collector" + app.openshift.io/vcs-ref: main + app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab + app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8084" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + app: rest-villains + application: villains-service + system: quarkus-super-heroes + app.openshift.io/runtime: quarkus + name: rest-villains +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8084 + selector: + app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: java11-latest + type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml new file mode 100644 index 000000000..51f5b3b0f --- /dev/null +++ b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml @@ -0,0 +1,24 @@ +--- +app: + serviceType: ClusterIP + livenessProbe: + failureThreshold: 3 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/live + scheme: HTTP + port: 8084 + image: rest-villains:java11-latest + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + initialDelaySeconds: 5 + httpGet: + path: /q/health/ready + scheme: HTTP + port: 8084 diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index 605a8d37f..b34da60fe 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-villains - 1.0 + java17-latest Quarkus Sample :: Super-Heroes :: Villains Microservice 3.24.2 @@ -100,6 +100,11 @@ io.opentelemetry.instrumentation opentelemetry-jdbc + + io.quarkiverse.helm + quarkus-helm + 0.2.5 + io.quarkus quarkus-junit5 diff --git a/scripts/generate-helm-charts.sh b/scripts/generate-helm-charts.sh new file mode 100755 index 000000000..0be45913f --- /dev/null +++ b/scripts/generate-helm-charts.sh @@ -0,0 +1,189 @@ +#!/bin/bash -ex + +# Create the deploy/k8s files for each java version of each of the Quarkus services +# Then add on the ui-super-heroes + +INPUT_DIR=src/main/kubernetes +OUTPUT_DIR=deploy/k8s + +OUTPUT_HELM_DIR=deploy/helm + +create_output_file() { + local output_file=$1 + + if [[ ! -f "$output_file" ]]; then + echo "Creating output file: $output_file" + touch $output_file + fi +} + +do_build() { + local project=$1 + local deployment_type=$2 + local version_tag=$3 + local javaVersion=$4 + local kind=$5 + local container_tag="${version_tag}-latest" + local git_server_url="${GITHUB_SERVER_URL:=https://github.com}" + local git_repo="${GITHUB_REPOSITORY:=quarkusio/quarkus-super-heroes}" + local github_ref_name="${BRANCH:=${GITHUB_REF_NAME:=main}}" + + if [[ "$kind" == "native-" ]]; then + local mem_limit="128Mi" + local mem_request="32Mi" + else + local mem_limit="768Mi" + local mem_request="256Mi" + fi + + if [[ "$deployment_type" == "openshift" ]]; then + local expose=true + else + local expose=false + fi + + echo "Generating app resources for $project/$container_tag/$deployment_type" + rm -rf $project/target + + $project/mvnw -f $project/pom.xml versions:set clean package \ + -DskipTests \ + -DnewVersion=$container_tag \ + -Dmaven.compiler.release=$javaVersion \ + -Dquarkus.container-image.tag=$container_tag \ + -Dquarkus.kubernetes.deployment-target=$deployment_type \ + -Dquarkus.kubernetes.version=$container_tag \ + -Dquarkus.kubernetes.ingress.expose=$expose \ + -Dquarkus.kubernetes.resources.limits.memory=$mem_limit \ + -Dquarkus.kubernetes.resources.requests.memory=$mem_request \ + -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ + -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-ref\"=$github_ref_name \ + -Dquarkus.openshift.version=$container_tag \ + -Dquarkus.openshift.route.expose=$expose \ + -Dquarkus.openshift.resources.limits.memory=$mem_limit \ + -Dquarkus.openshift.resources.requests.memory=$mem_request \ + -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ + -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ + -Dquarkus.knative.version=$container_tag \ + -Dquarkus.knative.labels.\"app.openshift.io/runtime\"=quarkus \ + -Dquarkus.knative.resources.limits.memory=$mem_limit \ + -Dquarkus.knative.resources.requests.memory=$mem_request \ + -Dquarkus.knative.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ + -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ + -Dquarkus.helm.version=1.0.0 \ + -Dquarkus.helm.name=$project-$container_tag-$deployment_type +} + +process_quarkus_project() { + local project=$1 + local deployment_type=$2 + local version_tag=$3 + local javaVersion=$4 + local kind=$5 + local container_tag="${version_tag}-latest" + local output_filename="${version_tag}-${deployment_type}" + local app_generated_input_file="$project/target/kubernetes/${deployment_type}.yml" + local project_output_file="$project/$OUTPUT_DIR/${output_filename}.yml" + local all_apps_output_file="$OUTPUT_DIR/${output_filename}.yml" + + local app_generated_helm_chart="$project/target/helm/${deployment_type}/${project}-${container_tag}-${deployment_type}" + local generated_helm_dir="$project/${OUTPUT_HELM_DIR}/${deployment_type}" + + # 1st do the build + # The build will generate all the resources for the project + do_build $project $deployment_type $version_tag $javaVersion $kind + + rm -rf $generated_helm_dir + mkdir $generated_helm_dir + + # Now merge the generated resources to the top level (deploy/helm) + if [[ -f "$app_generated_input_file" ]]; then + echo "Copying app generated helm ($app_generated_input_file) to $project_output_file and $all_apps_output_file" + + cp -R $app_generated_helm_chart $generated_helm_dir + + fi + if [[ "$project" == "rest-fights" ]]; then + echo "Copying rest villain and heroes helm charts to the rest fights one " + + cp -R "rest-villains/${OUTPUT_HELM_DIR}/${deployment_type}/rest-villains-${container_tag}-${deployment_type}" "${generated_helm_dir}/${project}-${container_tag}-${deployment_type}/charts/" + cp -R "rest-heroes/${OUTPUT_HELM_DIR}/${deployment_type}/rest-heroes-${container_tag}-${deployment_type}" "${generated_helm_dir}/${project}-${container_tag}-${deployment_type}/charts/" + fi +} + +process_ui_project() { + local deployment_type=$1 + local version_tag=$2 + local project="ui-super-heroes" + local project_input_directory="$project/$INPUT_DIR" + local input_file="$project_input_directory/${deployment_type}.yml" + local project_output_file="$project/$OUTPUT_DIR/app-${deployment_type}.yml" + local all_apps_output_file="$OUTPUT_DIR/${version_tag}-${deployment_type}.yml" + + rm -rf $project_output_file + + if [[ -f "$input_file" ]]; then + create_output_file $project_output_file + echo "Copying app input ($input_file) to $project_output_file and $all_apps_output_file" + cat $input_file >> $project_output_file + cat $input_file >> $all_apps_output_file + fi +} + +#create_monitoring() { +# local monitoring_name="monitoring" +# +# echo "" +# echo "-----------------------------------------" +# echo "Creating monitoring" +# +# for deployment_type in "kubernetes" "minikube" "openshift" +# do +# local output_file_name="${monitoring_name}-${deployment_type}.yml" +# local output_file="$OUTPUT_DIR/$output_file_name" +# local input_dir="$monitoring_name/k8s" +# create_output_file $output_file +# +# if [[ -f "$input_dir/base.yml" ]]; then +# echo "Adding base config from $input_dir/base.yml into $output_file" +# cat "$input_dir/base.yml" >> $output_file +# fi +# +# if [[ -f "$input_dir/${deployment_type}.yml" ]]; then +# echo "Adding $deployment_type config from $input_dir/${deployment_type}.yml into $output_file" +# cat "$input_dir/${deployment_type}.yml" >> $output_file +# fi +# done +#} + +#rm -rf $OUTPUT_DIR/*.yml + +for kind in "" "native-" +do + if [[ "$kind" == "native-" ]]; then + javaVersions=(17) + else + javaVersions=(11 17) + fi + + for javaVersion in ${javaVersions[@]} + do + for deployment_type in "kubernetes" "minikube" "openshift" "knative" + do + if [[ "$kind" == "native-" ]]; then + version_tag="native" + else + version_tag="${kind}java${javaVersion}" + fi + + for project in "rest-villains" "rest-heroes" "rest-fights" "event-statistics" + do + process_quarkus_project $project $deployment_type $version_tag $javaVersion $kind + done + +# process_ui_project $deployment_type $version_tag + done + done +done + +## Handle the monitoring +#create_monitoring From c892bc636ae3f3050da925a164e29fc00484da24 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 17 Mar 2023 17:29:02 +0100 Subject: [PATCH 02/13] Updated folder structure and provide initial value files per kind. So far I just updated the rest-villains. The rest of the services will come later. --- .../deploy/helm/knative/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 0 .../templates/secret.yaml | 0 .../templates/service.yaml | 11 +- .../deploy/helm/knative}/values.yaml | 2 +- .../deploy/helm/kubernetes/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 19 +-- .../templates/secret.yaml | 0 .../templates/service.yaml | 8 +- .../values.yaml | 2 +- .../deploy/helm/minikube/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 19 +-- .../templates/secret.yaml | 0 .../templates/service.yaml | 8 +- .../values.yaml | 2 +- .../deploy/helm/openshift/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 0 .../templates/deploymentconfig.yaml | 25 ++- .../templates/imagestream.yaml | 6 +- .../templates/route.yaml | 6 +- .../templates/secret.yaml | 0 .../templates/service.yaml | 10 +- .../values.yaml | 2 +- event-statistics/pom.xml | 2 +- rest-fights/deploy/helm/knative/Chart.yaml | 4 + .../Chart.yaml | 4 - .../Chart.yaml | 4 - .../Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 0 .../templates/rolebinding.yaml | 0 .../templates/secret.yaml | 0 .../templates/service.yaml | 17 +- .../values.yaml | 2 +- rest-fights/deploy/helm/kubernetes/Chart.yaml | 4 + .../Chart.yaml | 4 - .../Chart.yaml | 4 - .../templates/deployment.yaml | 153 ------------------ .../values.yaml | 24 --- .../Chart.yaml | 4 - .../templates/deployment.yaml | 152 ----------------- .../templates/service.yaml | 50 ------ .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 23 ++- .../templates/rolebinding.yaml | 0 .../templates/secret.yaml | 0 .../templates/service.yaml | 8 +- .../values.yaml | 2 +- rest-fights/deploy/helm/minikube/Chart.yaml | 4 + .../Chart.yaml | 4 - .../Chart.yaml | 4 - .../templates/deployment.yaml | 153 ------------------ .../templates/service.yaml | 51 ------ .../Chart.yaml | 4 - .../values.yaml | 24 --- .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 19 +-- .../templates/rolebinding.yaml | 0 .../templates/secret.yaml | 0 .../templates/service.yaml | 8 +- .../values.yaml | 2 +- rest-fights/deploy/helm/openshift/Chart.yaml | 4 + .../Chart.yaml | 4 - .../Chart.yaml | 4 - .../templates/imagestream.yaml | 44 ----- .../templates/route.yaml | 25 --- .../templates/service.yaml | 51 ------ .../Chart.yaml | 4 - .../templates/route.yaml | 25 --- .../templates/service.yaml | 51 ------ .../values.yaml | 24 --- .../templates/NOTES.txt | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 0 .../templates/deploymentconfig.yaml | 33 ++-- .../templates/imagestream.yaml | 8 +- .../templates/rolebinding.yaml | 0 .../templates/route.yaml | 6 +- .../templates/secret.yaml | 0 .../templates/service.yaml | 10 +- .../values.yaml | 2 +- rest-fights/pom.xml | 2 +- rest-heroes/deploy/helm/knative/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/deployment.yaml | 61 ------- .../templates/secret.yaml | 27 ---- .../templates/service.yaml | 81 ---------- .../values.yaml | 24 --- .../deploy/helm/knative}/templates/NOTES.txt | 0 .../helm/knative}/templates/configmap.yaml | 0 .../helm/knative}/templates/deployment.yaml | 0 .../helm/knative}/templates/secret.yaml | 0 .../helm/knative}/templates/service.yaml | 13 +- .../deploy/helm/knative}/values.yaml | 2 +- rest-heroes/deploy/helm/kubernetes/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/secret.yaml | 27 ---- .../templates/service.yaml | 50 ------ .../values.yaml | 24 --- .../helm/kubernetes}/templates/NOTES.txt | 0 .../helm/kubernetes}/templates/configmap.yaml | 0 .../templates/deployment.yaml | 19 +-- .../helm/kubernetes}/templates/secret.yaml | 0 .../helm/kubernetes}/templates/service.yaml | 8 +- .../deploy/helm/kubernetes}/values.yaml | 2 +- rest-heroes/deploy/helm/minikube/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/secret.yaml | 27 ---- .../values.yaml | 24 --- .../deploy/helm/minikube}/templates/NOTES.txt | 0 .../helm/minikube}/templates/configmap.yaml | 0 .../templates/deployment.yaml | 23 ++- .../helm/minikube}/templates/secret.yaml | 0 .../templates/service.yaml | 8 +- .../values.yaml | 2 +- rest-heroes/deploy/helm/openshift/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/deployment.yaml | 61 ------- .../templates/deploymentconfig.yaml | 102 ------------ .../templates/secret.yaml | 27 ---- .../helm/openshift}/templates/NOTES.txt | 0 .../helm/openshift}/templates/configmap.yaml | 0 .../helm/openshift}/templates/deployment.yaml | 0 .../templates/deploymentconfig.yaml | 33 ++-- .../templates/imagestream.yaml | 8 +- .../templates/route.yaml | 6 +- .../helm/openshift}/templates/secret.yaml | 0 .../templates/service.yaml | 10 +- .../deploy/helm/openshift}/values.yaml | 2 +- rest-heroes/pom.xml | 2 +- rest-villains/deploy/helm/knative/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/deployment.yaml | 60 ------- .../templates/secret.yaml | 27 ---- .../templates/service.yaml | 81 ---------- .../values.yaml | 24 --- .../deploy/helm/knative}/templates/NOTES.txt | 0 .../helm/knative}/templates/configmap.yaml | 0 .../helm/knative}/templates/deployment.yaml | 0 .../helm/knative}/templates/secret.yaml | 0 .../helm/knative}/templates/service.yaml | 17 +- .../deploy/helm/knative}/values.yaml | 3 +- .../deploy/helm/kubernetes/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/secret.yaml | 27 ---- .../templates/service.yaml | 50 ------ .../helm/kubernetes}/templates/NOTES.txt | 0 .../helm/kubernetes}/templates/configmap.yaml | 0 .../templates/deployment.yaml | 28 ++-- .../helm/kubernetes}/templates/secret.yaml | 0 .../templates/service.yaml | 11 +- .../values.yaml | 8 +- rest-villains/deploy/helm/minikube/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/deployment.yaml | 152 ----------------- .../templates/secret.yaml | 27 ---- .../deploy/helm/minikube}/templates/NOTES.txt | 0 .../helm/minikube}/templates/configmap.yaml | 0 .../helm/minikube}/templates/deployment.yaml | 18 +-- .../helm/minikube}/templates/secret.yaml | 0 .../helm/minikube}/templates/service.yaml | 8 +- .../deploy/helm/minikube}/values.yaml | 8 +- .../deploy/helm/openshift/Chart.yaml | 4 + .../Chart.yaml | 4 - .../templates/NOTES.txt | 72 --------- .../templates/configmap.yaml | 28 ---- .../templates/deployment.yaml | 60 ------- .../templates/deploymentconfig.yaml | 102 ------------ .../templates/imagestream.yaml | 44 ----- .../templates/secret.yaml | 27 ---- .../values.yaml | 24 --- .../helm/openshift}/templates/NOTES.txt | 0 .../helm/openshift}/templates/configmap.yaml | 0 .../helm/openshift}/templates/deployment.yaml | 0 .../templates/deploymentconfig.yaml | 25 ++- .../openshift}/templates/imagestream.yaml | 6 +- .../templates/route.yaml | 6 +- .../helm/openshift}/templates/secret.yaml | 0 .../templates/service.yaml | 10 +- .../values.yaml | 3 +- rest-villains/deploy/helm/values-java11.yaml | 9 ++ rest-villains/deploy/helm/values-java17.yaml | 9 ++ rest-villains/deploy/helm/values-native.yaml | 9 ++ rest-villains/pom.xml | 2 +- .../src/main/resources/application.properties | 5 + scripts/generate-helm-charts.sh | 55 +++---- 215 files changed, 370 insertions(+), 3299 deletions(-) create mode 100644 event-statistics/deploy/helm/knative/Chart.yaml delete mode 100644 event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml rename event-statistics/deploy/helm/knative/{event-statistics-java11-latest-knative => }/templates/NOTES.txt (100%) rename event-statistics/deploy/helm/knative/{event-statistics-java11-latest-knative => }/templates/configmap.yaml (100%) rename event-statistics/deploy/helm/knative/{event-statistics-java11-latest-knative => }/templates/deployment.yaml (100%) rename event-statistics/deploy/helm/knative/{event-statistics-java11-latest-knative => }/templates/secret.yaml (100%) rename event-statistics/deploy/helm/knative/{event-statistics-java11-latest-knative => }/templates/service.yaml (91%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => event-statistics/deploy/helm/knative}/values.yaml (93%) create mode 100644 event-statistics/deploy/helm/kubernetes/Chart.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/templates/NOTES.txt (100%) rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/templates/configmap.yaml (100%) rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/templates/deployment.yaml (92%) rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/templates/secret.yaml (100%) rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/templates/service.yaml (87%) rename event-statistics/deploy/helm/kubernetes/{event-statistics-java11-latest-kubernetes => }/values.yaml (87%) create mode 100644 event-statistics/deploy/helm/minikube/Chart.yaml delete mode 100644 event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/templates/NOTES.txt (100%) rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/templates/configmap.yaml (100%) rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/templates/deployment.yaml (92%) rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/templates/secret.yaml (100%) rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/templates/service.yaml (87%) rename event-statistics/deploy/helm/minikube/{event-statistics-java11-latest-minikube => }/values.yaml (92%) create mode 100644 event-statistics/deploy/helm/openshift/Chart.yaml delete mode 100644 event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/NOTES.txt (100%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/configmap.yaml (100%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/deployment.yaml (100%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/deploymentconfig.yaml (85%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/imagestream.yaml (86%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/route.yaml (85%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/secret.yaml (100%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/templates/service.yaml (87%) rename event-statistics/deploy/helm/openshift/{event-statistics-java11-latest-openshift => }/values.yaml (87%) create mode 100644 rest-fights/deploy/helm/knative/Chart.yaml delete mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml delete mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml delete mode 100644 rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => }/templates/NOTES.txt (100%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative => }/templates/configmap.yaml (100%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative => }/templates/deployment.yaml (100%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative => }/templates/rolebinding.yaml (100%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative => }/templates/secret.yaml (100%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative => }/templates/service.yaml (91%) rename rest-fights/deploy/helm/knative/{rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => }/values.yaml (94%) create mode 100644 rest-fights/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml rename rest-fights/deploy/helm/{knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => kubernetes}/templates/NOTES.txt (100%) rename rest-fights/deploy/helm/kubernetes/{rest-fights-java11-latest-kubernetes => }/templates/configmap.yaml (100%) rename rest-fights/deploy/helm/kubernetes/{rest-fights-java11-latest-kubernetes => }/templates/deployment.yaml (93%) rename rest-fights/deploy/helm/kubernetes/{rest-fights-java11-latest-kubernetes => }/templates/rolebinding.yaml (100%) rename rest-fights/deploy/helm/kubernetes/{rest-fights-java11-latest-kubernetes => }/templates/secret.yaml (100%) rename rest-fights/deploy/helm/kubernetes/{rest-fights-java11-latest-kubernetes => }/templates/service.yaml (89%) rename rest-fights/deploy/helm/{minikube/rest-fights-java11-latest-minikube => kubernetes}/values.yaml (87%) create mode 100644 rest-fights/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml delete mode 100644 rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml rename rest-fights/deploy/helm/{knative/rest-fights-java11-latest-knative => minikube}/templates/NOTES.txt (100%) rename rest-fights/deploy/helm/minikube/{rest-fights-java11-latest-minikube => }/templates/configmap.yaml (100%) rename rest-fights/deploy/helm/minikube/{rest-fights-java11-latest-minikube => }/templates/deployment.yaml (93%) rename rest-fights/deploy/helm/minikube/{rest-fights-java11-latest-minikube => }/templates/rolebinding.yaml (100%) rename rest-fights/deploy/helm/minikube/{rest-fights-java11-latest-minikube => }/templates/secret.yaml (100%) rename rest-fights/deploy/helm/minikube/{rest-fights-java11-latest-minikube => }/templates/service.yaml (89%) rename rest-fights/deploy/helm/{openshift/rest-fights-java11-latest-openshift => minikube}/values.yaml (87%) create mode 100644 rest-fights/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml rename rest-fights/deploy/helm/{kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes => openshift}/templates/NOTES.txt (100%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/configmap.yaml (100%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/deployment.yaml (100%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/deploymentconfig.yaml (85%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/imagestream.yaml (86%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/rolebinding.yaml (100%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/route.yaml (85%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/secret.yaml (100%) rename rest-fights/deploy/helm/openshift/{rest-fights-java11-latest-openshift => }/templates/service.yaml (89%) rename rest-fights/deploy/helm/{kubernetes/rest-fights-java11-latest-kubernetes => openshift}/values.yaml (87%) create mode 100644 rest-heroes/deploy/helm/knative/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes => rest-heroes/deploy/helm/knative}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => rest-heroes/deploy/helm/knative}/templates/configmap.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => rest-heroes/deploy/helm/knative}/templates/deployment.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => rest-heroes/deploy/helm/knative}/templates/secret.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative => rest-heroes/deploy/helm/knative}/templates/service.yaml (89%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative => rest-heroes/deploy/helm/knative}/values.yaml (89%) create mode 100644 rest-heroes/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes => rest-heroes/deploy/helm/kubernetes}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes => rest-heroes/deploy/helm/kubernetes}/templates/configmap.yaml (100%) rename rest-heroes/deploy/helm/kubernetes/{rest-heroes-java11-latest-kubernetes => }/templates/deployment.yaml (89%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes => rest-heroes/deploy/helm/kubernetes}/templates/secret.yaml (100%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes => rest-heroes/deploy/helm/kubernetes}/templates/service.yaml (82%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube => rest-heroes/deploy/helm/kubernetes}/values.yaml (87%) create mode 100644 rest-heroes/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube => rest-heroes/deploy/helm/minikube}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube => rest-heroes/deploy/helm/minikube}/templates/configmap.yaml (100%) rename rest-heroes/deploy/helm/minikube/{rest-heroes-java11-latest-minikube => }/templates/deployment.yaml (89%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube => rest-heroes/deploy/helm/minikube}/templates/secret.yaml (100%) rename rest-heroes/deploy/helm/minikube/{rest-heroes-java11-latest-minikube => }/templates/service.yaml (82%) rename rest-heroes/deploy/helm/{openshift/rest-heroes-java11-latest-openshift => minikube}/values.yaml (92%) create mode 100644 rest-heroes/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube => rest-heroes/deploy/helm/openshift}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-heroes/deploy/helm/openshift}/templates/configmap.yaml (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-heroes/deploy/helm/openshift}/templates/deployment.yaml (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-heroes/deploy/helm/openshift}/templates/deploymentconfig.yaml (85%) rename rest-heroes/deploy/helm/openshift/{rest-heroes-java11-latest-openshift => }/templates/imagestream.yaml (86%) rename rest-heroes/deploy/helm/openshift/{rest-heroes-java11-latest-openshift => }/templates/route.yaml (76%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-heroes/deploy/helm/openshift}/templates/secret.yaml (100%) rename rest-heroes/deploy/helm/openshift/{rest-heroes-java11-latest-openshift => }/templates/service.yaml (83%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-heroes/deploy/helm/openshift}/values.yaml (92%) create mode 100644 rest-villains/deploy/helm/knative/Chart.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml delete mode 100644 rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube => rest-villains/deploy/helm/knative}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => rest-villains/deploy/helm/knative}/templates/configmap.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => rest-villains/deploy/helm/knative}/templates/deployment.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => rest-villains/deploy/helm/knative}/templates/secret.yaml (100%) rename {rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative => rest-villains/deploy/helm/knative}/templates/service.yaml (89%) rename {event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative => rest-villains/deploy/helm/knative}/values.yaml (90%) create mode 100644 rest-villains/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift => rest-villains/deploy/helm/kubernetes}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes => rest-villains/deploy/helm/kubernetes}/templates/configmap.yaml (100%) rename rest-villains/deploy/helm/kubernetes/{rest-villains-java11-latest-kubernetes => }/templates/deployment.yaml (89%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes => rest-villains/deploy/helm/kubernetes}/templates/secret.yaml (100%) rename rest-villains/deploy/helm/{minikube/rest-villains-java11-latest-minikube => kubernetes}/templates/service.yaml (81%) rename rest-villains/deploy/helm/kubernetes/{rest-villains-java11-latest-kubernetes => }/values.yaml (73%) create mode 100644 rest-villains/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml delete mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/minikube}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube => rest-villains/deploy/helm/minikube}/templates/configmap.yaml (100%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube => rest-villains/deploy/helm/minikube}/templates/deployment.yaml (89%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube => rest-villains/deploy/helm/minikube}/templates/secret.yaml (100%) rename {rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube => rest-villains/deploy/helm/minikube}/templates/service.yaml (81%) rename {rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes => rest-villains/deploy/helm/minikube}/values.yaml (76%) create mode 100644 rest-villains/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/NOTES.txt (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/configmap.yaml (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/deployment.yaml (100%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/deploymentconfig.yaml (85%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/imagestream.yaml (85%) rename rest-villains/deploy/helm/openshift/{rest-villains-java11-latest-openshift => }/templates/route.yaml (75%) rename {rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift => rest-villains/deploy/helm/openshift}/templates/secret.yaml (100%) rename rest-villains/deploy/helm/openshift/{rest-villains-java11-latest-openshift => }/templates/service.yaml (82%) rename rest-villains/deploy/helm/{minikube/rest-villains-java11-latest-minikube => openshift}/values.yaml (88%) create mode 100644 rest-villains/deploy/helm/values-java11.yaml create mode 100644 rest-villains/deploy/helm/values-java17.yaml create mode 100644 rest-villains/deploy/helm/values-native.yaml diff --git a/event-statistics/deploy/helm/knative/Chart.yaml b/event-statistics/deploy/helm/knative/Chart.yaml new file mode 100644 index 000000000..72baeedbe --- /dev/null +++ b/event-statistics/deploy/helm/knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-native-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml b/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml deleted file mode 100644 index dde66e33a..000000000 --- a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt b/event-statistics/deploy/helm/knative/templates/NOTES.txt similarity index 100% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/NOTES.txt rename to event-statistics/deploy/helm/knative/templates/NOTES.txt diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml b/event-statistics/deploy/helm/knative/templates/configmap.yaml similarity index 100% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/configmap.yaml rename to event-statistics/deploy/helm/knative/templates/configmap.yaml diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml b/event-statistics/deploy/helm/knative/templates/deployment.yaml similarity index 100% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/deployment.yaml rename to event-statistics/deploy/helm/knative/templates/deployment.yaml diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml b/event-statistics/deploy/helm/knative/templates/secret.yaml similarity index 100% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/secret.yaml rename to event-statistics/deploy/helm/knative/templates/secret.yaml diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml b/event-statistics/deploy/helm/knative/templates/service.yaml similarity index 91% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml rename to event-statistics/deploy/helm/knative/templates/service.yaml index b765542c7..64dd00666 100644 --- a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/templates/service.yaml +++ b/event-statistics/deploy/helm/knative/templates/service.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:52:21 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:16:52 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -17,9 +17,9 @@ metadata: app.openshift.io/runtime: quarkus application: event-stats system: quarkus-super-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest name: event-statistics spec: template: @@ -57,11 +57,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: v1 kind: Service diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml b/event-statistics/deploy/helm/knative/values.yaml similarity index 93% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml rename to event-statistics/deploy/helm/knative/values.yaml index c00aa64e9..b7377f8a2 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/values.yaml +++ b/event-statistics/deploy/helm/knative/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-villains:java11-latest + image: event-statistics:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/event-statistics/deploy/helm/kubernetes/Chart.yaml b/event-statistics/deploy/helm/kubernetes/Chart.yaml new file mode 100644 index 000000000..90b24a0e7 --- /dev/null +++ b/event-statistics/deploy/helm/kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-native-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml b/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index 3383df0d9..000000000 --- a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt b/event-statistics/deploy/helm/kubernetes/templates/NOTES.txt similarity index 100% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/NOTES.txt rename to event-statistics/deploy/helm/kubernetes/templates/NOTES.txt diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml b/event-statistics/deploy/helm/kubernetes/templates/configmap.yaml similarity index 100% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/configmap.yaml rename to event-statistics/deploy/helm/kubernetes/templates/configmap.yaml diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml b/event-statistics/deploy/helm/kubernetes/templates/deployment.yaml similarity index 92% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml rename to event-statistics/deploy/helm/kubernetes/templates/deployment.yaml index 420f7e730..d824c13a2 100644 --- a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/deployment.yaml +++ b/event-statistics/deploy/helm/kubernetes/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -16,25 +16,25 @@ metadata: app: event-statistics application: event-stats system: quarkus-super-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest name: event-statistics spec: replicas: 1 selector: matchLabels: + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest template: metadata: annotations: app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -43,9 +43,9 @@ spec: app: event-statistics application: event-stats system: quarkus-super-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest spec: containers: - env: @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml b/event-statistics/deploy/helm/kubernetes/templates/secret.yaml similarity index 100% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/secret.yaml rename to event-statistics/deploy/helm/kubernetes/templates/secret.yaml diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml b/event-statistics/deploy/helm/kubernetes/templates/service.yaml similarity index 87% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml rename to event-statistics/deploy/helm/kubernetes/templates/service.yaml index 1a9ca660e..7d09790c5 100644 --- a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/templates/service.yaml +++ b/event-statistics/deploy/helm/kubernetes/templates/service.yaml @@ -45,8 +45,8 @@ metadata: app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:12 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -54,7 +54,7 @@ metadata: labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -68,5 +68,5 @@ spec: selector: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml b/event-statistics/deploy/helm/kubernetes/values.yaml similarity index 87% rename from event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml rename to event-statistics/deploy/helm/kubernetes/values.yaml index a675adbe8..58cbe83ca 100644 --- a/event-statistics/deploy/helm/kubernetes/event-statistics-java11-latest-kubernetes/values.yaml +++ b/event-statistics/deploy/helm/kubernetes/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8085 - image: quay.io/quarkus-super-heroes/event-statistics:java11-latest + image: quay.io/quarkus-super-heroes/event-statistics:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/event-statistics/deploy/helm/minikube/Chart.yaml b/event-statistics/deploy/helm/minikube/Chart.yaml new file mode 100644 index 000000000..e5d6ed6d1 --- /dev/null +++ b/event-statistics/deploy/helm/minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-native-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml b/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml deleted file mode 100644 index 98513e59f..000000000 --- a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt b/event-statistics/deploy/helm/minikube/templates/NOTES.txt similarity index 100% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/NOTES.txt rename to event-statistics/deploy/helm/minikube/templates/NOTES.txt diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml b/event-statistics/deploy/helm/minikube/templates/configmap.yaml similarity index 100% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/configmap.yaml rename to event-statistics/deploy/helm/minikube/templates/configmap.yaml diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml b/event-statistics/deploy/helm/minikube/templates/deployment.yaml similarity index 92% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml rename to event-statistics/deploy/helm/minikube/templates/deployment.yaml index ebc627592..dbdd5bc9c 100644 --- a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/deployment.yaml +++ b/event-statistics/deploy/helm/minikube/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -15,7 +15,7 @@ metadata: labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -26,15 +26,15 @@ spec: matchLabels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest template: metadata: annotations: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -42,7 +42,7 @@ spec: labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml b/event-statistics/deploy/helm/minikube/templates/secret.yaml similarity index 100% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/secret.yaml rename to event-statistics/deploy/helm/minikube/templates/secret.yaml diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml b/event-statistics/deploy/helm/minikube/templates/service.yaml similarity index 87% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml rename to event-statistics/deploy/helm/minikube/templates/service.yaml index 6a1dfa137..d0454a898 100644 --- a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/templates/service.yaml +++ b/event-statistics/deploy/helm/minikube/templates/service.yaml @@ -45,8 +45,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:39 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" @@ -54,7 +54,7 @@ metadata: labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -69,5 +69,5 @@ spec: selector: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml b/event-statistics/deploy/helm/minikube/values.yaml similarity index 92% rename from event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml rename to event-statistics/deploy/helm/minikube/values.yaml index 3241037e5..87cbe6fdf 100644 --- a/event-statistics/deploy/helm/minikube/event-statistics-java11-latest-minikube/values.yaml +++ b/event-statistics/deploy/helm/minikube/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8085 - image: event-statistics:java11-latest + image: event-statistics:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/event-statistics/deploy/helm/openshift/Chart.yaml b/event-statistics/deploy/helm/openshift/Chart.yaml new file mode 100644 index 000000000..eba7c6649 --- /dev/null +++ b/event-statistics/deploy/helm/openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: event-statistics-native-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml b/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml deleted file mode 100644 index e09ee3503..000000000 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt b/event-statistics/deploy/helm/openshift/templates/NOTES.txt similarity index 100% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/NOTES.txt rename to event-statistics/deploy/helm/openshift/templates/NOTES.txt diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml b/event-statistics/deploy/helm/openshift/templates/configmap.yaml similarity index 100% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/configmap.yaml rename to event-statistics/deploy/helm/openshift/templates/configmap.yaml diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml b/event-statistics/deploy/helm/openshift/templates/deployment.yaml similarity index 100% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deployment.yaml rename to event-statistics/deploy/helm/openshift/templates/deployment.yaml diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml b/event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml similarity index 85% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml rename to event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml index 637a415e5..0bbec59bf 100644 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/deploymentconfig.yaml +++ b/event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml @@ -3,19 +3,19 @@ apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" - prometheus.io/scheme: http labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -24,27 +24,27 @@ metadata: spec: replicas: 1 selector: - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats template: metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" - prometheus.io/scheme: http labels: app: event-statistics application: event-stats system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats spec: @@ -86,11 +86,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi triggers: - imageChangeParams: automatic: true @@ -98,5 +93,5 @@ spec: - event-statistics from: kind: ImageStreamTag - name: event-statistics:java11-latest + name: event-statistics:native-latest type: ImageChange diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml b/event-statistics/deploy/helm/openshift/templates/imagestream.yaml similarity index 86% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml rename to event-statistics/deploy/helm/openshift/templates/imagestream.yaml index 39845f8f2..70155399f 100644 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/imagestream.yaml +++ b/event-statistics/deploy/helm/openshift/templates/imagestream.yaml @@ -6,14 +6,14 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 labels: app: event-statistics application: event-stats system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats name: event-statistics diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml b/event-statistics/deploy/helm/openshift/templates/route.yaml similarity index 85% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml rename to event-statistics/deploy/helm/openshift/templates/route.yaml index 1edfc760b..81bc9ede0 100644 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/route.yaml +++ b/event-statistics/deploy/helm/openshift/templates/route.yaml @@ -27,12 +27,12 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml b/event-statistics/deploy/helm/openshift/templates/secret.yaml similarity index 100% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/secret.yaml rename to event-statistics/deploy/helm/openshift/templates/secret.yaml diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml b/event-statistics/deploy/helm/openshift/templates/service.yaml similarity index 87% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml rename to event-statistics/deploy/helm/openshift/templates/service.yaml index 7ab6444cc..58f28e23d 100644 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/templates/service.yaml +++ b/event-statistics/deploy/helm/openshift/templates/service.yaml @@ -42,19 +42,19 @@ apiVersion: v1 kind: Service metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:48 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8085" - prometheus.io/scheme: http labels: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: event-statistics application: event-stats system: quarkus-super-heroes @@ -69,5 +69,5 @@ spec: selector: app.kubernetes.io/name: event-statistics app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml b/event-statistics/deploy/helm/openshift/values.yaml similarity index 87% rename from event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml rename to event-statistics/deploy/helm/openshift/values.yaml index a675adbe8..58cbe83ca 100644 --- a/event-statistics/deploy/helm/openshift/event-statistics-java11-latest-openshift/values.yaml +++ b/event-statistics/deploy/helm/openshift/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8085 - image: quay.io/quarkus-super-heroes/event-statistics:java11-latest + image: quay.io/quarkus-super-heroes/event-statistics:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index 5a224464d..43eca4f6f 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes event-statistics - java11-latest + native-latest Quarkus Sample :: Super-Heroes :: Statistics Microservice 3.24.2 diff --git a/rest-fights/deploy/helm/knative/Chart.yaml b/rest-fights/deploy/helm/knative/Chart.yaml new file mode 100644 index 000000000..6fa8100f1 --- /dev/null +++ b/rest-fights/deploy/helm/knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-native-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml deleted file mode 100644 index fdf3c765f..000000000 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml deleted file mode 100644 index fde30cb9f..000000000 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml b/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml deleted file mode 100644 index 01c194532..000000000 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/knative/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/NOTES.txt rename to rest-fights/deploy/helm/knative/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml b/rest-fights/deploy/helm/knative/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/configmap.yaml rename to rest-fights/deploy/helm/knative/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml b/rest-fights/deploy/helm/knative/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/deployment.yaml rename to rest-fights/deploy/helm/knative/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml b/rest-fights/deploy/helm/knative/templates/rolebinding.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/rolebinding.yaml rename to rest-fights/deploy/helm/knative/templates/rolebinding.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml b/rest-fights/deploy/helm/knative/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/secret.yaml rename to rest-fights/deploy/helm/knative/templates/secret.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml b/rest-fights/deploy/helm/knative/templates/service.yaml similarity index 91% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml rename to rest-fights/deploy/helm/knative/templates/service.yaml index 6a9640c62..b4ffc13eb 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/service.yaml +++ b/rest-fights/deploy/helm/knative/templates/service.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:51:43 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:15:22 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -17,9 +17,9 @@ metadata: app.openshift.io/runtime: quarkus application: fights-service system: quarkus-super-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: java11-latest name: rest-fights spec: template: @@ -34,16 +34,16 @@ spec: app.openshift.io/runtime: quarkus application: fights-service system: quarkus-super-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: java11-latest spec: containers: - envFrom: - - secretRef: - name: rest-fights-config-creds - configMapRef: name: rest-fights-config + - secretRef: + name: rest-fights-config-creds image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -71,11 +71,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: v1 kind: Service diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml b/rest-fights/deploy/helm/knative/values.yaml similarity index 94% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml rename to rest-fights/deploy/helm/knative/values.yaml index 36cb2ad8c..58aa59b22 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/values.yaml +++ b/rest-fights/deploy/helm/knative/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-heroes:java11-latest + image: rest-fights:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-fights/deploy/helm/kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/Chart.yaml new file mode 100644 index 000000000..412646747 --- /dev/null +++ b/rest-fights/deploy/helm/kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-native-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index c6b0fcd7c..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index 595d6aa2d..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml deleted file mode 100644 index 82fec3323..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,153 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - name: rest-heroes -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - template: - metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml deleted file mode 100644 index 4a47cbd83..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index c88fc8495..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml deleted file mode 100644 index 54adfcf49..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - name: rest-villains -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - template: - metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-villains-config - - secretRef: - name: rest-villains-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml deleted file mode 100644 index 39ee81c0e..000000000 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/kubernetes/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/NOTES.txt rename to rest-fights/deploy/helm/kubernetes/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml b/rest-fights/deploy/helm/kubernetes/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/configmap.yaml rename to rest-fights/deploy/helm/kubernetes/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/templates/deployment.yaml similarity index 93% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml rename to rest-fights/deploy/helm/kubernetes/templates/deployment.yaml index 08e7dc34f..970d4e11d 100644 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/deployment.yaml +++ b/rest-fights/deploy/helm/kubernetes/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -18,7 +18,7 @@ metadata: system: quarkus-super-heroes app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest name: rest-fights spec: replicas: 1 @@ -26,15 +26,15 @@ spec: matchLabels: app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest template: metadata: annotations: app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -45,7 +45,7 @@ spec: system: quarkus-super-heroes app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest spec: containers: - env: @@ -54,10 +54,10 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - configMapRef: - name: rest-fights-config - secretRef: name: rest-fights-config-creds + - configMapRef: + name: rest-fights-config image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml b/rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/rolebinding.yaml rename to rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml b/rest-fights/deploy/helm/kubernetes/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/secret.yaml rename to rest-fights/deploy/helm/kubernetes/templates/secret.yaml diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/templates/service.yaml similarity index 89% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml rename to rest-fights/deploy/helm/kubernetes/templates/service.yaml index 566d749c1..33a2591aa 100644 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/service.yaml +++ b/rest-fights/deploy/helm/kubernetes/templates/service.yaml @@ -62,8 +62,8 @@ metadata: app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:44:33 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -71,7 +71,7 @@ metadata: labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -85,5 +85,5 @@ spec: selector: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml b/rest-fights/deploy/helm/kubernetes/values.yaml similarity index 87% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml rename to rest-fights/deploy/helm/kubernetes/values.yaml index bff575d81..afef629b8 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/values.yaml +++ b/rest-fights/deploy/helm/kubernetes/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8082 - image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + image: quay.io/quarkus-super-heroes/rest-fights:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-fights/deploy/helm/minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/Chart.yaml new file mode 100644 index 000000000..ffc45ae98 --- /dev/null +++ b/rest-fights/deploy/helm/minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-native-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml deleted file mode 100644 index 3846c5ae2..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml deleted file mode 100644 index bb2ab0360..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml deleted file mode 100644 index 4429831a2..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/deployment.yaml +++ /dev/null @@ -1,153 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml deleted file mode 100644 index 0c17fe334..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - ports: - - name: http - nodePort: 30471 - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml deleted file mode 100644 index 293d898e9..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml b/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml deleted file mode 100644 index 51f5b3b0f..000000000 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: rest-villains:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt b/rest-fights/deploy/helm/minikube/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/templates/NOTES.txt rename to rest-fights/deploy/helm/minikube/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml b/rest-fights/deploy/helm/minikube/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/configmap.yaml rename to rest-fights/deploy/helm/minikube/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/templates/deployment.yaml similarity index 93% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml rename to rest-fights/deploy/helm/minikube/templates/deployment.yaml index 6a412ce2f..65737b33f 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/deployment.yaml +++ b/rest-fights/deploy/helm/minikube/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -15,7 +15,7 @@ metadata: labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -26,15 +26,15 @@ spec: matchLabels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest template: metadata: annotations: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -42,7 +42,7 @@ spec: labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml b/rest-fights/deploy/helm/minikube/templates/rolebinding.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/rolebinding.yaml rename to rest-fights/deploy/helm/minikube/templates/rolebinding.yaml diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml b/rest-fights/deploy/helm/minikube/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/secret.yaml rename to rest-fights/deploy/helm/minikube/templates/secret.yaml diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/templates/service.yaml similarity index 89% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml rename to rest-fights/deploy/helm/minikube/templates/service.yaml index 2bd6dc1ad..cf09ad05f 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/service.yaml +++ b/rest-fights/deploy/helm/minikube/templates/service.yaml @@ -62,8 +62,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:47:03 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" @@ -71,7 +71,7 @@ metadata: labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -86,5 +86,5 @@ spec: selector: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml b/rest-fights/deploy/helm/minikube/values.yaml similarity index 87% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml rename to rest-fights/deploy/helm/minikube/values.yaml index bff575d81..818b0befc 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/values.yaml +++ b/rest-fights/deploy/helm/minikube/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8082 - image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + image: rest-fights:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-fights/deploy/helm/openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/Chart.yaml new file mode 100644 index 000000000..1a4b8d129 --- /dev/null +++ b/rest-fights/deploy/helm/openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-fights-native-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml deleted file mode 100644 index f448a40d1..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml deleted file mode 100644 index efdc05373..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml deleted file mode 100644 index 7d982c2a7..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - name: rest-heroes -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml deleted file mode 100644 index 843323120..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/route.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - port: - targetPort: http - to: - kind: Service - name: rest-heroes diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml deleted file mode 100644 index 1ac6e738c..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml deleted file mode 100644 index 30228d5c2..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml deleted file mode 100644 index 078a40ce7..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/route.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - port: - targetPort: http - to: - kind: Service - name: rest-villains diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml deleted file mode 100644 index f392c78b2..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml b/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml deleted file mode 100644 index 51f5b3b0f..000000000 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: rest-villains:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt b/rest-fights/deploy/helm/openshift/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt rename to rest-fights/deploy/helm/openshift/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml b/rest-fights/deploy/helm/openshift/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/configmap.yaml rename to rest-fights/deploy/helm/openshift/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml b/rest-fights/deploy/helm/openshift/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deployment.yaml rename to rest-fights/deploy/helm/openshift/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml similarity index 85% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml rename to rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml index 820660dc2..373d1e158 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/deploymentconfig.yaml +++ b/rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml @@ -3,19 +3,19 @@ apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -24,29 +24,29 @@ metadata: spec: replicas: 1 selector: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: native-latest + app.kubernetes.io/part-of: fights-service template: metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" - prometheus.io/scheme: http labels: app: rest-fights application: fights-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: native-latest + app.kubernetes.io/part-of: fights-service spec: containers: - env: @@ -55,10 +55,10 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - configMapRef: - name: rest-fights-config - secretRef: name: rest-fights-config-creds + - configMapRef: + name: rest-fights-config image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -86,11 +86,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi triggers: - imageChangeParams: automatic: true @@ -98,5 +93,5 @@ spec: - rest-fights from: kind: ImageStreamTag - name: rest-fights:java11-latest + name: rest-fights:native-latest type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/templates/imagestream.yaml similarity index 86% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml rename to rest-fights/deploy/helm/openshift/templates/imagestream.yaml index 12a6d7cd1..0d5e10e78 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/imagestream.yaml +++ b/rest-fights/deploy/helm/openshift/templates/imagestream.yaml @@ -6,16 +6,16 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 labels: app: rest-fights application: fights-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: fights-service app.kubernetes.io/name: rest-fights + app.kubernetes.io/version: native-latest + app.kubernetes.io/part-of: fights-service name: rest-fights spec: lookupPolicy: diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml b/rest-fights/deploy/helm/openshift/templates/rolebinding.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/rolebinding.yaml rename to rest-fights/deploy/helm/openshift/templates/rolebinding.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/templates/route.yaml similarity index 85% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml rename to rest-fights/deploy/helm/openshift/templates/route.yaml index 611cd0acd..d3ad9fb00 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/route.yaml +++ b/rest-fights/deploy/helm/openshift/templates/route.yaml @@ -27,12 +27,12 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml b/rest-fights/deploy/helm/openshift/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/secret.yaml rename to rest-fights/deploy/helm/openshift/templates/secret.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/templates/service.yaml similarity index 89% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml rename to rest-fights/deploy/helm/openshift/templates/service.yaml index 92c7c8e78..78a63ac0e 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/service.yaml +++ b/rest-fights/deploy/helm/openshift/templates/service.yaml @@ -59,19 +59,19 @@ apiVersion: v1 kind: Service metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:49:17 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8082" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-fights application: fights-service system: quarkus-super-heroes @@ -86,5 +86,5 @@ spec: selector: app.kubernetes.io/name: rest-fights app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml b/rest-fights/deploy/helm/openshift/values.yaml similarity index 87% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml rename to rest-fights/deploy/helm/openshift/values.yaml index bff575d81..818b0befc 100644 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/values.yaml +++ b/rest-fights/deploy/helm/openshift/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8082 - image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + image: rest-fights:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 8a169c328..5d315af30 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-fights - java11-latest + native-latest Quarkus Sample :: Super-Heroes :: Fights Microservice 3.24.2 diff --git a/rest-heroes/deploy/helm/knative/Chart.yaml b/rest-heroes/deploy/helm/knative/Chart.yaml new file mode 100644 index 000000000..970053ef2 --- /dev/null +++ b/rest-heroes/deploy/helm/knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-native-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml deleted file mode 100644 index fde30cb9f..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml deleted file mode 100644 index ba350577d..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml deleted file mode 100644 index fd7603896..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/templates/service.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:59 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - app.openshift.io/runtime: quarkus - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - name: rest-heroes -spec: - template: - spec: - containers: - - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP diff --git a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml b/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml deleted file mode 100644 index 36cb2ad8c..000000000 --- a/rest-heroes/deploy/helm/knative/rest-heroes-java11-latest-knative/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-heroes:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt b/rest-heroes/deploy/helm/knative/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/NOTES.txt rename to rest-heroes/deploy/helm/knative/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml b/rest-heroes/deploy/helm/knative/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/configmap.yaml rename to rest-heroes/deploy/helm/knative/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml b/rest-heroes/deploy/helm/knative/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/deployment.yaml rename to rest-heroes/deploy/helm/knative/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml b/rest-heroes/deploy/helm/knative/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/secret.yaml rename to rest-heroes/deploy/helm/knative/templates/secret.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml b/rest-heroes/deploy/helm/knative/templates/service.yaml similarity index 89% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml rename to rest-heroes/deploy/helm/knative/templates/service.yaml index fd7603896..7952afe78 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-heroes-java11-latest-knative/templates/service.yaml +++ b/rest-heroes/deploy/helm/knative/templates/service.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:59 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:13:51 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -17,9 +17,9 @@ metadata: app.openshift.io/runtime: quarkus application: heroes-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-heroes + app.kubernetes.io/version: native-latest app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/name: rest-heroes name: rest-heroes spec: template: @@ -57,11 +57,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: v1 kind: Service diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml b/rest-heroes/deploy/helm/knative/values.yaml similarity index 89% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml rename to rest-heroes/deploy/helm/knative/values.yaml index 1f1dd885b..4a714f68e 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/values.yaml +++ b/rest-heroes/deploy/helm/knative/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: quay.io/quarkus-super-heroes/rest-fights:java11-latest + image: quay.io/quarkus-super-heroes/rest-heroes:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-heroes/deploy/helm/kubernetes/Chart.yaml b/rest-heroes/deploy/helm/kubernetes/Chart.yaml new file mode 100644 index 000000000..e27a57beb --- /dev/null +++ b/rest-heroes/deploy/helm/kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-native-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index 595d6aa2d..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml deleted file mode 100644 index 92a1aec90..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml b/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml deleted file mode 100644 index 4a47cbd83..000000000 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt b/rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/templates/NOTES.txt rename to rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml b/rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/configmap.yaml rename to rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml diff --git a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml b/rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml similarity index 89% rename from rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml rename to rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml index 82fec3323..74f38a4e4 100644 --- a/rest-heroes/deploy/helm/kubernetes/rest-heroes-java11-latest-kubernetes/templates/deployment.yaml +++ b/rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "heroes-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -16,25 +16,25 @@ metadata: app: rest-heroes application: heroes-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/version: native-latest name: rest-heroes spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/version: java11-latest app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/version: native-latest template: metadata: annotations: app.openshift.io/connects-to: "heroes-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -43,9 +43,9 @@ spec: app: rest-heroes application: heroes-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/version: native-latest spec: containers: - env: @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml b/rest-heroes/deploy/helm/kubernetes/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/secret.yaml rename to rest-heroes/deploy/helm/kubernetes/templates/secret.yaml diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml b/rest-heroes/deploy/helm/kubernetes/templates/service.yaml similarity index 82% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml rename to rest-heroes/deploy/helm/kubernetes/templates/service.yaml index 92a1aec90..be8901567 100644 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-heroes-java11-latest-kubernetes/templates/service.yaml +++ b/rest-heroes/deploy/helm/kubernetes/templates/service.yaml @@ -23,8 +23,8 @@ metadata: app.openshift.io/connects-to: "heroes-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:47 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -32,7 +32,7 @@ metadata: labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -46,5 +46,5 @@ spec: selector: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml b/rest-heroes/deploy/helm/kubernetes/values.yaml similarity index 87% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml rename to rest-heroes/deploy/helm/kubernetes/values.yaml index 4a47cbd83..ed11cfda1 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/values.yaml +++ b/rest-heroes/deploy/helm/kubernetes/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8083 - image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest + image: quay.io/quarkus-super-heroes/rest-heroes:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-heroes/deploy/helm/minikube/Chart.yaml b/rest-heroes/deploy/helm/minikube/Chart.yaml new file mode 100644 index 000000000..b495b7dfa --- /dev/null +++ b/rest-heroes/deploy/helm/minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-native-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml deleted file mode 100644 index bb2ab0360..000000000 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml b/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml deleted file mode 100644 index 4a47cbd83..000000000 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: quay.io/quarkus-super-heroes/rest-heroes:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt b/rest-heroes/deploy/helm/minikube/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/NOTES.txt rename to rest-heroes/deploy/helm/minikube/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml b/rest-heroes/deploy/helm/minikube/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/configmap.yaml rename to rest-heroes/deploy/helm/minikube/templates/configmap.yaml diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml b/rest-heroes/deploy/helm/minikube/templates/deployment.yaml similarity index 89% rename from rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml rename to rest-heroes/deploy/helm/minikube/templates/deployment.yaml index 4429831a2..b15c83576 100644 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/deployment.yaml +++ b/rest-heroes/deploy/helm/minikube/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -15,7 +15,7 @@ metadata: labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -26,15 +26,15 @@ spec: matchLabels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest template: metadata: annotations: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -42,7 +42,7 @@ spec: labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -54,10 +54,10 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - configMapRef: - name: rest-heroes-config - secretRef: name: rest-heroes-config-creds + - configMapRef: + name: rest-heroes-config image: {{ .Values.app.image }} imagePullPolicy: IfNotPresent livenessProbe: @@ -85,11 +85,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml b/rest-heroes/deploy/helm/minikube/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-heroes-java11-latest-minikube/templates/secret.yaml rename to rest-heroes/deploy/helm/minikube/templates/secret.yaml diff --git a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml b/rest-heroes/deploy/helm/minikube/templates/service.yaml similarity index 82% rename from rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml rename to rest-heroes/deploy/helm/minikube/templates/service.yaml index 0c17fe334..097aacea9 100644 --- a/rest-heroes/deploy/helm/minikube/rest-heroes-java11-latest-minikube/templates/service.yaml +++ b/rest-heroes/deploy/helm/minikube/templates/service.yaml @@ -23,8 +23,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:46:26 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" @@ -32,7 +32,7 @@ metadata: labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -47,5 +47,5 @@ spec: selector: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml b/rest-heroes/deploy/helm/minikube/values.yaml similarity index 92% rename from rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml rename to rest-heroes/deploy/helm/minikube/values.yaml index 885414b20..78e3b1e36 100644 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/values.yaml +++ b/rest-heroes/deploy/helm/minikube/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8083 - image: rest-heroes:java11-latest + image: rest-heroes:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-heroes/deploy/helm/openshift/Chart.yaml b/rest-heroes/deploy/helm/openshift/Chart.yaml new file mode 100644 index 000000000..d78f790bf --- /dev/null +++ b/rest-heroes/deploy/helm/openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-heroes-native-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml deleted file mode 100644 index efdc05373..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml deleted file mode 100644 index ba350577d..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml deleted file mode 100644 index dd5b7c343..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,102 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - replicas: 1 - selector: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - template: - metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-heroes-config-creds - - configMapRef: - name: rest-heroes-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi - triggers: - - imageChangeParams: - automatic: true - containerNames: - - rest-heroes - from: - kind: ImageStreamTag - name: rest-heroes:java11-latest - type: ImageChange diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml b/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt b/rest-heroes/deploy/helm/openshift/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/NOTES.txt rename to rest-heroes/deploy/helm/openshift/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml b/rest-heroes/deploy/helm/openshift/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/configmap.yaml rename to rest-heroes/deploy/helm/openshift/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml b/rest-heroes/deploy/helm/openshift/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deployment.yaml rename to rest-heroes/deploy/helm/openshift/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml similarity index 85% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml rename to rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml index dd5b7c343..ea5c62136 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/deploymentconfig.yaml +++ b/rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml @@ -3,19 +3,19 @@ apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -24,29 +24,29 @@ metadata: spec: replicas: 1 selector: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: native-latest template: metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" - prometheus.io/scheme: http labels: app: rest-heroes application: heroes-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: native-latest spec: containers: - env: @@ -55,10 +55,10 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - secretRef: - name: rest-heroes-config-creds - configMapRef: name: rest-heroes-config + - secretRef: + name: rest-heroes-config-creds image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -86,11 +86,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi triggers: - imageChangeParams: automatic: true @@ -98,5 +93,5 @@ spec: - rest-heroes from: kind: ImageStreamTag - name: rest-heroes:java11-latest + name: rest-heroes:native-latest type: ImageChange diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml b/rest-heroes/deploy/helm/openshift/templates/imagestream.yaml similarity index 86% rename from rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml rename to rest-heroes/deploy/helm/openshift/templates/imagestream.yaml index 7d982c2a7..968e1d316 100644 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/imagestream.yaml +++ b/rest-heroes/deploy/helm/openshift/templates/imagestream.yaml @@ -6,16 +6,16 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 labels: app: rest-heroes application: heroes-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: heroes-service app.kubernetes.io/name: rest-heroes + app.kubernetes.io/part-of: heroes-service + app.kubernetes.io/version: native-latest name: rest-heroes spec: lookupPolicy: diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml b/rest-heroes/deploy/helm/openshift/templates/route.yaml similarity index 76% rename from rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml rename to rest-heroes/deploy/helm/openshift/templates/route.yaml index 843323120..f8565188a 100644 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/route.yaml +++ b/rest-heroes/deploy/helm/openshift/templates/route.yaml @@ -6,12 +6,12 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml b/rest-heroes/deploy/helm/openshift/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/secret.yaml rename to rest-heroes/deploy/helm/openshift/templates/secret.yaml diff --git a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml b/rest-heroes/deploy/helm/openshift/templates/service.yaml similarity index 83% rename from rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml rename to rest-heroes/deploy/helm/openshift/templates/service.yaml index 1ac6e738c..f6390a387 100644 --- a/rest-heroes/deploy/helm/openshift/rest-heroes-java11-latest-openshift/templates/service.yaml +++ b/rest-heroes/deploy/helm/openshift/templates/service.yaml @@ -20,19 +20,19 @@ apiVersion: v1 kind: Service metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "heroes-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:42 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8083" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest app: rest-heroes application: heroes-service system: quarkus-super-heroes @@ -47,5 +47,5 @@ spec: selector: app.kubernetes.io/name: rest-heroes app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: native-latest type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml b/rest-heroes/deploy/helm/openshift/values.yaml similarity index 92% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml rename to rest-heroes/deploy/helm/openshift/values.yaml index 885414b20..78e3b1e36 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/values.yaml +++ b/rest-heroes/deploy/helm/openshift/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8083 - image: rest-heroes:java11-latest + image: rest-heroes:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 49638e1ed..4ac570784 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.workshop.super-heroes rest-heroes - java11-latest + native-latest Quarkus Sample :: Super-Heroes :: Heroes Microservice 3.24.2 diff --git a/rest-villains/deploy/helm/knative/Chart.yaml b/rest-villains/deploy/helm/knative/Chart.yaml new file mode 100644 index 000000000..155d54e67 --- /dev/null +++ b/rest-villains/deploy/helm/knative/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-native-latest-knative +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml deleted file mode 100644 index 01c194532..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml deleted file mode 100644 index 58b9683f5..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml deleted file mode 100644 index cbacc4fc2..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/templates/service.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:18 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - app.openshift.io/runtime: quarkus - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - name: rest-villains -spec: - template: - spec: - containers: - - envFrom: - - secretRef: - name: rest-villains-config-creds - - configMapRef: - name: rest-villains-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP diff --git a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml b/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml deleted file mode 100644 index c00aa64e9..000000000 --- a/rest-villains/deploy/helm/knative/rest-villains-java11-latest-knative/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-villains:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt b/rest-villains/deploy/helm/knative/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/templates/NOTES.txt rename to rest-villains/deploy/helm/knative/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml b/rest-villains/deploy/helm/knative/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/configmap.yaml rename to rest-villains/deploy/helm/knative/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml b/rest-villains/deploy/helm/knative/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/deployment.yaml rename to rest-villains/deploy/helm/knative/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml b/rest-villains/deploy/helm/knative/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/secret.yaml rename to rest-villains/deploy/helm/knative/templates/secret.yaml diff --git a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml b/rest-villains/deploy/helm/knative/templates/service.yaml similarity index 89% rename from rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml rename to rest-villains/deploy/helm/knative/templates/service.yaml index cbacc4fc2..ab91aa440 100644 --- a/rest-fights/deploy/helm/knative/rest-fights-java11-latest-knative/charts/rest-villains-java11-latest-knative/templates/service.yaml +++ b/rest-villains/deploy/helm/knative/templates/service.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:50:18 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:12:27 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -17,19 +17,19 @@ metadata: app.openshift.io/runtime: quarkus application: villains-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-villains + app.kubernetes.io/version: {{ .Values.app.version }} app.kubernetes.io/part-of: villains-service + app.kubernetes.io/name: rest-villains name: rest-villains spec: template: spec: containers: - envFrom: - - secretRef: - name: rest-villains-config-creds - configMapRef: name: rest-villains-config + - secretRef: + name: rest-villains-config-creds image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -57,11 +57,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi --- apiVersion: v1 kind: Service diff --git a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml b/rest-villains/deploy/helm/knative/values.yaml similarity index 90% rename from event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml rename to rest-villains/deploy/helm/knative/values.yaml index 4ae723bd6..5ac8faba8 100644 --- a/event-statistics/deploy/helm/knative/event-statistics-java11-latest-knative/values.yaml +++ b/rest-villains/deploy/helm/knative/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: event-statistics:java11-latest + image: rest-villains:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 @@ -22,3 +22,4 @@ app: path: /q/health/ready scheme: HTTP port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" + version: native-latest diff --git a/rest-villains/deploy/helm/kubernetes/Chart.yaml b/rest-villains/deploy/helm/kubernetes/Chart.yaml new file mode 100644 index 000000000..8063a1c7c --- /dev/null +++ b/rest-villains/deploy/helm/kubernetes/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-native-latest-kubernetes +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml deleted file mode 100644 index c88fc8495..000000000 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml b/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml deleted file mode 100644 index 39ee81c0e..000000000 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt b/rest-villains/deploy/helm/kubernetes/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-heroes-java11-latest-openshift/templates/NOTES.txt rename to rest-villains/deploy/helm/kubernetes/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml b/rest-villains/deploy/helm/kubernetes/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/configmap.yaml rename to rest-villains/deploy/helm/kubernetes/templates/configmap.yaml diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml b/rest-villains/deploy/helm/kubernetes/templates/deployment.yaml similarity index 89% rename from rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml rename to rest-villains/deploy/helm/kubernetes/templates/deployment.yaml index 54adfcf49..64bf86460 100644 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/templates/deployment.yaml +++ b/rest-villains/deploy/helm/kubernetes/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.openshift.io/connects-to: "villains-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -16,25 +16,25 @@ metadata: app: rest-villains application: villains-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: {{ .Values.app.version }} name: rest-villains spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: {{ .Values.app.version }} template: metadata: annotations: app.openshift.io/connects-to: "villains-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:43:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -43,9 +43,9 @@ spec: app: rest-villains application: villains-service system: quarkus-super-heroes - app.kubernetes.io/version: java11-latest - app.kubernetes.io/part-of: villains-service app.kubernetes.io/name: rest-villains + app.kubernetes.io/part-of: villains-service + app.kubernetes.io/version: {{ .Values.app.version }} spec: containers: - env: @@ -54,10 +54,10 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - configMapRef: - name: rest-villains-config - secretRef: name: rest-villains-config-creds + - configMapRef: + name: rest-villains-config image: {{ .Values.app.image }} imagePullPolicy: Always livenessProbe: @@ -87,9 +87,9 @@ spec: timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} resources: limits: - memory: 768Mi + memory: {{ .Values.app.resources.limits.memory }} requests: - memory: 256Mi + memory: {{ .Values.app.resources.requests.memory }} --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml b/rest-villains/deploy/helm/kubernetes/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/templates/secret.yaml rename to rest-villains/deploy/helm/kubernetes/templates/secret.yaml diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml b/rest-villains/deploy/helm/kubernetes/templates/service.yaml similarity index 81% rename from rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml rename to rest-villains/deploy/helm/kubernetes/templates/service.yaml index 8442796c4..d89011e32 100644 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/service.yaml +++ b/rest-villains/deploy/helm/kubernetes/templates/service.yaml @@ -20,11 +20,11 @@ apiVersion: v1 kind: Service metadata: annotations: + app.openshift.io/connects-to: "villains-db,otel-collector" app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -32,7 +32,7 @@ metadata: labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -40,12 +40,11 @@ metadata: spec: ports: - name: http - nodePort: 30526 port: 80 protocol: TCP targetPort: 8084 selector: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml b/rest-villains/deploy/helm/kubernetes/values.yaml similarity index 73% rename from rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml rename to rest-villains/deploy/helm/kubernetes/values.yaml index 534e6dbf8..61eccf931 100644 --- a/rest-villains/deploy/helm/kubernetes/rest-villains-java11-latest-kubernetes/values.yaml +++ b/rest-villains/deploy/helm/kubernetes/values.yaml @@ -11,7 +11,12 @@ app: path: /q/health/live scheme: HTTP port: 8084 - image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + image: quay.io/quarkus-super-heroes/rest-villains:native-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi readinessProbe: failureThreshold: 3 timeoutSeconds: 10 @@ -22,3 +27,4 @@ app: path: /q/health/ready scheme: HTTP port: 8084 + version: native-latest diff --git a/rest-villains/deploy/helm/minikube/Chart.yaml b/rest-villains/deploy/helm/minikube/Chart.yaml new file mode 100644 index 000000000..73e8280f6 --- /dev/null +++ b/rest-villains/deploy/helm/minikube/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-native-latest-minikube +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml deleted file mode 100644 index 293d898e9..000000000 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml deleted file mode 100644 index 33a335545..000000000 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-villains-config - - secretRef: - name: rest-villains-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml b/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt b/rest-villains/deploy/helm/minikube/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/NOTES.txt rename to rest-villains/deploy/helm/minikube/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml b/rest-villains/deploy/helm/minikube/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/configmap.yaml rename to rest-villains/deploy/helm/minikube/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml b/rest-villains/deploy/helm/minikube/templates/deployment.yaml similarity index 89% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml rename to rest-villains/deploy/helm/minikube/templates/deployment.yaml index 33a335545..69446dbbe 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/deployment.yaml +++ b/rest-villains/deploy/helm/minikube/templates/deployment.yaml @@ -6,8 +6,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -15,7 +15,7 @@ metadata: labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -26,15 +26,15 @@ spec: matchLabels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} template: metadata: annotations: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -42,7 +42,7 @@ spec: labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -87,9 +87,9 @@ spec: timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} resources: limits: - memory: 768Mi + memory: {{ .Values.app.resources.limits.memory }} requests: - memory: 256Mi + memory: {{ .Values.app.resources.requests.memory }} --- apiVersion: apps/v1 kind: Deployment diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml b/rest-villains/deploy/helm/minikube/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/secret.yaml rename to rest-villains/deploy/helm/minikube/templates/secret.yaml diff --git a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml b/rest-villains/deploy/helm/minikube/templates/service.yaml similarity index 81% rename from rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml rename to rest-villains/deploy/helm/minikube/templates/service.yaml index 8442796c4..3727fe50d 100644 --- a/rest-fights/deploy/helm/minikube/rest-fights-java11-latest-minikube/charts/rest-villains-java11-latest-minikube/templates/service.yaml +++ b/rest-villains/deploy/helm/minikube/templates/service.yaml @@ -23,8 +23,8 @@ metadata: app.quarkus.io/vcs-ref: main app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:45:53 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" @@ -32,7 +32,7 @@ metadata: labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -47,5 +47,5 @@ spec: selector: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml b/rest-villains/deploy/helm/minikube/values.yaml similarity index 76% rename from rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml rename to rest-villains/deploy/helm/minikube/values.yaml index 534e6dbf8..30e906f98 100644 --- a/rest-fights/deploy/helm/kubernetes/rest-fights-java11-latest-kubernetes/charts/rest-villains-java11-latest-kubernetes/values.yaml +++ b/rest-villains/deploy/helm/minikube/values.yaml @@ -11,7 +11,12 @@ app: path: /q/health/live scheme: HTTP port: 8084 - image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + image: rest-villains:native-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi readinessProbe: failureThreshold: 3 timeoutSeconds: 10 @@ -22,3 +27,4 @@ app: path: /q/health/ready scheme: HTTP port: 8084 + version: native-latest diff --git a/rest-villains/deploy/helm/openshift/Chart.yaml b/rest-villains/deploy/helm/openshift/Chart.yaml new file mode 100644 index 000000000..bfca60a76 --- /dev/null +++ b/rest-villains/deploy/helm/openshift/Chart.yaml @@ -0,0 +1,4 @@ +--- +name: rest-villains-native-latest-openshift +version: 1.0.0 +apiVersion: v2 diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml deleted file mode 100644 index 30228d5c2..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-java11-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml deleted file mode 100644 index 58b9683f5..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml deleted file mode 100644 index b35afb747..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,102 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - replicas: 1 - selector: - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-villains - template: - metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-villains - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-villains-config-creds - - configMapRef: - name: rest-villains-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi - triggers: - - imageChangeParams: - automatic: true - containerNames: - - rest-villains - from: - kind: ImageStreamTag - name: rest-villains:java11-latest - type: ImageChange diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml deleted file mode 100644 index 613f2e5b0..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest - app.kubernetes.io/name: rest-villains - name: rest-villains -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml b/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml deleted file mode 100644 index 51f5b3b0f..000000000 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: rest-villains:java11-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt b/rest-villains/deploy/helm/openshift/templates/NOTES.txt similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/templates/NOTES.txt rename to rest-villains/deploy/helm/openshift/templates/NOTES.txt diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml b/rest-villains/deploy/helm/openshift/templates/configmap.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/configmap.yaml rename to rest-villains/deploy/helm/openshift/templates/configmap.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml b/rest-villains/deploy/helm/openshift/templates/deployment.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deployment.yaml rename to rest-villains/deploy/helm/openshift/templates/deployment.yaml diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml b/rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml similarity index 85% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml rename to rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml index b35afb747..3490fea94 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/deploymentconfig.yaml +++ b/rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml @@ -3,19 +3,19 @@ apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -24,28 +24,28 @@ metadata: spec: replicas: 1 selector: + app.kubernetes.io/version: {{ .Values.app.version }} app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest app.kubernetes.io/name: rest-villains template: metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" - prometheus.io/scheme: http labels: app: rest-villains application: villains-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus + app.kubernetes.io/version: {{ .Values.app.version }} app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest app.kubernetes.io/name: rest-villains spec: containers: @@ -86,11 +86,6 @@ spec: periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} successThreshold: {{ .Values.app.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: 768Mi - requests: - memory: 256Mi triggers: - imageChangeParams: automatic: true @@ -98,5 +93,5 @@ spec: - rest-villains from: kind: ImageStreamTag - name: rest-villains:java11-latest + name: rest-villains:native-latest type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml b/rest-villains/deploy/helm/openshift/templates/imagestream.yaml similarity index 85% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml rename to rest-villains/deploy/helm/openshift/templates/imagestream.yaml index 613f2e5b0..b16bce4a2 100644 --- a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/imagestream.yaml +++ b/rest-villains/deploy/helm/openshift/templates/imagestream.yaml @@ -6,15 +6,15 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 labels: app: rest-villains application: villains-service system: quarkus-super-heroes app.openshift.io/runtime: quarkus + app.kubernetes.io/version: {{ .Values.app.version }} app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest app.kubernetes.io/name: rest-villains name: rest-villains spec: diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml b/rest-villains/deploy/helm/openshift/templates/route.yaml similarity index 75% rename from rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml rename to rest-villains/deploy/helm/openshift/templates/route.yaml index 078a40ce7..ddb69aa5d 100644 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/route.yaml +++ b/rest-villains/deploy/helm/openshift/templates/route.yaml @@ -6,12 +6,12 @@ metadata: app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes diff --git a/rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml b/rest-villains/deploy/helm/openshift/templates/secret.yaml similarity index 100% rename from rest-fights/deploy/helm/openshift/rest-fights-java11-latest-openshift/charts/rest-villains-java11-latest-openshift/templates/secret.yaml rename to rest-villains/deploy/helm/openshift/templates/secret.yaml diff --git a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml b/rest-villains/deploy/helm/openshift/templates/service.yaml similarity index 82% rename from rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml rename to rest-villains/deploy/helm/openshift/templates/service.yaml index f392c78b2..386eb8a34 100644 --- a/rest-villains/deploy/helm/openshift/rest-villains-java11-latest-openshift/templates/service.yaml +++ b/rest-villains/deploy/helm/openshift/templates/service.yaml @@ -20,19 +20,19 @@ apiVersion: v1 kind: Service metadata: annotations: + prometheus.io/scheme: http app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes app.openshift.io/connects-to: "villains-db,otel-collector" app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: e6b908a2aad15d5f15e203fc2a7e40dd28e85bab - app.quarkus.io/build-timestamp: 2023-02-20 - 20:48:10 +0000 + app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c + app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8084" - prometheus.io/scheme: http labels: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} app: rest-villains application: villains-service system: quarkus-super-heroes @@ -47,5 +47,5 @@ spec: selector: app.kubernetes.io/name: rest-villains app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: java11-latest + app.kubernetes.io/version: {{ .Values.app.version }} type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml b/rest-villains/deploy/helm/openshift/values.yaml similarity index 88% rename from rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml rename to rest-villains/deploy/helm/openshift/values.yaml index 51f5b3b0f..e6314e780 100644 --- a/rest-villains/deploy/helm/minikube/rest-villains-java11-latest-minikube/values.yaml +++ b/rest-villains/deploy/helm/openshift/values.yaml @@ -11,7 +11,7 @@ app: path: /q/health/live scheme: HTTP port: 8084 - image: rest-villains:java11-latest + image: rest-villains:native-latest readinessProbe: failureThreshold: 3 timeoutSeconds: 10 @@ -22,3 +22,4 @@ app: path: /q/health/ready scheme: HTTP port: 8084 + version: native-latest diff --git a/rest-villains/deploy/helm/values-java11.yaml b/rest-villains/deploy/helm/values-java11.yaml new file mode 100644 index 000000000..bb740314d --- /dev/null +++ b/rest-villains/deploy/helm/values-java11.yaml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi + version: java11-latest diff --git a/rest-villains/deploy/helm/values-java17.yaml b/rest-villains/deploy/helm/values-java17.yaml new file mode 100644 index 000000000..c6d2b1ed8 --- /dev/null +++ b/rest-villains/deploy/helm/values-java17.yaml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:java17-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi + version: java17-latest diff --git a/rest-villains/deploy/helm/values-native.yaml b/rest-villains/deploy/helm/values-native.yaml new file mode 100644 index 000000000..15bcd8ef0 --- /dev/null +++ b/rest-villains/deploy/helm/values-native.yaml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:native-latest + resources: + requests: + memory: 32Mi + limits: + memory: 128Mi + version: native-latest diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index b34da60fe..ccc01840a 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-villains - java17-latest + native-latest Quarkus Sample :: Super-Heroes :: Villains Microservice 3.24.2 diff --git a/rest-villains/src/main/resources/application.properties b/rest-villains/src/main/resources/application.properties index f444896bd..6fa2b147c 100644 --- a/rest-villains/src/main/resources/application.properties +++ b/rest-villains/src/main/resources/application.properties @@ -94,3 +94,8 @@ quarkus.knative.labels.system=${quarkus.kubernetes.labels.system} # Minikube %minikube.quarkus.config.profile.parent=prod %minikube.quarkus.kubernetes.deployment-target=minikube + +# Helm +quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory +quarkus.helm.values."resources.requests.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory +quarkus.helm.values."version".paths=*.labels.'app.kubernetes.io/version',*.selector.'app.kubernetes.io/version',*.matchLabels.'app.kubernetes.io/version' diff --git a/scripts/generate-helm-charts.sh b/scripts/generate-helm-charts.sh index 0be45913f..66b382a2e 100755 --- a/scripts/generate-helm-charts.sh +++ b/scripts/generate-helm-charts.sh @@ -1,10 +1,11 @@ -#!/bin/bash -ex +#!/bin/bash +#-ex -# Create the deploy/k8s files for each java version of each of the Quarkus services +# Create the deploy/helm files for each java version of each of the Quarkus services # Then add on the ui-super-heroes INPUT_DIR=src/main/kubernetes -OUTPUT_DIR=deploy/k8s +OUTPUT_DIR=deploy/helm OUTPUT_HELM_DIR=deploy/helm @@ -28,24 +29,16 @@ do_build() { local git_repo="${GITHUB_REPOSITORY:=quarkusio/quarkus-super-heroes}" local github_ref_name="${BRANCH:=${GITHUB_REF_NAME:=main}}" - if [[ "$kind" == "native-" ]]; then - local mem_limit="128Mi" - local mem_request="32Mi" - else - local mem_limit="768Mi" - local mem_request="256Mi" - fi - if [[ "$deployment_type" == "openshift" ]]; then local expose=true else local expose=false fi - echo "Generating app resources for $project/$container_tag/$deployment_type" + echo "Generating helm resources for $project/$container_tag/$deployment_type" rm -rf $project/target - $project/mvnw -f $project/pom.xml versions:set clean package \ + $project/mvnw -q -f $project/pom.xml versions:set clean package \ -DskipTests \ -DnewVersion=$container_tag \ -Dmaven.compiler.release=$javaVersion \ @@ -53,20 +46,14 @@ do_build() { -Dquarkus.kubernetes.deployment-target=$deployment_type \ -Dquarkus.kubernetes.version=$container_tag \ -Dquarkus.kubernetes.ingress.expose=$expose \ - -Dquarkus.kubernetes.resources.limits.memory=$mem_limit \ - -Dquarkus.kubernetes.resources.requests.memory=$mem_request \ -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-ref\"=$github_ref_name \ -Dquarkus.openshift.version=$container_tag \ -Dquarkus.openshift.route.expose=$expose \ - -Dquarkus.openshift.resources.limits.memory=$mem_limit \ - -Dquarkus.openshift.resources.requests.memory=$mem_request \ -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ -Dquarkus.knative.version=$container_tag \ -Dquarkus.knative.labels.\"app.openshift.io/runtime\"=quarkus \ - -Dquarkus.knative.resources.limits.memory=$mem_limit \ - -Dquarkus.knative.resources.requests.memory=$mem_request \ -Dquarkus.knative.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ -Dquarkus.helm.version=1.0.0 \ @@ -93,20 +80,21 @@ process_quarkus_project() { do_build $project $deployment_type $version_tag $javaVersion $kind rm -rf $generated_helm_dir - mkdir $generated_helm_dir + mkdir -p $generated_helm_dir - # Now merge the generated resources to the top level (deploy/helm) + # Now copy the helm files into the deploy directory (deploy/helm) out of the transient target. if [[ -f "$app_generated_input_file" ]]; then - echo "Copying app generated helm ($app_generated_input_file) to $project_output_file and $all_apps_output_file" + echo "Copying generated helm chart ($app_generated_helm_chart) to $generated_helm_dir" - cp -R $app_generated_helm_chart $generated_helm_dir + cp -R $app_generated_helm_chart/* $generated_helm_dir fi if [[ "$project" == "rest-fights" ]]; then echo "Copying rest villain and heroes helm charts to the rest fights one " - - cp -R "rest-villains/${OUTPUT_HELM_DIR}/${deployment_type}/rest-villains-${container_tag}-${deployment_type}" "${generated_helm_dir}/${project}-${container_tag}-${deployment_type}/charts/" - cp -R "rest-heroes/${OUTPUT_HELM_DIR}/${deployment_type}/rest-heroes-${container_tag}-${deployment_type}" "${generated_helm_dir}/${project}-${container_tag}-${deployment_type}/charts/" + mkdir -p "${generated_helm_dir}/charts/rest-villains" + cp -R rest-villains/${OUTPUT_HELM_DIR}/${deployment_type}/* "${generated_helm_dir}/charts/rest-villains" + mkdir -p "${generated_helm_dir}/charts/rest-heroes" + cp -R rest-heroes/${OUTPUT_HELM_DIR}/${deployment_type}/* "${generated_helm_dir}/charts/rest-heroes" fi } @@ -156,8 +144,15 @@ process_ui_project() { #} #rm -rf $OUTPUT_DIR/*.yml +KINDS_ALL=("" "native-") +PROJECTS_ALL=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") +DEPLOYMENTS_ALL=("kubernetes" "minikube" "openshift" "knative") + +#KINDS_ALL=("") +#PROJECTS_ALL=("rest-villains") +#DEPLOYMENTS_ALL=("kubernetes") -for kind in "" "native-" +for kind in "${KINDS_ALL[@]}" do if [[ "$kind" == "native-" ]]; then javaVersions=(17) @@ -165,9 +160,9 @@ do javaVersions=(11 17) fi - for javaVersion in ${javaVersions[@]} + for javaVersion in "${javaVersions[@]}" do - for deployment_type in "kubernetes" "minikube" "openshift" "knative" + for deployment_type in "${DEPLOYMENTS_ALL[@]}" do if [[ "$kind" == "native-" ]]; then version_tag="native" @@ -175,7 +170,7 @@ do version_tag="${kind}java${javaVersion}" fi - for project in "rest-villains" "rest-heroes" "rest-fights" "event-statistics" + for project in "${PROJECTS_ALL[@]}" do process_quarkus_project $project $deployment_type $version_tag $javaVersion $kind done From fc66d304401a96d61b9506cc2cacc7f15d7864df Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 31 Mar 2023 18:05:54 +0200 Subject: [PATCH 03/13] Use the k8s script to generate helm resources. Performance boost to the k8s script. --- .github/workflows/create-deploy-resources.yml | 6 +- rest-villains/deploy/helm/knative/Chart.yaml | 4 - .../deploy/helm/knative/templates/NOTES.txt | 72 ------- .../helm/knative/templates/configmap.yaml | 28 --- .../helm/knative/templates/deployment.yaml | 60 ------ .../deploy/helm/knative/templates/secret.yaml | 27 --- .../helm/knative/templates/service.yaml | 76 ------- rest-villains/deploy/helm/knative/values.yaml | 25 --- .../deploy/helm/kubernetes/Chart.yaml | 4 - .../helm/kubernetes/templates/NOTES.txt | 72 ------- .../helm/kubernetes/templates/configmap.yaml | 28 --- .../helm/kubernetes/templates/deployment.yaml | 152 ------------- .../helm/kubernetes/templates/secret.yaml | 27 --- .../helm/kubernetes/templates/service.yaml | 50 ----- .../deploy/helm/kubernetes/values.yaml | 30 --- rest-villains/deploy/helm/minikube/Chart.yaml | 4 - .../deploy/helm/minikube/templates/NOTES.txt | 72 ------- .../helm/minikube/templates/configmap.yaml | 28 --- .../helm/minikube/templates/deployment.yaml | 152 ------------- .../helm/minikube/templates/secret.yaml | 27 --- .../helm/minikube/templates/service.yaml | 51 ----- .../deploy/helm/minikube/values.yaml | 30 --- .../deploy/helm/openshift/Chart.yaml | 4 - .../deploy/helm/openshift/templates/NOTES.txt | 72 ------- .../helm/openshift/templates/configmap.yaml | 28 --- .../helm/openshift/templates/deployment.yaml | 60 ------ .../openshift/templates/deploymentconfig.yaml | 97 --------- .../helm/openshift/templates/imagestream.yaml | 44 ---- .../helm/openshift/templates/route.yaml | 25 --- .../helm/openshift/templates/secret.yaml | 27 --- .../helm/openshift/templates/service.yaml | 51 ----- .../deploy/helm/openshift/values.yaml | 25 --- .../src/main/resources/application.properties | 3 + scripts/generate-helm-charts.sh | 184 ---------------- scripts/generate-k8s-resources.sh | 203 +++++++++++++----- scripts/values-java11.yml | 9 + scripts/values-java17.yml | 9 + scripts/values-native.yml | 9 + 38 files changed, 182 insertions(+), 1693 deletions(-) delete mode 100644 rest-villains/deploy/helm/knative/Chart.yaml delete mode 100644 rest-villains/deploy/helm/knative/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/knative/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/knative/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/knative/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/knative/templates/service.yaml delete mode 100644 rest-villains/deploy/helm/knative/values.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/kubernetes/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/templates/service.yaml delete mode 100644 rest-villains/deploy/helm/kubernetes/values.yaml delete mode 100644 rest-villains/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-villains/deploy/helm/minikube/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/minikube/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/minikube/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/minikube/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/minikube/templates/service.yaml delete mode 100644 rest-villains/deploy/helm/minikube/values.yaml delete mode 100644 rest-villains/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/NOTES.txt delete mode 100644 rest-villains/deploy/helm/openshift/templates/configmap.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/deployment.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/imagestream.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/route.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/secret.yaml delete mode 100644 rest-villains/deploy/helm/openshift/templates/service.yaml delete mode 100644 rest-villains/deploy/helm/openshift/values.yaml delete mode 100755 scripts/generate-helm-charts.sh create mode 100644 scripts/values-java11.yml create mode 100644 scripts/values-java17.yml create mode 100644 scripts/values-native.yml diff --git a/.github/workflows/create-deploy-resources.yml b/.github/workflows/create-deploy-resources.yml index f9cbfe7f4..5f502b623 100644 --- a/.github/workflows/create-deploy-resources.yml +++ b/.github/workflows/create-deploy-resources.yml @@ -48,14 +48,10 @@ jobs: distribution: temurin cache: maven - - name: Create k8s resources + - name: Create k8s resources and helm charts shell: bash run: scripts/generate-k8s-resources.sh - - name: Create helm charts - shell: bash - run: scripts/generate-helm-charts.sh - - name: Create docker-compose resources shell: bash run: scripts/generate-docker-compose-resources.sh diff --git a/rest-villains/deploy/helm/knative/Chart.yaml b/rest-villains/deploy/helm/knative/Chart.yaml deleted file mode 100644 index 155d54e67..000000000 --- a/rest-villains/deploy/helm/knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-native-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/knative/templates/NOTES.txt b/rest-villains/deploy/helm/knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/knative/templates/configmap.yaml b/rest-villains/deploy/helm/knative/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/knative/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/knative/templates/deployment.yaml b/rest-villains/deploy/helm/knative/templates/deployment.yaml deleted file mode 100644 index 58b9683f5..000000000 --- a/rest-villains/deploy/helm/knative/templates/deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/knative/templates/secret.yaml b/rest-villains/deploy/helm/knative/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/knative/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/knative/templates/service.yaml b/rest-villains/deploy/helm/knative/templates/service.yaml deleted file mode 100644 index ab91aa440..000000000 --- a/rest-villains/deploy/helm/knative/templates/service.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:12:27 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - app.openshift.io/runtime: quarkus - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/version: {{ .Values.app.version }} - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - name: rest-villains -spec: - template: - spec: - containers: - - envFrom: - - configMapRef: - name: rest-villains-config - - secretRef: - name: rest-villains-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP diff --git a/rest-villains/deploy/helm/knative/values.yaml b/rest-villains/deploy/helm/knative/values.yaml deleted file mode 100644 index 5ac8faba8..000000000 --- a/rest-villains/deploy/helm/knative/values.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-villains:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" - version: native-latest diff --git a/rest-villains/deploy/helm/kubernetes/Chart.yaml b/rest-villains/deploy/helm/kubernetes/Chart.yaml deleted file mode 100644 index 8063a1c7c..000000000 --- a/rest-villains/deploy/helm/kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-native-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/kubernetes/templates/NOTES.txt b/rest-villains/deploy/helm/kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/kubernetes/templates/configmap.yaml b/rest-villains/deploy/helm/kubernetes/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/kubernetes/templates/deployment.yaml b/rest-villains/deploy/helm/kubernetes/templates/deployment.yaml deleted file mode 100644 index 64bf86460..000000000 --- a/rest-villains/deploy/helm/kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - name: rest-villains -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - template: - metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-villains-config-creds - - configMapRef: - name: rest-villains-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: {{ .Values.app.resources.limits.memory }} - requests: - memory: {{ .Values.app.resources.requests.memory }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/kubernetes/templates/secret.yaml b/rest-villains/deploy/helm/kubernetes/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/kubernetes/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/kubernetes/templates/service.yaml b/rest-villains/deploy/helm/kubernetes/templates/service.yaml deleted file mode 100644 index d89011e32..000000000 --- a/rest-villains/deploy/helm/kubernetes/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:57:22 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/kubernetes/values.yaml b/rest-villains/deploy/helm/kubernetes/values.yaml deleted file mode 100644 index 61eccf931..000000000 --- a/rest-villains/deploy/helm/kubernetes/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: quay.io/quarkus-super-heroes/rest-villains:native-latest - resources: - requests: - memory: 256Mi - limits: - memory: 768Mi - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 - version: native-latest diff --git a/rest-villains/deploy/helm/minikube/Chart.yaml b/rest-villains/deploy/helm/minikube/Chart.yaml deleted file mode 100644 index 73e8280f6..000000000 --- a/rest-villains/deploy/helm/minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-native-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/minikube/templates/NOTES.txt b/rest-villains/deploy/helm/minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/minikube/templates/configmap.yaml b/rest-villains/deploy/helm/minikube/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/minikube/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/minikube/templates/deployment.yaml b/rest-villains/deploy/helm/minikube/templates/deployment.yaml deleted file mode 100644 index 69446dbbe..000000000 --- a/rest-villains/deploy/helm/minikube/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-villains-config - - secretRef: - name: rest-villains-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - resources: - limits: - memory: {{ .Values.app.resources.limits.memory }} - requests: - memory: {{ .Values.app.resources.requests.memory }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/minikube/templates/secret.yaml b/rest-villains/deploy/helm/minikube/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/minikube/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/minikube/templates/service.yaml b/rest-villains/deploy/helm/minikube/templates/service.yaml deleted file mode 100644 index 3727fe50d..000000000 --- a/rest-villains/deploy/helm/minikube/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:03:41 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains -spec: - ports: - - name: http - nodePort: 30526 - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/minikube/values.yaml b/rest-villains/deploy/helm/minikube/values.yaml deleted file mode 100644 index 30e906f98..000000000 --- a/rest-villains/deploy/helm/minikube/values.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: rest-villains:native-latest - resources: - requests: - memory: 256Mi - limits: - memory: 768Mi - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 - version: native-latest diff --git a/rest-villains/deploy/helm/openshift/Chart.yaml b/rest-villains/deploy/helm/openshift/Chart.yaml deleted file mode 100644 index bfca60a76..000000000 --- a/rest-villains/deploy/helm/openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-villains-native-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-villains/deploy/helm/openshift/templates/NOTES.txt b/rest-villains/deploy/helm/openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-villains/deploy/helm/openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-villains/deploy/helm/openshift/templates/configmap.yaml b/rest-villains/deploy/helm/openshift/templates/configmap.yaml deleted file mode 100644 index 67fd7ccf3..000000000 --- a/rest-villains/deploy/helm/openshift/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.jdbc.url: jdbc:otel:postgresql://villains-db:5432/villains_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-villains/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-villains/deploy/helm/openshift/templates/deployment.yaml b/rest-villains/deploy/helm/openshift/templates/deployment.yaml deleted file mode 100644 index 58b9683f5..000000000 --- a/rest-villains/deploy/helm/openshift/templates/deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: villains-service - app.openshift.io/runtime: postgresql - name: villains-db -spec: - replicas: 1 - selector: - matchLabels: - name: villains-db - template: - metadata: - labels: - application: villains-service - name: villains-db - spec: - containers: - - envFrom: - - secretRef: - name: villains-db-config - image: bitnami/postgresql:14 - name: villains-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: villains-db-data - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: villains-db-init - - mountPath: /docker-entrypoint-initdb.d - name: villains-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: villains-db-data - - emptyDir: {} - name: villains-db-init-data - - configMap: - name: villains-db-init - name: villains-db-init diff --git a/rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml b/rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml deleted file mode 100644 index 3490fea94..000000000 --- a/rest-villains/deploy/helm/openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - replicas: 1 - selector: - app.kubernetes.io/version: {{ .Values.app.version }} - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - template: - metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: {{ .Values.app.version }} - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-villains-config-creds - - configMapRef: - name: rest-villains-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-villains - ports: - - containerPort: 8084 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - triggers: - - imageChangeParams: - automatic: true - containerNames: - - rest-villains - from: - kind: ImageStreamTag - name: rest-villains:native-latest - type: ImageChange diff --git a/rest-villains/deploy/helm/openshift/templates/imagestream.yaml b/rest-villains/deploy/helm/openshift/templates/imagestream.yaml deleted file mode 100644 index b16bce4a2..000000000 --- a/rest-villains/deploy/helm/openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: {{ .Values.app.version }} - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/name: rest-villains - name: rest-villains -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-villains:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/rest-villains/deploy/helm/openshift/templates/route.yaml b/rest-villains/deploy/helm/openshift/templates/route.yaml deleted file mode 100644 index ddb69aa5d..000000000 --- a/rest-villains/deploy/helm/openshift/templates/route.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - port: - targetPort: http - to: - kind: Service - name: rest-villains diff --git a/rest-villains/deploy/helm/openshift/templates/secret.yaml b/rest-villains/deploy/helm/openshift/templates/secret.yaml deleted file mode 100644 index b6ad8e319..000000000 --- a/rest-villains/deploy/helm/openshift/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-villains - application: villains-service - system: quarkus-super-heroes - name: rest-villains-config-creds -data: - quarkus.datasource.username: c3VwZXJiYWQ= - quarkus.datasource.password: c3VwZXJiYWQ= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db-config -data: - POSTGRESQL_DATABASE: dmlsbGFpbnNfZGF0YWJhc2U= - POSTGRESQL_USERNAME: c3VwZXJiYWQ= - POSTGRESQL_PASSWORD: c3VwZXJiYWQ= -type: Opaque diff --git a/rest-villains/deploy/helm/openshift/templates/service.yaml b/rest-villains/deploy/helm/openshift/templates/service.yaml deleted file mode 100644 index 386eb8a34..000000000 --- a/rest-villains/deploy/helm/openshift/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: villains-db - application: villains-service - system: quarkus-super-heroes - name: villains-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: villains-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "villains-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:07:52 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8084" - labels: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - app: rest-villains - application: villains-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-villains -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8084 - selector: - app.kubernetes.io/name: rest-villains - app.kubernetes.io/part-of: villains-service - app.kubernetes.io/version: {{ .Values.app.version }} - type: {{ .Values.app.serviceType }} diff --git a/rest-villains/deploy/helm/openshift/values.yaml b/rest-villains/deploy/helm/openshift/values.yaml deleted file mode 100644 index e6314e780..000000000 --- a/rest-villains/deploy/helm/openshift/values.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8084 - image: rest-villains:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8084 - version: native-latest diff --git a/rest-villains/src/main/resources/application.properties b/rest-villains/src/main/resources/application.properties index 6fa2b147c..921947775 100644 --- a/rest-villains/src/main/resources/application.properties +++ b/rest-villains/src/main/resources/application.properties @@ -96,6 +96,9 @@ quarkus.knative.labels.system=${quarkus.kubernetes.labels.system} %minikube.quarkus.kubernetes.deployment-target=minikube # Helm +#%kubernetes.quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory +#%knative.quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory quarkus.helm.values."resources.requests.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory quarkus.helm.values."version".paths=*.labels.'app.kubernetes.io/version',*.selector.'app.kubernetes.io/version',*.matchLabels.'app.kubernetes.io/version' +quarkus.helm.map-system-properties=false diff --git a/scripts/generate-helm-charts.sh b/scripts/generate-helm-charts.sh deleted file mode 100755 index 66b382a2e..000000000 --- a/scripts/generate-helm-charts.sh +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -#-ex - -# Create the deploy/helm files for each java version of each of the Quarkus services -# Then add on the ui-super-heroes - -INPUT_DIR=src/main/kubernetes -OUTPUT_DIR=deploy/helm - -OUTPUT_HELM_DIR=deploy/helm - -create_output_file() { - local output_file=$1 - - if [[ ! -f "$output_file" ]]; then - echo "Creating output file: $output_file" - touch $output_file - fi -} - -do_build() { - local project=$1 - local deployment_type=$2 - local version_tag=$3 - local javaVersion=$4 - local kind=$5 - local container_tag="${version_tag}-latest" - local git_server_url="${GITHUB_SERVER_URL:=https://github.com}" - local git_repo="${GITHUB_REPOSITORY:=quarkusio/quarkus-super-heroes}" - local github_ref_name="${BRANCH:=${GITHUB_REF_NAME:=main}}" - - if [[ "$deployment_type" == "openshift" ]]; then - local expose=true - else - local expose=false - fi - - echo "Generating helm resources for $project/$container_tag/$deployment_type" - rm -rf $project/target - - $project/mvnw -q -f $project/pom.xml versions:set clean package \ - -DskipTests \ - -DnewVersion=$container_tag \ - -Dmaven.compiler.release=$javaVersion \ - -Dquarkus.container-image.tag=$container_tag \ - -Dquarkus.kubernetes.deployment-target=$deployment_type \ - -Dquarkus.kubernetes.version=$container_tag \ - -Dquarkus.kubernetes.ingress.expose=$expose \ - -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ - -Dquarkus.kubernetes.annotations.\"app.quarkus.io/vcs-ref\"=$github_ref_name \ - -Dquarkus.openshift.version=$container_tag \ - -Dquarkus.openshift.route.expose=$expose \ - -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ - -Dquarkus.openshift.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ - -Dquarkus.knative.version=$container_tag \ - -Dquarkus.knative.labels.\"app.openshift.io/runtime\"=quarkus \ - -Dquarkus.knative.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ - -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ - -Dquarkus.helm.version=1.0.0 \ - -Dquarkus.helm.name=$project-$container_tag-$deployment_type -} - -process_quarkus_project() { - local project=$1 - local deployment_type=$2 - local version_tag=$3 - local javaVersion=$4 - local kind=$5 - local container_tag="${version_tag}-latest" - local output_filename="${version_tag}-${deployment_type}" - local app_generated_input_file="$project/target/kubernetes/${deployment_type}.yml" - local project_output_file="$project/$OUTPUT_DIR/${output_filename}.yml" - local all_apps_output_file="$OUTPUT_DIR/${output_filename}.yml" - - local app_generated_helm_chart="$project/target/helm/${deployment_type}/${project}-${container_tag}-${deployment_type}" - local generated_helm_dir="$project/${OUTPUT_HELM_DIR}/${deployment_type}" - - # 1st do the build - # The build will generate all the resources for the project - do_build $project $deployment_type $version_tag $javaVersion $kind - - rm -rf $generated_helm_dir - mkdir -p $generated_helm_dir - - # Now copy the helm files into the deploy directory (deploy/helm) out of the transient target. - if [[ -f "$app_generated_input_file" ]]; then - echo "Copying generated helm chart ($app_generated_helm_chart) to $generated_helm_dir" - - cp -R $app_generated_helm_chart/* $generated_helm_dir - - fi - if [[ "$project" == "rest-fights" ]]; then - echo "Copying rest villain and heroes helm charts to the rest fights one " - mkdir -p "${generated_helm_dir}/charts/rest-villains" - cp -R rest-villains/${OUTPUT_HELM_DIR}/${deployment_type}/* "${generated_helm_dir}/charts/rest-villains" - mkdir -p "${generated_helm_dir}/charts/rest-heroes" - cp -R rest-heroes/${OUTPUT_HELM_DIR}/${deployment_type}/* "${generated_helm_dir}/charts/rest-heroes" - fi -} - -process_ui_project() { - local deployment_type=$1 - local version_tag=$2 - local project="ui-super-heroes" - local project_input_directory="$project/$INPUT_DIR" - local input_file="$project_input_directory/${deployment_type}.yml" - local project_output_file="$project/$OUTPUT_DIR/app-${deployment_type}.yml" - local all_apps_output_file="$OUTPUT_DIR/${version_tag}-${deployment_type}.yml" - - rm -rf $project_output_file - - if [[ -f "$input_file" ]]; then - create_output_file $project_output_file - echo "Copying app input ($input_file) to $project_output_file and $all_apps_output_file" - cat $input_file >> $project_output_file - cat $input_file >> $all_apps_output_file - fi -} - -#create_monitoring() { -# local monitoring_name="monitoring" -# -# echo "" -# echo "-----------------------------------------" -# echo "Creating monitoring" -# -# for deployment_type in "kubernetes" "minikube" "openshift" -# do -# local output_file_name="${monitoring_name}-${deployment_type}.yml" -# local output_file="$OUTPUT_DIR/$output_file_name" -# local input_dir="$monitoring_name/k8s" -# create_output_file $output_file -# -# if [[ -f "$input_dir/base.yml" ]]; then -# echo "Adding base config from $input_dir/base.yml into $output_file" -# cat "$input_dir/base.yml" >> $output_file -# fi -# -# if [[ -f "$input_dir/${deployment_type}.yml" ]]; then -# echo "Adding $deployment_type config from $input_dir/${deployment_type}.yml into $output_file" -# cat "$input_dir/${deployment_type}.yml" >> $output_file -# fi -# done -#} - -#rm -rf $OUTPUT_DIR/*.yml -KINDS_ALL=("" "native-") -PROJECTS_ALL=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") -DEPLOYMENTS_ALL=("kubernetes" "minikube" "openshift" "knative") - -#KINDS_ALL=("") -#PROJECTS_ALL=("rest-villains") -#DEPLOYMENTS_ALL=("kubernetes") - -for kind in "${KINDS_ALL[@]}" -do - if [[ "$kind" == "native-" ]]; then - javaVersions=(17) - else - javaVersions=(11 17) - fi - - for javaVersion in "${javaVersions[@]}" - do - for deployment_type in "${DEPLOYMENTS_ALL[@]}" - do - if [[ "$kind" == "native-" ]]; then - version_tag="native" - else - version_tag="${kind}java${javaVersion}" - fi - - for project in "${PROJECTS_ALL[@]}" - do - process_quarkus_project $project $deployment_type $version_tag $javaVersion $kind - done - -# process_ui_project $deployment_type $version_tag - done - done -done - -## Handle the monitoring -#create_monitoring diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index 6ffe38a8b..f74f845be 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -1,17 +1,21 @@ -#!/bin/bash -ex +#!/bin/bash +#-ex # Create the deploy/k8s files for each java version of each of the Quarkus services # Then add on the ui-super-heroes INPUT_DIR=src/main/kubernetes +OUTPUT_DIR_K8S=deploy/k8s +OUTPUT_DIR_HELM=deploy/helm OUTPUT_DIR=deploy/k8s DEPLOYMENT_TYPES=("kubernetes" "minikube" "openshift" "knative") +PROJECTS_ALL=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") create_output_file() { local output_file=$1 if [[ ! -f "$output_file" ]]; then - echo "Creating output file: $output_file" + # echo "Creating output file: $output_file" touch $output_file fi } @@ -21,12 +25,13 @@ do_build() { local version_tag=$2 local javaVersion=$3 local kind=$4 + local container_tag="${version_tag}-latest" local git_server_url="${GITHUB_SERVER_URL:=https://github.com}" local git_repo="${GITHUB_REPOSITORY:=quarkusio/quarkus-super-heroes}" local github_ref_name="${BRANCH:=${GITHUB_REF_NAME:=main}}" - if [[ "$kind" == "native-" ]]; then + if [[ "$kind" == "native" ]]; then local mem_limit="128Mi" local mem_request="32Mi" else @@ -39,7 +44,7 @@ do_build() { printf -v deployment_types_str '%s,' "${DEPLOYMENT_TYPES[@]}" - $project/mvnw -f $project/pom.xml versions:set clean package \ + $project/mvnw -q -f $project/pom.xml versions:set clean package \ -DskipTests \ -DnewVersion=$container_tag \ -Dmaven.compiler.release=$javaVersion \ @@ -63,47 +68,138 @@ do_build() { -Dquarkus.knative.resources.limits.memory=$mem_limit \ -Dquarkus.knative.resources.requests.memory=$mem_request \ -Dquarkus.knative.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ - -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name + -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ + -Dquarkus.helm.version=1.0.0 \ + -Dquarkus.helm.name=$project + +} + +process_kubernetes_resources(){ + local project=$1 + local version_tag=$2 + + for deployment_type in "${DEPLOYMENT_TYPES[@]}" + do + + local output_filename="${version_tag}-${deployment_type}" + local project_k8s_file="$project/$OUTPUT_DIR_K8S/${output_filename}.yml" + local all_apps_k8s_file="$OUTPUT_DIR_K8S/${output_filename}.yml" + local mvn_k8s_file="$project/target/kubernetes/${deployment_type}.yml" + + mkdir -p $OUTPUT_DIR_K8S + mkdir -p $project/$OUTPUT_DIR_K8S + rm -rf $project_k8s_file + + create_output_file $project_k8s_file + create_output_file $all_apps_k8s_file + + # Now merge the generated resources to the top level (deploy/k8s) + if [[ -f "$mvn_k8s_file" ]]; then + echo "Adding ${deployment_type} resources from ($mvn_k8s_file) to $project_k8s_file and $all_apps_k8s_file" + + cat $mvn_k8s_file >> $project_k8s_file + cat $mvn_k8s_file >> $all_apps_k8s_file + fi + + if [[ "$project" == "rest-fights" ]]; then + # Create a descriptor for all of the downstream services (rest-heroes and rest-villains) + local all_downstream_output_file="$project/$OUTPUT_DIR_K8S/${output_filename}-all-downstream.yml" + local villains_output_file="rest-villains/$OUTPUT_DIR_K8S/${output_filename}.yml" + local heroes_output_file="rest-heroes/$OUTPUT_DIR_K8S/${output_filename}.yml" + + rm -rf $all_downstream_output_file + + create_output_file $all_downstream_output_file + + echo "Adding ${deployment_type} rest-fights resources ${mvn_k8s_file}, ${villains_output_file}, and $heroes_output_file to $all_downstream_output_file" + cat $villains_output_file >> $all_downstream_output_file + cat $heroes_output_file >> $all_downstream_output_file + cat $mvn_k8s_file >> $all_downstream_output_file + fi + + # Order the resources for testing purposes + echo "Sorting kubernetes resources at $project_k8s_file" + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; + + done +} + +process_helm_resources(){ + local project=$1 + local deployment_type=$2 + + local mvn_helm_dir="$project/target/helm/${deployment_type}/$project" + local project_helm_dir="$project/${OUTPUT_DIR_HELM}/${deployment_type}" + local all_apps_helm_dir="${OUTPUT_DIR_HELM}/${deployment_type}" + + # Now copy the helm files into the deploy directory (deploy/helm) out of the transient target. + if [[ -d "$mvn_helm_dir" ]]; then + rm -rf $project_helm_dir + mkdir -p $project_helm_dir + echo "Copying generated helm chart $mvn_helm_dir to $project_helm_dir" + cp -R $mvn_helm_dir/* $project_helm_dir + else + echo "ERROR: The expected location of the maven generated helm chart is not found: $mvn_helm_dir" + exit + fi + + if [[ "$project" == "rest-fights" ]]; then + echo "Copying rest villain and heroes ${deployment_type} helm charts to the rest fights one " + mkdir -p "${project_helm_dir}/charts/rest-villains" + cp -R rest-villains/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-villains" + mkdir -p "${project_helm_dir}/charts/rest-heroes" + cp -R rest-heroes/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-heroes" + fi + + echo "Copying generated helm chart $project_helm_dir to $all_apps_helm_dir" + rm -rf $all_apps_helm_dir + mkdir -p $all_apps_helm_dir + cp -R $project_helm_dir/* $all_apps_helm_dir + + # Execute templates into a k8s-like resources file. + # This is optional, and only enabled for testing purposes + + local project_helm_generated_dir=$project/deploy/helm/generated + mkdir -p $project_helm_generated_dir + for kind in "java11" "java17" "native" + do + local project_helm_generated_file=$project_helm_generated_dir/${kind}-$deployment_type.yml + echo "Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" + helm template $project $project_helm_dir -f scripts/values-${kind}.yml > $project_helm_generated_file || exit + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; + done } process_quarkus_project() { local project=$1 - local deployment_type=$2 - local version_tag=$3 - local javaVersion=$4 - local kind=$5 - local output_filename="${version_tag}-${deployment_type}" - local app_generated_input_file="$project/target/kubernetes/${deployment_type}.yml" - local project_output_file="$project/$OUTPUT_DIR/${output_filename}.yml" - local all_apps_output_file="$OUTPUT_DIR/${output_filename}.yml" - - rm -rf $project_output_file - - create_output_file $project_output_file - create_output_file $all_apps_output_file - - # Now merge the generated resources to the top level (deploy/k8s) - if [[ -f "$app_generated_input_file" ]]; then - echo "Copying app generated input ($app_generated_input_file) to $project_output_file and $all_apps_output_file" - - cat $app_generated_input_file >> $project_output_file - cat $app_generated_input_file >> $all_apps_output_file - fi + local version_tag=$2 + local javaVersion=$3 + local kind=$4 - if [[ "$project" == "rest-fights" ]]; then - # Create a descriptor for all of the downstream services (rest-heroes and rest-villains) - local all_downstream_output_file="$project/$OUTPUT_DIR/${output_filename}-all-downstream.yml" - local villains_output_file="rest-villains/$OUTPUT_DIR/${output_filename}.yml" - local heroes_output_file="rest-heroes/$OUTPUT_DIR/${output_filename}.yml" + # 1st do the build + # The build will generate all the resources for the project + do_build $project $version_tag $javaVersion $kind - rm -rf $all_downstream_output_file + # 2nd copy the generated k8s resources + process_kubernetes_resources $project $version_tag +} + +process_ui_project() { + local deployment_type=$1 + local version_tag=$2 + local project="ui-super-heroes" + local project_input_directory="$project/$INPUT_DIR" + local input_file="$project_input_directory/${deployment_type}.yml" + local project_k8s_file="$project/$OUTPUT_DIR_K8S/app-${deployment_type}.yml" + local all_apps_k8s_file="$OUTPUT_DIR_K8S/${version_tag}-${deployment_type}.yml" - create_output_file $all_downstream_output_file + rm -rf $project_k8s_file - echo "Copying ${app_generated_input_file}, ${villains_output_file}, and $heroes_output_file to $all_downstream_output_file" - cat $villains_output_file >> $all_downstream_output_file - cat $heroes_output_file >> $all_downstream_output_file - cat $app_generated_input_file >> $all_downstream_output_file + if [[ -f "$input_file" ]]; then + create_output_file $project_k8s_file + echo "Adding UI resources at $input_file to $project_k8s_file and $all_apps_k8s_file" + cat $input_file >> $project_k8s_file + cat $input_file >> $all_apps_k8s_file fi } @@ -117,7 +213,7 @@ create_monitoring() { for deployment_type in "kubernetes" "minikube" "openshift" do local output_file_name="${monitoring_name}-${deployment_type}.yml" - local output_file="$OUTPUT_DIR/$output_file_name" + local output_file="$OUTPUT_DIR_K8S/$output_file_name" local input_dir="$monitoring_name/k8s" create_output_file $output_file @@ -133,12 +229,13 @@ create_monitoring() { done } -rm -rf $OUTPUT_DIR/*.yml -for kind in "" "native-" +rm -rf $OUTPUT_DIR_K8S/*.yml + +for kind in "jvm" "native" do # Keeping this if/else here for the future when we might want to build multiple java versions - if [[ "$kind" == "native-" ]]; then + if [[ "$kind" == "native" ]]; then javaVersions=(17) else javaVersions=(17) @@ -147,23 +244,25 @@ do for javaVersion in ${javaVersions[@]} do - if [[ "$kind" == "native-" ]]; then + if [[ "$kind" == "native" ]]; then version_tag="native" else - version_tag="${kind}java${javaVersion}" + version_tag="java${javaVersion}" fi - for project in "rest-villains" "rest-heroes" "rest-fights" "event-statistics" "ui-super-heroes" + for project in "${PROJECTS_ALL[@]}" "ui-super-heroes" + do + process_quarkus_project $project $version_tag $javaVersion $kind + done + done + + for deployment_type in "${DEPLOYMENTS_ALL[@]}" + do + for project in "${PROJECTS_ALL[@]}" do - # Generate all the k8s resources for all deployment types in one shot - do_build $project $version_tag $javaVersion $kind - - for deployment_type in ${DEPLOYMENT_TYPES[@]} - do - # For each deployment type, process the quarkus project - process_quarkus_project $project $deployment_type $version_tag $javaVersion $kind - done + process_helm_resources $project $deployment_type done + process_ui_project $deployment_type $version_tag done done diff --git a/scripts/values-java11.yml b/scripts/values-java11.yml new file mode 100644 index 000000000..bb740314d --- /dev/null +++ b/scripts/values-java11.yml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:java11-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi + version: java11-latest diff --git a/scripts/values-java17.yml b/scripts/values-java17.yml new file mode 100644 index 000000000..c6d2b1ed8 --- /dev/null +++ b/scripts/values-java17.yml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:java17-latest + resources: + requests: + memory: 256Mi + limits: + memory: 768Mi + version: java17-latest diff --git a/scripts/values-native.yml b/scripts/values-native.yml new file mode 100644 index 000000000..15bcd8ef0 --- /dev/null +++ b/scripts/values-native.yml @@ -0,0 +1,9 @@ +--- +app: + image: quay.io/quarkus-super-heroes/rest-villains:native-latest + resources: + requests: + memory: 32Mi + limits: + memory: 128Mi + version: native-latest From e7971235dc9a7b46b729c9126cfb3c4ca69d59ec Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 11:48:07 +0200 Subject: [PATCH 04/13] Bump quarkus-helm to 1.0.5 --- event-statistics/pom.xml | 2 +- rest-fights/pom.xml | 2 +- .../src/main/resources/application.properties | 38 +++++++++++++++ rest-heroes/pom.xml | 2 +- .../src/main/resources/application.yml | 21 +++++++++ rest-villains/pom.xml | 2 +- .../src/main/resources/application.properties | 46 ++++++++++++++++--- 7 files changed, 103 insertions(+), 10 deletions(-) diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index 43eca4f6f..f82948649 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -90,7 +90,7 @@ io.quarkiverse.helm quarkus-helm - 0.2.5 + 1.0.5 io.quarkus diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 5d315af30..7f7c7d051 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -162,7 +162,7 @@ io.quarkiverse.helm quarkus-helm - 0.2.5 + 1.0.5 io.quarkus diff --git a/rest-fights/src/main/resources/application.properties b/rest-fights/src/main/resources/application.properties index 1a256cc33..0cb37cf95 100644 --- a/rest-fights/src/main/resources/application.properties +++ b/rest-fights/src/main/resources/application.properties @@ -122,3 +122,41 @@ quarkus.knative.labels.system=${quarkus.kubernetes.labels.system} %minikube.quarkus.config.profile.parent=prod %minikube.quarkus.kubernetes.deployment-target=minikube %minikube-17.quarkus.config.profile.parent=minikube + +# Helm +## Version labels +quarkus.helm.values."version".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.labels.'app.kubernetes.io/version',\ + (metadata.labels.app == ${quarkus.application.name}).*.selector.'app.kubernetes.io/version',\ + (metadata.labels.app == ${quarkus.application.name}).*.matchLabels.'app.kubernetes.io/version',\ + (kind == Role).metadata.'app.kubernetes.io/version',\ + (kind == RoleBinding).metadata.'app.kubernetes.io/version' + +## Memory limits +quarkus.helm.values."resources.limits.memory".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory +quarkus.helm.values."resources.requests.memory".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory + +# OpenShift ImageStreams +quarkus.helm.expressions.0.path=\ + (kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.0.expression=\ + ${quarkus.application.name}:{{ .Values.app.version }} + +# OpenShift triggers +quarkus.helm.expressions.1.path=\ + (kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.triggers.imageChangeParams.from.name +quarkus.helm.expressions.1.expression=\ + ${quarkus.application.name}:{{ .Values.app.version }} + +# K8S Deployment Image & KNative Service Image +quarkus.helm.expressions.2.path=\ + (kind == Deployment && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.2.expression=\ + ${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }} + +quarkus.helm.expressions.3.path=\ + (kind == Service && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.3.expression=\ + ${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }} diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 4ac570784..180e8e09c 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -103,7 +103,7 @@ io.quarkiverse.helm quarkus-helm - 0.2.5 + 1.0.5 io.quarkus diff --git a/rest-heroes/src/main/resources/application.yml b/rest-heroes/src/main/resources/application.yml index 27891b91f..b5b23b90e 100644 --- a/rest-heroes/src/main/resources/application.yml +++ b/rest-heroes/src/main/resources/application.yml @@ -79,6 +79,27 @@ quarkus: app: "${quarkus.kubernetes.labels.app}" application: "${quarkus.openshift.part-of}" system: "${quarkus.kubernetes.labels.system}" + helm: + values: + "version": + paths: "(metadata.labels.app == ${quarkus.application.name}).*.labels.'app.kubernetes.io/version',(metadata.labels.app == ${quarkus.application.name}).*.selector.'app.kubernetes.io/version',(metadata.labels.app == ${quarkus.application.name}).*.matchLabels.'app.kubernetes.io/version',(kind == Role).metadata.'app.kubernetes.io/version',(kind == RoleBinding).metadata.'app.kubernetes.io/version'" + "resources.requests.memory": + paths: "(metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory" + "resources.limits.memory": + paths: "(metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory" + expressions: + '0': + path: "(kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image" + expression: "${quarkus.application.name}:{{ .Values.app.version }}" + '1': + path: "(kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.triggers.imageChangeParams.from.name" + expression: "${quarkus.application.name}:{{ .Values.app.version }}" + '2': + path: "(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image" + expression: "${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }}" + '3': + path: "(kind == Service && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image" + expression: "${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }}" "%dev": quarkus: diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index ccc01840a..b92565005 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -103,7 +103,7 @@ io.quarkiverse.helm quarkus-helm - 0.2.5 + 1.0.5 io.quarkus diff --git a/rest-villains/src/main/resources/application.properties b/rest-villains/src/main/resources/application.properties index 921947775..8c1af7545 100644 --- a/rest-villains/src/main/resources/application.properties +++ b/rest-villains/src/main/resources/application.properties @@ -96,9 +96,43 @@ quarkus.knative.labels.system=${quarkus.kubernetes.labels.system} %minikube.quarkus.kubernetes.deployment-target=minikube # Helm -#%kubernetes.quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory -#%knative.quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory -quarkus.helm.values."resources.limits.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory -quarkus.helm.values."resources.requests.memory".paths=(kind == Deployment && metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory -quarkus.helm.values."version".paths=*.labels.'app.kubernetes.io/version',*.selector.'app.kubernetes.io/version',*.matchLabels.'app.kubernetes.io/version' -quarkus.helm.map-system-properties=false +## Version labels +quarkus.helm.values."version".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.labels.'app.kubernetes.io/version',\ + (metadata.labels.app == ${quarkus.application.name}).*.selector.'app.kubernetes.io/version',\ + (metadata.labels.app == ${quarkus.application.name}).*.matchLabels.'app.kubernetes.io/version',\ + (kind == Role).metadata.'app.kubernetes.io/version',\ + (kind == RoleBinding).metadata.'app.kubernetes.io/version' + +## Memory limits +quarkus.helm.values."resources.limits.memory".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.resources.limits.memory +quarkus.helm.values."resources.requests.memory".paths=\ + (metadata.labels.app == ${quarkus.application.name}).*.resources.requests.memory + +# OpenShift ImageStreams +quarkus.helm.expressions.0.path=\ + (kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.0.expression=\ + ${quarkus.application.name}:{{ .Values.app.version }} + +# OpenShift triggers +quarkus.helm.expressions.1.path=\ + (kind == DeploymentConfig && metadata.labels.app == ${quarkus.application.name}).spec.triggers.imageChangeParams.from.name +quarkus.helm.expressions.1.expression=\ + ${quarkus.application.name}:{{ .Values.app.version }} + +# K8S Deployment Image & KNative Service Image +quarkus.helm.expressions.2.path=\ + (kind == Deployment && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.2.expression=\ + ${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }} + +quarkus.helm.expressions.3.path=\ + (kind == Service && metadata.labels.app == ${quarkus.application.name}).spec.template.spec.containers.(name == ${quarkus.application.name}).image +quarkus.helm.expressions.3.expression=\ + ${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:{{ .Values.app.version }} + + + + From c6ebdfb0baee04d3ed6bd6c664a442e8e3074220 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 12:26:42 +0200 Subject: [PATCH 05/13] Fix script after rebase --- scripts/generate-k8s-resources.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index f74f845be..fb1856d21 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -7,9 +7,9 @@ INPUT_DIR=src/main/kubernetes OUTPUT_DIR_K8S=deploy/k8s OUTPUT_DIR_HELM=deploy/helm -OUTPUT_DIR=deploy/k8s + DEPLOYMENT_TYPES=("kubernetes" "minikube" "openshift" "knative") -PROJECTS_ALL=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") +PROJECTS=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") create_output_file() { local output_file=$1 @@ -161,7 +161,7 @@ process_helm_resources(){ local project_helm_generated_dir=$project/deploy/helm/generated mkdir -p $project_helm_generated_dir - for kind in "java11" "java17" "native" + for kind in "java17" "native" do local project_helm_generated_file=$project_helm_generated_dir/${kind}-$deployment_type.yml echo "Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" @@ -242,7 +242,7 @@ do # javaVersions=(11 17) fi - for javaVersion in ${javaVersions[@]} + for javaVersion in "${javaVersions[@]}" do if [[ "$kind" == "native" ]]; then version_tag="native" @@ -250,15 +250,15 @@ do version_tag="java${javaVersion}" fi - for project in "${PROJECTS_ALL[@]}" "ui-super-heroes" + for project in "${PROJECTS[@]}" do - process_quarkus_project $project $version_tag $javaVersion $kind + do_build $project $version_tag $javaVersion $kind done done - for deployment_type in "${DEPLOYMENTS_ALL[@]}" + for deployment_type in "${DEPLOYMENT_TYPES[@]}" do - for project in "${PROJECTS_ALL[@]}" + for project in "${PROJECTS[@]}" do process_helm_resources $project $deployment_type done From fe67a5394f87cc98be33d28968f979d27b6544e6 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 14:07:53 +0200 Subject: [PATCH 06/13] Add switch for debug mode. --- .../deploy/helm/knative/Chart.yaml | 4 - .../deploy/helm/knative/templates/NOTES.txt | 72 ------ .../helm/knative/templates/configmap.yaml | 13 - .../helm/knative/templates/deployment.yaml | 112 --------- .../deploy/helm/knative/templates/secret.yaml | 10 - .../helm/knative/templates/service.yaml | 98 -------- .../deploy/helm/knative/values.yaml | 24 -- .../deploy/helm/kubernetes/Chart.yaml | 4 - .../helm/kubernetes/templates/NOTES.txt | 72 ------ .../helm/kubernetes/templates/configmap.yaml | 13 - .../helm/kubernetes/templates/deployment.yaml | 199 --------------- .../helm/kubernetes/templates/secret.yaml | 10 - .../helm/kubernetes/templates/service.yaml | 72 ------ .../deploy/helm/kubernetes/values.yaml | 24 -- .../deploy/helm/minikube/Chart.yaml | 4 - .../deploy/helm/minikube/templates/NOTES.txt | 72 ------ .../helm/minikube/templates/configmap.yaml | 13 - .../helm/minikube/templates/deployment.yaml | 199 --------------- .../helm/minikube/templates/secret.yaml | 10 - .../helm/minikube/templates/service.yaml | 73 ------ .../deploy/helm/minikube/values.yaml | 24 -- .../deploy/helm/openshift/Chart.yaml | 4 - .../deploy/helm/openshift/templates/NOTES.txt | 72 ------ .../helm/openshift/templates/configmap.yaml | 13 - .../helm/openshift/templates/deployment.yaml | 112 --------- .../openshift/templates/deploymentconfig.yaml | 97 -------- .../helm/openshift/templates/imagestream.yaml | 44 ---- .../helm/openshift/templates/route.yaml | 46 ---- .../helm/openshift/templates/secret.yaml | 10 - .../helm/openshift/templates/service.yaml | 73 ------ .../deploy/helm/openshift/values.yaml | 24 -- rest-fights/deploy/helm/knative/Chart.yaml | 4 - .../deploy/helm/knative/templates/NOTES.txt | 72 ------ .../helm/knative/templates/configmap.yaml | 21 -- .../helm/knative/templates/deployment.yaml | 148 ----------- .../helm/knative/templates/rolebinding.yaml | 12 - .../deploy/helm/knative/templates/secret.yaml | 29 --- .../helm/knative/templates/service.yaml | 129 ---------- rest-fights/deploy/helm/knative/values.yaml | 24 -- rest-fights/deploy/helm/kubernetes/Chart.yaml | 4 - .../helm/kubernetes/templates/NOTES.txt | 72 ------ .../helm/kubernetes/templates/configmap.yaml | 21 -- .../helm/kubernetes/templates/deployment.yaml | 235 ------------------ .../kubernetes/templates/rolebinding.yaml | 12 - .../helm/kubernetes/templates/secret.yaml | 29 --- .../helm/kubernetes/templates/service.yaml | 89 ------- .../deploy/helm/kubernetes/values.yaml | 24 -- rest-fights/deploy/helm/minikube/Chart.yaml | 4 - .../deploy/helm/minikube/templates/NOTES.txt | 72 ------ .../helm/minikube/templates/configmap.yaml | 21 -- .../helm/minikube/templates/deployment.yaml | 235 ------------------ .../helm/minikube/templates/rolebinding.yaml | 12 - .../helm/minikube/templates/secret.yaml | 29 --- .../helm/minikube/templates/service.yaml | 90 ------- rest-fights/deploy/helm/minikube/values.yaml | 24 -- rest-fights/deploy/helm/openshift/Chart.yaml | 4 - .../deploy/helm/openshift/templates/NOTES.txt | 72 ------ .../helm/openshift/templates/configmap.yaml | 21 -- .../helm/openshift/templates/deployment.yaml | 148 ----------- .../openshift/templates/deploymentconfig.yaml | 97 -------- .../helm/openshift/templates/imagestream.yaml | 44 ---- .../helm/openshift/templates/rolebinding.yaml | 12 - .../helm/openshift/templates/route.yaml | 46 ---- .../helm/openshift/templates/secret.yaml | 29 --- .../helm/openshift/templates/service.yaml | 90 ------- rest-fights/deploy/helm/openshift/values.yaml | 24 -- rest-heroes/deploy/helm/knative/Chart.yaml | 4 - .../deploy/helm/knative/templates/NOTES.txt | 72 ------ .../helm/knative/templates/configmap.yaml | 28 --- .../helm/knative/templates/deployment.yaml | 61 ----- .../deploy/helm/knative/templates/secret.yaml | 27 -- .../helm/knative/templates/service.yaml | 76 ------ rest-heroes/deploy/helm/knative/values.yaml | 24 -- rest-heroes/deploy/helm/kubernetes/Chart.yaml | 4 - .../helm/kubernetes/templates/NOTES.txt | 72 ------ .../helm/kubernetes/templates/configmap.yaml | 28 --- .../helm/kubernetes/templates/deployment.yaml | 148 ----------- .../helm/kubernetes/templates/secret.yaml | 27 -- .../helm/kubernetes/templates/service.yaml | 50 ---- .../deploy/helm/kubernetes/values.yaml | 24 -- rest-heroes/deploy/helm/minikube/Chart.yaml | 4 - .../deploy/helm/minikube/templates/NOTES.txt | 72 ------ .../helm/minikube/templates/configmap.yaml | 28 --- .../helm/minikube/templates/deployment.yaml | 148 ----------- .../helm/minikube/templates/secret.yaml | 27 -- .../helm/minikube/templates/service.yaml | 51 ---- rest-heroes/deploy/helm/minikube/values.yaml | 24 -- rest-heroes/deploy/helm/openshift/Chart.yaml | 4 - .../deploy/helm/openshift/templates/NOTES.txt | 72 ------ .../helm/openshift/templates/configmap.yaml | 28 --- .../helm/openshift/templates/deployment.yaml | 61 ----- .../openshift/templates/deploymentconfig.yaml | 97 -------- .../helm/openshift/templates/imagestream.yaml | 44 ---- .../helm/openshift/templates/route.yaml | 25 -- .../helm/openshift/templates/secret.yaml | 27 -- .../helm/openshift/templates/service.yaml | 51 ---- rest-heroes/deploy/helm/openshift/values.yaml | 24 -- scripts/generate-k8s-resources.sh | 53 ++-- 98 files changed, 30 insertions(+), 5071 deletions(-) delete mode 100644 event-statistics/deploy/helm/knative/Chart.yaml delete mode 100644 event-statistics/deploy/helm/knative/templates/NOTES.txt delete mode 100644 event-statistics/deploy/helm/knative/templates/configmap.yaml delete mode 100644 event-statistics/deploy/helm/knative/templates/deployment.yaml delete mode 100644 event-statistics/deploy/helm/knative/templates/secret.yaml delete mode 100644 event-statistics/deploy/helm/knative/templates/service.yaml delete mode 100644 event-statistics/deploy/helm/knative/values.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/Chart.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/templates/NOTES.txt delete mode 100644 event-statistics/deploy/helm/kubernetes/templates/configmap.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/templates/deployment.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/templates/secret.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/templates/service.yaml delete mode 100644 event-statistics/deploy/helm/kubernetes/values.yaml delete mode 100644 event-statistics/deploy/helm/minikube/Chart.yaml delete mode 100644 event-statistics/deploy/helm/minikube/templates/NOTES.txt delete mode 100644 event-statistics/deploy/helm/minikube/templates/configmap.yaml delete mode 100644 event-statistics/deploy/helm/minikube/templates/deployment.yaml delete mode 100644 event-statistics/deploy/helm/minikube/templates/secret.yaml delete mode 100644 event-statistics/deploy/helm/minikube/templates/service.yaml delete mode 100644 event-statistics/deploy/helm/minikube/values.yaml delete mode 100644 event-statistics/deploy/helm/openshift/Chart.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/NOTES.txt delete mode 100644 event-statistics/deploy/helm/openshift/templates/configmap.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/deployment.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/imagestream.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/route.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/secret.yaml delete mode 100644 event-statistics/deploy/helm/openshift/templates/service.yaml delete mode 100644 event-statistics/deploy/helm/openshift/values.yaml delete mode 100644 rest-fights/deploy/helm/knative/Chart.yaml delete mode 100644 rest-fights/deploy/helm/knative/templates/NOTES.txt delete mode 100644 rest-fights/deploy/helm/knative/templates/configmap.yaml delete mode 100644 rest-fights/deploy/helm/knative/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/knative/templates/rolebinding.yaml delete mode 100644 rest-fights/deploy/helm/knative/templates/secret.yaml delete mode 100644 rest-fights/deploy/helm/knative/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/knative/values.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/NOTES.txt delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/configmap.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/secret.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/kubernetes/values.yaml delete mode 100644 rest-fights/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-fights/deploy/helm/minikube/templates/NOTES.txt delete mode 100644 rest-fights/deploy/helm/minikube/templates/configmap.yaml delete mode 100644 rest-fights/deploy/helm/minikube/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/minikube/templates/rolebinding.yaml delete mode 100644 rest-fights/deploy/helm/minikube/templates/secret.yaml delete mode 100644 rest-fights/deploy/helm/minikube/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/minikube/values.yaml delete mode 100644 rest-fights/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/NOTES.txt delete mode 100644 rest-fights/deploy/helm/openshift/templates/configmap.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/deployment.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/imagestream.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/rolebinding.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/route.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/secret.yaml delete mode 100644 rest-fights/deploy/helm/openshift/templates/service.yaml delete mode 100644 rest-fights/deploy/helm/openshift/values.yaml delete mode 100644 rest-heroes/deploy/helm/knative/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/knative/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/knative/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/knative/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/knative/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/knative/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/knative/values.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/kubernetes/values.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/minikube/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/minikube/values.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/Chart.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/NOTES.txt delete mode 100644 rest-heroes/deploy/helm/openshift/templates/configmap.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/deployment.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/imagestream.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/route.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/secret.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/templates/service.yaml delete mode 100644 rest-heroes/deploy/helm/openshift/values.yaml diff --git a/event-statistics/deploy/helm/knative/Chart.yaml b/event-statistics/deploy/helm/knative/Chart.yaml deleted file mode 100644 index 72baeedbe..000000000 --- a/event-statistics/deploy/helm/knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-native-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/knative/templates/NOTES.txt b/event-statistics/deploy/helm/knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/event-statistics/deploy/helm/knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/event-statistics/deploy/helm/knative/templates/configmap.yaml b/event-statistics/deploy/helm/knative/templates/configmap.yaml deleted file mode 100644 index a718431f5..000000000 --- a/event-statistics/deploy/helm/knative/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config -data: - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/knative/templates/deployment.yaml b/event-statistics/deploy/helm/knative/templates/deployment.yaml deleted file mode 100644 index 4cea5ba21..000000000 --- a/event-statistics/deploy/helm/knative/templates/deployment.yaml +++ /dev/null @@ -1,112 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - system: quarkus-super-heroes - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/event-statistics/deploy/helm/knative/templates/secret.yaml b/event-statistics/deploy/helm/knative/templates/secret.yaml deleted file mode 100644 index 9e4329d8c..000000000 --- a/event-statistics/deploy/helm/knative/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config-creds -type: Opaque diff --git a/event-statistics/deploy/helm/knative/templates/service.yaml b/event-statistics/deploy/helm/knative/templates/service.yaml deleted file mode 100644 index 64dd00666..000000000 --- a/event-statistics/deploy/helm/knative/templates/service.yaml +++ /dev/null @@ -1,98 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:16:52 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app: event-statistics - app.openshift.io/runtime: quarkus - application: event-stats - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - name: event-statistics -spec: - template: - spec: - containers: - - envFrom: - - configMapRef: - name: event-statistics-config - - secretRef: - name: event-statistics-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: event-statistics - ports: - - containerPort: 8085 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP diff --git a/event-statistics/deploy/helm/knative/values.yaml b/event-statistics/deploy/helm/knative/values.yaml deleted file mode 100644 index b7377f8a2..000000000 --- a/event-statistics/deploy/helm/knative/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: event-statistics:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/event-statistics/deploy/helm/kubernetes/Chart.yaml b/event-statistics/deploy/helm/kubernetes/Chart.yaml deleted file mode 100644 index 90b24a0e7..000000000 --- a/event-statistics/deploy/helm/kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-native-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/kubernetes/templates/NOTES.txt b/event-statistics/deploy/helm/kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/event-statistics/deploy/helm/kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/event-statistics/deploy/helm/kubernetes/templates/configmap.yaml b/event-statistics/deploy/helm/kubernetes/templates/configmap.yaml deleted file mode 100644 index a718431f5..000000000 --- a/event-statistics/deploy/helm/kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config -data: - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/kubernetes/templates/deployment.yaml b/event-statistics/deploy/helm/kubernetes/templates/deployment.yaml deleted file mode 100644 index d824c13a2..000000000 --- a/event-statistics/deploy/helm/kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,199 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - name: event-statistics -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - template: - metadata: - annotations: - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: event-statistics-config - - secretRef: - name: event-statistics-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: event-statistics - ports: - - containerPort: 8085 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - system: quarkus-super-heroes - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/event-statistics/deploy/helm/kubernetes/templates/secret.yaml b/event-statistics/deploy/helm/kubernetes/templates/secret.yaml deleted file mode 100644 index 9e4329d8c..000000000 --- a/event-statistics/deploy/helm/kubernetes/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config-creds -type: Opaque diff --git a/event-statistics/deploy/helm/kubernetes/templates/service.yaml b/event-statistics/deploy/helm/kubernetes/templates/service.yaml deleted file mode 100644 index 7d09790c5..000000000 --- a/event-statistics/deploy/helm/kubernetes/templates/service.yaml +++ /dev/null @@ -1,72 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:02:01 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8085 - selector: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/kubernetes/values.yaml b/event-statistics/deploy/helm/kubernetes/values.yaml deleted file mode 100644 index 58cbe83ca..000000000 --- a/event-statistics/deploy/helm/kubernetes/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8085 - image: quay.io/quarkus-super-heroes/event-statistics:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8085 diff --git a/event-statistics/deploy/helm/minikube/Chart.yaml b/event-statistics/deploy/helm/minikube/Chart.yaml deleted file mode 100644 index e5d6ed6d1..000000000 --- a/event-statistics/deploy/helm/minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-native-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/minikube/templates/NOTES.txt b/event-statistics/deploy/helm/minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/event-statistics/deploy/helm/minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/event-statistics/deploy/helm/minikube/templates/configmap.yaml b/event-statistics/deploy/helm/minikube/templates/configmap.yaml deleted file mode 100644 index a718431f5..000000000 --- a/event-statistics/deploy/helm/minikube/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config -data: - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/minikube/templates/deployment.yaml b/event-statistics/deploy/helm/minikube/templates/deployment.yaml deleted file mode 100644 index dbdd5bc9c..000000000 --- a/event-statistics/deploy/helm/minikube/templates/deployment.yaml +++ /dev/null @@ -1,199 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: event-statistics-config - - secretRef: - name: event-statistics-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: event-statistics - ports: - - containerPort: 8085 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - system: quarkus-super-heroes - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/event-statistics/deploy/helm/minikube/templates/secret.yaml b/event-statistics/deploy/helm/minikube/templates/secret.yaml deleted file mode 100644 index 9e4329d8c..000000000 --- a/event-statistics/deploy/helm/minikube/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config-creds -type: Opaque diff --git a/event-statistics/deploy/helm/minikube/templates/service.yaml b/event-statistics/deploy/helm/minikube/templates/service.yaml deleted file mode 100644 index d0454a898..000000000 --- a/event-statistics/deploy/helm/minikube/templates/service.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:06:50 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics -spec: - ports: - - name: http - nodePort: 30938 - port: 80 - protocol: TCP - targetPort: 8085 - selector: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/minikube/values.yaml b/event-statistics/deploy/helm/minikube/values.yaml deleted file mode 100644 index 87cbe6fdf..000000000 --- a/event-statistics/deploy/helm/minikube/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8085 - image: event-statistics:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8085 diff --git a/event-statistics/deploy/helm/openshift/Chart.yaml b/event-statistics/deploy/helm/openshift/Chart.yaml deleted file mode 100644 index eba7c6649..000000000 --- a/event-statistics/deploy/helm/openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: event-statistics-native-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/event-statistics/deploy/helm/openshift/templates/NOTES.txt b/event-statistics/deploy/helm/openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/event-statistics/deploy/helm/openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/event-statistics/deploy/helm/openshift/templates/configmap.yaml b/event-statistics/deploy/helm/openshift/templates/configmap.yaml deleted file mode 100644 index a718431f5..000000000 --- a/event-statistics/deploy/helm/openshift/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config -data: - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 diff --git a/event-statistics/deploy/helm/openshift/templates/deployment.yaml b/event-statistics/deploy/helm/openshift/templates/deployment.yaml deleted file mode 100644 index 4cea5ba21..000000000 --- a/event-statistics/deploy/helm/openshift/templates/deployment.yaml +++ /dev/null @@ -1,112 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - system: quarkus-super-heroes - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml b/event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml deleted file mode 100644 index 0bbec59bf..000000000 --- a/event-statistics/deploy/helm/openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: event-statistics -spec: - replicas: 1 - selector: - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - template: - metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: event-statistics-config-creds - - configMapRef: - name: event-statistics-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: event-statistics - ports: - - containerPort: 8085 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - triggers: - - imageChangeParams: - automatic: true - containerNames: - - event-statistics - from: - kind: ImageStreamTag - name: event-statistics:native-latest - type: ImageChange diff --git a/event-statistics/deploy/helm/openshift/templates/imagestream.yaml b/event-statistics/deploy/helm/openshift/templates/imagestream.yaml deleted file mode 100644 index 70155399f..000000000 --- a/event-statistics/deploy/helm/openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/version: native-latest - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - name: event-statistics -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/event-statistics:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/event-statistics:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/event-statistics:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/event-statistics/deploy/helm/openshift/templates/route.yaml b/event-statistics/deploy/helm/openshift/templates/route.yaml deleted file mode 100644 index 81bc9ede0..000000000 --- a/event-statistics/deploy/helm/openshift/templates/route.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: apicurio - name: apicurio -spec: - port: - targetPort: 8080 - to: - kind: Service - name: apicurio ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: event-statistics -spec: - port: - targetPort: http - to: - kind: Service - name: event-statistics diff --git a/event-statistics/deploy/helm/openshift/templates/secret.yaml b/event-statistics/deploy/helm/openshift/templates/secret.yaml deleted file mode 100644 index 9e4329d8c..000000000 --- a/event-statistics/deploy/helm/openshift/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: event-statistics - application: event-stats - system: quarkus-super-heroes - name: event-statistics-config-creds -type: Opaque diff --git a/event-statistics/deploy/helm/openshift/templates/service.yaml b/event-statistics/deploy/helm/openshift/templates/service.yaml deleted file mode 100644 index 58f28e23d..000000000 --- a/event-statistics/deploy/helm/openshift/templates/service.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-kafka,apicurio,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:11:08 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8085" - labels: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - app: event-statistics - application: event-stats - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: event-statistics -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8085 - selector: - app.kubernetes.io/name: event-statistics - app.kubernetes.io/part-of: event-stats - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/event-statistics/deploy/helm/openshift/values.yaml b/event-statistics/deploy/helm/openshift/values.yaml deleted file mode 100644 index 58cbe83ca..000000000 --- a/event-statistics/deploy/helm/openshift/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8085 - image: quay.io/quarkus-super-heroes/event-statistics:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8085 diff --git a/rest-fights/deploy/helm/knative/Chart.yaml b/rest-fights/deploy/helm/knative/Chart.yaml deleted file mode 100644 index 6fa8100f1..000000000 --- a/rest-fights/deploy/helm/knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-native-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/knative/templates/NOTES.txt b/rest-fights/deploy/helm/knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-fights/deploy/helm/knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-fights/deploy/helm/knative/templates/configmap.yaml b/rest-fights/deploy/helm/knative/templates/configmap.yaml deleted file mode 100644 index 25d7bd297..000000000 --- a/rest-fights/deploy/helm/knative/templates/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config -data: - quarkus.liquibase-mongodb.migrate-at-start: "false" - quarkus.mongodb.hosts: fights-db:27017 - quarkus.stork.hero-service.service-discovery.type: kubernetes - quarkus.stork.hero-service.service-discovery.application: rest-heroes - quarkus.stork.hero-service.service-discovery.refresh-period: 1M - quarkus.stork.villain-service.service-discovery.type: kubernetes - quarkus.stork.villain-service.service-discovery.application: rest-villains - quarkus.stork.villain-service.service-discovery.refresh-period: 1M - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/knative/templates/deployment.yaml b/rest-fights/deploy/helm/knative/templates/deployment.yaml deleted file mode 100644 index aff3d87ce..000000000 --- a/rest-fights/deploy/helm/knative/templates/deployment.yaml +++ /dev/null @@ -1,148 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: mongodb - name: fights-db -spec: - replicas: 1 - selector: - matchLabels: - name: fights-db - template: - metadata: - labels: - application: fights-service - name: fights-db - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: fights-db-config - image: bitnami/mongodb:5.0 - name: fights-db - ports: - - containerPort: 27017 - resources: - limits: - memory: 256Mi - requests: - memory: 64Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/rest-fights/deploy/helm/knative/templates/rolebinding.yaml b/rest-fights/deploy/helm/knative/templates/rolebinding.yaml deleted file mode 100644 index 65b52a1c7..000000000 --- a/rest-fights/deploy/helm/knative/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: default_view -roleRef: - kind: ClusterRole - apiGroup: rbac.authorization.k8s.io - name: view -subjects: - - kind: ServiceAccount - name: default diff --git a/rest-fights/deploy/helm/knative/templates/secret.yaml b/rest-fights/deploy/helm/knative/templates/secret.yaml deleted file mode 100644 index a7e8ab632..000000000 --- a/rest-fights/deploy/helm/knative/templates/secret.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config-creds -data: - quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== - quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db-config -data: - MONGODB_DATABASE: ZmlnaHRz - MONGODB_USERNAME: c3VwZXJmaWdodA== - MONGODB_PASSWORD: c3VwZXJmaWdodA== - MONGODB_ROOT_USER: c3VwZXI= - MONGODB_ROOT_PASSWORD: c3VwZXI= -type: Opaque diff --git a/rest-fights/deploy/helm/knative/templates/service.yaml b/rest-fights/deploy/helm/knative/templates/service.yaml deleted file mode 100644 index b4ffc13eb..000000000 --- a/rest-fights/deploy/helm/knative/templates/service.yaml +++ /dev/null @@ -1,129 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:15:22 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app: rest-fights - app.openshift.io/runtime: quarkus - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: rest-fights - name: rest-fights -spec: - template: - metadata: - annotations: - autoscaling.knative.dev/minScale: "1" - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - labels: - app: rest-fights - app.openshift.io/runtime: quarkus - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: rest-fights - spec: - containers: - - envFrom: - - configMapRef: - name: rest-fights-config - - secretRef: - name: rest-fights-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-fights - ports: - - containerPort: 8082 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db -spec: - ports: - - port: 27017 - protocol: TCP - targetPort: 27017 - selector: - name: fights-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP diff --git a/rest-fights/deploy/helm/knative/values.yaml b/rest-fights/deploy/helm/knative/values.yaml deleted file mode 100644 index 58aa59b22..000000000 --- a/rest-fights/deploy/helm/knative/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: rest-fights:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-fights/deploy/helm/kubernetes/Chart.yaml b/rest-fights/deploy/helm/kubernetes/Chart.yaml deleted file mode 100644 index 412646747..000000000 --- a/rest-fights/deploy/helm/kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-native-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/kubernetes/templates/NOTES.txt b/rest-fights/deploy/helm/kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-fights/deploy/helm/kubernetes/templates/configmap.yaml b/rest-fights/deploy/helm/kubernetes/templates/configmap.yaml deleted file mode 100644 index 25d7bd297..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config -data: - quarkus.liquibase-mongodb.migrate-at-start: "false" - quarkus.mongodb.hosts: fights-db:27017 - quarkus.stork.hero-service.service-discovery.type: kubernetes - quarkus.stork.hero-service.service-discovery.application: rest-heroes - quarkus.stork.hero-service.service-discovery.refresh-period: 1M - quarkus.stork.villain-service.service-discovery.type: kubernetes - quarkus.stork.villain-service.service-discovery.application: rest-villains - quarkus.stork.villain-service.service-discovery.refresh-period: 1M - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/kubernetes/templates/deployment.yaml b/rest-fights/deploy/helm/kubernetes/templates/deployment.yaml deleted file mode 100644 index 970d4e11d..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,235 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - name: rest-fights -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-fights-config-creds - - configMapRef: - name: rest-fights-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-fights - ports: - - containerPort: 8082 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: mongodb - name: fights-db -spec: - replicas: 1 - selector: - matchLabels: - name: fights-db - template: - metadata: - labels: - application: fights-service - name: fights-db - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: fights-db-config - image: bitnami/mongodb:5.0 - name: fights-db - ports: - - containerPort: 27017 - resources: - limits: - memory: 256Mi - requests: - memory: 64Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml b/rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml deleted file mode 100644 index 65b52a1c7..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: default_view -roleRef: - kind: ClusterRole - apiGroup: rbac.authorization.k8s.io - name: view -subjects: - - kind: ServiceAccount - name: default diff --git a/rest-fights/deploy/helm/kubernetes/templates/secret.yaml b/rest-fights/deploy/helm/kubernetes/templates/secret.yaml deleted file mode 100644 index a7e8ab632..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/secret.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config-creds -data: - quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== - quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db-config -data: - MONGODB_DATABASE: ZmlnaHRz - MONGODB_USERNAME: c3VwZXJmaWdodA== - MONGODB_PASSWORD: c3VwZXJmaWdodA== - MONGODB_ROOT_USER: c3VwZXI= - MONGODB_ROOT_PASSWORD: c3VwZXI= -type: Opaque diff --git a/rest-fights/deploy/helm/kubernetes/templates/service.yaml b/rest-fights/deploy/helm/kubernetes/templates/service.yaml deleted file mode 100644 index 33a2591aa..000000000 --- a/rest-fights/deploy/helm/kubernetes/templates/service.yaml +++ /dev/null @@ -1,89 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db -spec: - ports: - - port: 27017 - protocol: TCP - targetPort: 27017 - selector: - name: fights-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:00:37 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8082 - selector: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/kubernetes/values.yaml b/rest-fights/deploy/helm/kubernetes/values.yaml deleted file mode 100644 index afef629b8..000000000 --- a/rest-fights/deploy/helm/kubernetes/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8082 - image: quay.io/quarkus-super-heroes/rest-fights:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8082 diff --git a/rest-fights/deploy/helm/minikube/Chart.yaml b/rest-fights/deploy/helm/minikube/Chart.yaml deleted file mode 100644 index ffc45ae98..000000000 --- a/rest-fights/deploy/helm/minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-native-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/minikube/templates/NOTES.txt b/rest-fights/deploy/helm/minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-fights/deploy/helm/minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-fights/deploy/helm/minikube/templates/configmap.yaml b/rest-fights/deploy/helm/minikube/templates/configmap.yaml deleted file mode 100644 index 25d7bd297..000000000 --- a/rest-fights/deploy/helm/minikube/templates/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config -data: - quarkus.liquibase-mongodb.migrate-at-start: "false" - quarkus.mongodb.hosts: fights-db:27017 - quarkus.stork.hero-service.service-discovery.type: kubernetes - quarkus.stork.hero-service.service-discovery.application: rest-heroes - quarkus.stork.hero-service.service-discovery.refresh-period: 1M - quarkus.stork.villain-service.service-discovery.type: kubernetes - quarkus.stork.villain-service.service-discovery.application: rest-villains - quarkus.stork.villain-service.service-discovery.refresh-period: 1M - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/minikube/templates/deployment.yaml b/rest-fights/deploy/helm/minikube/templates/deployment.yaml deleted file mode 100644 index 65737b33f..000000000 --- a/rest-fights/deploy/helm/minikube/templates/deployment.yaml +++ /dev/null @@ -1,235 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-fights-config - - secretRef: - name: rest-fights-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-fights - ports: - - containerPort: 8082 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: mongodb - name: fights-db -spec: - replicas: 1 - selector: - matchLabels: - name: fights-db - template: - metadata: - labels: - application: fights-service - name: fights-db - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: fights-db-config - image: bitnami/mongodb:5.0 - name: fights-db - ports: - - containerPort: 27017 - resources: - limits: - memory: 256Mi - requests: - memory: 64Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/rest-fights/deploy/helm/minikube/templates/rolebinding.yaml b/rest-fights/deploy/helm/minikube/templates/rolebinding.yaml deleted file mode 100644 index 65b52a1c7..000000000 --- a/rest-fights/deploy/helm/minikube/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: default_view -roleRef: - kind: ClusterRole - apiGroup: rbac.authorization.k8s.io - name: view -subjects: - - kind: ServiceAccount - name: default diff --git a/rest-fights/deploy/helm/minikube/templates/secret.yaml b/rest-fights/deploy/helm/minikube/templates/secret.yaml deleted file mode 100644 index a7e8ab632..000000000 --- a/rest-fights/deploy/helm/minikube/templates/secret.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config-creds -data: - quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== - quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db-config -data: - MONGODB_DATABASE: ZmlnaHRz - MONGODB_USERNAME: c3VwZXJmaWdodA== - MONGODB_PASSWORD: c3VwZXJmaWdodA== - MONGODB_ROOT_USER: c3VwZXI= - MONGODB_ROOT_PASSWORD: c3VwZXI= -type: Opaque diff --git a/rest-fights/deploy/helm/minikube/templates/service.yaml b/rest-fights/deploy/helm/minikube/templates/service.yaml deleted file mode 100644 index cf09ad05f..000000000 --- a/rest-fights/deploy/helm/minikube/templates/service.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db -spec: - ports: - - port: 27017 - protocol: TCP - targetPort: 27017 - selector: - name: fights-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:05:53 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights -spec: - ports: - - name: http - nodePort: 30489 - port: 80 - protocol: TCP - targetPort: 8082 - selector: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/minikube/values.yaml b/rest-fights/deploy/helm/minikube/values.yaml deleted file mode 100644 index 818b0befc..000000000 --- a/rest-fights/deploy/helm/minikube/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8082 - image: rest-fights:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8082 diff --git a/rest-fights/deploy/helm/openshift/Chart.yaml b/rest-fights/deploy/helm/openshift/Chart.yaml deleted file mode 100644 index 1a4b8d129..000000000 --- a/rest-fights/deploy/helm/openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-fights-native-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-fights/deploy/helm/openshift/templates/NOTES.txt b/rest-fights/deploy/helm/openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-fights/deploy/helm/openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-fights/deploy/helm/openshift/templates/configmap.yaml b/rest-fights/deploy/helm/openshift/templates/configmap.yaml deleted file mode 100644 index 25d7bd297..000000000 --- a/rest-fights/deploy/helm/openshift/templates/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config -data: - quarkus.liquibase-mongodb.migrate-at-start: "false" - quarkus.mongodb.hosts: fights-db:27017 - quarkus.stork.hero-service.service-discovery.type: kubernetes - quarkus.stork.hero-service.service-discovery.application: rest-heroes - quarkus.stork.hero-service.service-discovery.refresh-period: 1M - quarkus.stork.villain-service.service-discovery.type: kubernetes - quarkus.stork.villain-service.service-discovery.application: rest-villains - quarkus.stork.villain-service.service-discovery.refresh-period: 1M - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 - kafka.bootstrap.servers: PLAINTEXT://fights-kafka:9092 - mp.messaging.connector.smallrye-kafka.apicurio.registry.url: http://apicurio:8080/apis/registry/v2 diff --git a/rest-fights/deploy/helm/openshift/templates/deployment.yaml b/rest-fights/deploy/helm/openshift/templates/deployment.yaml deleted file mode 100644 index aff3d87ce..000000000 --- a/rest-fights/deploy/helm/openshift/templates/deployment.yaml +++ /dev/null @@ -1,148 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: mongodb - name: fights-db -spec: - replicas: 1 - selector: - matchLabels: - name: fights-db - template: - metadata: - labels: - application: fights-service - name: fights-db - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: fights-db-config - image: bitnami/mongodb:5.0 - name: fights-db - ports: - - containerPort: 27017 - resources: - limits: - memory: 256Mi - requests: - memory: 64Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: fights-kafka - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.openshift.io/runtime: amq - name: fights-kafka -spec: - replicas: 1 - selector: - matchLabels: - name: fights-kafka - template: - metadata: - labels: - application: fights-service - name: fights-kafka - system: quarkus-super-heroes - spec: - containers: - - command: - - sh - - -c - - "export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && bin/kafka-storage.sh format -t ${CLUSTER_ID} -c config/kraft/server.properties && bin/kafka-server-start.sh config/kraft/server.properties --override advertised.listeners=${KAFKA_ADVERTISED_LISTENERS}" - env: - - name: LOG_DIR - value: /tmp/logs - - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://fights-kafka:9092 - image: quay.io/strimzi/kafka:0.28.0-kafka-3.1.0 - name: fights-kafka - ports: - - containerPort: 9092 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/name: apicurio - app.kubernetes.io/version: 2.2.3.Final - app.openshift.io/runtime: apicurio - name: apicurio -spec: - replicas: 1 - selector: - matchLabels: - name: apicurio - template: - metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - application: fights-service - name: apicurio - system: quarkus-super-heroes - spec: - containers: - - env: - - name: REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED - value: "true" - image: quay.io/apicurio/apicurio-registry-mem:2.2.3.Final - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: apicurio - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - memory: 768Mi - requests: - memory: 128Mi diff --git a/rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml b/rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml deleted file mode 100644 index 373d1e158..000000000 --- a/rest-fights/deploy/helm/openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-fights -spec: - replicas: 1 - selector: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: fights-service - template: - metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: fights-service - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-fights-config-creds - - configMapRef: - name: rest-fights-config - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-fights - ports: - - containerPort: 8082 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - triggers: - - imageChangeParams: - automatic: true - containerNames: - - rest-fights - from: - kind: ImageStreamTag - name: rest-fights:native-latest - type: ImageChange diff --git a/rest-fights/deploy/helm/openshift/templates/imagestream.yaml b/rest-fights/deploy/helm/openshift/templates/imagestream.yaml deleted file mode 100644 index 0d5e10e78..000000000 --- a/rest-fights/deploy/helm/openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/name: rest-fights - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: fights-service - name: rest-fights -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-fights:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-fights:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-fights:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/rest-fights/deploy/helm/openshift/templates/rolebinding.yaml b/rest-fights/deploy/helm/openshift/templates/rolebinding.yaml deleted file mode 100644 index 65b52a1c7..000000000 --- a/rest-fights/deploy/helm/openshift/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: default_view -roleRef: - kind: ClusterRole - apiGroup: rbac.authorization.k8s.io - name: view -subjects: - - kind: ServiceAccount - name: default diff --git a/rest-fights/deploy/helm/openshift/templates/route.yaml b/rest-fights/deploy/helm/openshift/templates/route.yaml deleted file mode 100644 index d3ad9fb00..000000000 --- a/rest-fights/deploy/helm/openshift/templates/route.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: apicurio - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: apicurio - name: apicurio -spec: - port: - targetPort: 8080 - to: - kind: Service - name: apicurio ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-fights -spec: - port: - targetPort: http - to: - kind: Service - name: rest-fights diff --git a/rest-fights/deploy/helm/openshift/templates/secret.yaml b/rest-fights/deploy/helm/openshift/templates/secret.yaml deleted file mode 100644 index a7e8ab632..000000000 --- a/rest-fights/deploy/helm/openshift/templates/secret.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-fights - application: fights-service - system: quarkus-super-heroes - name: rest-fights-config-creds -data: - quarkus.mongodb.credentials.username: c3VwZXJmaWdodA== - quarkus.mongodb.credentials.password: c3VwZXJmaWdodA== -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db-config -data: - MONGODB_DATABASE: ZmlnaHRz - MONGODB_USERNAME: c3VwZXJmaWdodA== - MONGODB_PASSWORD: c3VwZXJmaWdodA== - MONGODB_ROOT_USER: c3VwZXI= - MONGODB_ROOT_PASSWORD: c3VwZXI= -type: Opaque diff --git a/rest-fights/deploy/helm/openshift/templates/service.yaml b/rest-fights/deploy/helm/openshift/templates/service.yaml deleted file mode 100644 index 78a63ac0e..000000000 --- a/rest-fights/deploy/helm/openshift/templates/service.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-db - application: fights-service - system: quarkus-super-heroes - name: fights-db -spec: - ports: - - port: 27017 - protocol: TCP - targetPort: 27017 - selector: - name: fights-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: fights-kafka - application: fights-service - system: quarkus-super-heroes - name: fights-kafka -spec: - ports: - - port: 9092 - protocol: TCP - targetPort: 9092 - selector: - name: fights-kafka - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - name: apicurio - application: fights-service - system: quarkus-super-heroes - name: apicurio -spec: - ports: - - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - name: apicurio - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:10:03 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8082" - labels: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - app: rest-fights - application: fights-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-fights -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8082 - selector: - app.kubernetes.io/name: rest-fights - app.kubernetes.io/part-of: fights-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-fights/deploy/helm/openshift/values.yaml b/rest-fights/deploy/helm/openshift/values.yaml deleted file mode 100644 index 818b0befc..000000000 --- a/rest-fights/deploy/helm/openshift/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8082 - image: rest-fights:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8082 diff --git a/rest-heroes/deploy/helm/knative/Chart.yaml b/rest-heroes/deploy/helm/knative/Chart.yaml deleted file mode 100644 index 970053ef2..000000000 --- a/rest-heroes/deploy/helm/knative/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-native-latest-knative -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/knative/templates/NOTES.txt b/rest-heroes/deploy/helm/knative/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/knative/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/knative/templates/configmap.yaml b/rest-heroes/deploy/helm/knative/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/knative/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/knative/templates/deployment.yaml b/rest-heroes/deploy/helm/knative/templates/deployment.yaml deleted file mode 100644 index ba350577d..000000000 --- a/rest-heroes/deploy/helm/knative/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/knative/templates/secret.yaml b/rest-heroes/deploy/helm/knative/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/knative/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/knative/templates/service.yaml b/rest-heroes/deploy/helm/knative/templates/service.yaml deleted file mode 100644 index 7952afe78..000000000 --- a/rest-heroes/deploy/helm/knative/templates/service.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:13:51 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - app.openshift.io/runtime: quarkus - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/version: native-latest - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - name: rest-heroes -spec: - template: - spec: - containers: - - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http1 - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP diff --git a/rest-heroes/deploy/helm/knative/values.yaml b/rest-heroes/deploy/helm/knative/values.yaml deleted file mode 100644 index 4a714f68e..000000000 --- a/rest-heroes/deploy/helm/knative/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: ":START:{{ .Values.app.livenessProbe.httpGet.port }}:END:" - image: quay.io/quarkus-super-heroes/rest-heroes:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: ":START:{{ .Values.app.readinessProbe.httpGet.port }}:END:" diff --git a/rest-heroes/deploy/helm/kubernetes/Chart.yaml b/rest-heroes/deploy/helm/kubernetes/Chart.yaml deleted file mode 100644 index e27a57beb..000000000 --- a/rest-heroes/deploy/helm/kubernetes/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-native-latest-kubernetes -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt b/rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/kubernetes/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml b/rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/kubernetes/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml b/rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml deleted file mode 100644 index 74f38a4e4..000000000 --- a/rest-heroes/deploy/helm/kubernetes/templates/deployment.yaml +++ /dev/null @@ -1,148 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/version: native-latest - name: rest-heroes -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/version: native-latest - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/kubernetes/templates/secret.yaml b/rest-heroes/deploy/helm/kubernetes/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/kubernetes/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/kubernetes/templates/service.yaml b/rest-heroes/deploy/helm/kubernetes/templates/service.yaml deleted file mode 100644 index be8901567..000000000 --- a/rest-heroes/deploy/helm/kubernetes/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 15:58:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/kubernetes/values.yaml b/rest-heroes/deploy/helm/kubernetes/values.yaml deleted file mode 100644 index ed11cfda1..000000000 --- a/rest-heroes/deploy/helm/kubernetes/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: quay.io/quarkus-super-heroes/rest-heroes:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/rest-heroes/deploy/helm/minikube/Chart.yaml b/rest-heroes/deploy/helm/minikube/Chart.yaml deleted file mode 100644 index b495b7dfa..000000000 --- a/rest-heroes/deploy/helm/minikube/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-native-latest-minikube -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/minikube/templates/NOTES.txt b/rest-heroes/deploy/helm/minikube/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/minikube/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/minikube/templates/configmap.yaml b/rest-heroes/deploy/helm/minikube/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/minikube/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/minikube/templates/deployment.yaml b/rest-heroes/deploy/helm/minikube/templates/deployment.yaml deleted file mode 100644 index b15c83576..000000000 --- a/rest-heroes/deploy/helm/minikube/templates/deployment.yaml +++ /dev/null @@ -1,148 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - secretRef: - name: rest-heroes-config-creds - - configMapRef: - name: rest-heroes-config - image: {{ .Values.app.image }} - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/minikube/templates/secret.yaml b/rest-heroes/deploy/helm/minikube/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/minikube/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/minikube/templates/service.yaml b/rest-heroes/deploy/helm/minikube/templates/service.yaml deleted file mode 100644 index 097aacea9..000000000 --- a/rest-heroes/deploy/helm/minikube/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/vcs-ref: main - app.quarkus.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:04:47 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes -spec: - ports: - - name: http - nodePort: 30471 - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/minikube/values.yaml b/rest-heroes/deploy/helm/minikube/values.yaml deleted file mode 100644 index 78e3b1e36..000000000 --- a/rest-heroes/deploy/helm/minikube/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: rest-heroes:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/rest-heroes/deploy/helm/openshift/Chart.yaml b/rest-heroes/deploy/helm/openshift/Chart.yaml deleted file mode 100644 index d78f790bf..000000000 --- a/rest-heroes/deploy/helm/openshift/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: rest-heroes-native-latest-openshift -version: 1.0.0 -apiVersion: v2 diff --git a/rest-heroes/deploy/helm/openshift/templates/NOTES.txt b/rest-heroes/deploy/helm/openshift/templates/NOTES.txt deleted file mode 100644 index 6eb7772d3..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/NOTES.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Quarkus Helm Notes - -To access the Helm annotations or properties you just need to have the following dependency in your -class path: - - - io.quarkiverse.helm - quarkus-helm - {quarkus-helm-version} - - -Build the project using: - - mvn clean package - -You can find the generated Helm artifacts under: `target/helm/kubernetes//` that should look like: -- Chart.yaml -- values.yaml -- templates/*.yml the generated resources by Quarkus Helm - -**Note**: The `` is set from either the property `quarkus.helm.name` or the `@HelmChart` annotation or the Quarkus application. - -# Requirements - -- Have installed [the Helm command line](https://helm.sh/docs/intro/install/) -- Have connected/logged to a kubernetes cluster -- Configure your Quarkus application to use any of the Quarkus Kubernetes extensions like Quarkus Kubernetes, Quarkus OpenShift or Quarkus Knative. -- Configure your Quarkus application to use any of [the Quarkus Container Image extensions](https://quarkus.io/guides/container-image) - This example uses `container-image-docker`. - -# How can it be used? - -You can run the following Maven command in order to generate the Helm artifacts and build/push the image into a container registry: - -```shell -mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry= -Dquarkus.container-image.group= -``` - -This command will push the image to a container registry and will become available when a pod or container is created. - -Finally, let's use Helm to deploy it into the cluster: - -```shell -helm install helm-example ./target/helm/kubernetes/ -``` - -The above command will deploy a chart using the default values (as defined within the `values.yaml` file). We can override the default values to use your `values.dev.yaml` file by executing the following command: - -```shell -helm install helm-example ./target/helm/kubernetes/ --values ./target/helm//kubernetes/values.dev.yaml -``` - -How can I update my deployment? - -- Via the `upgrade` option of Helm command line: - -After making changes to your project and regenerating the Helm resources and the application container image, then you need to upgrade your deployment: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ -``` - -- Via the `set` option of Helm command line: - -```shell -helm upgrade helm-example ./target/helm/kubernetes/ --set .replicas=1 -``` - -How can we delete my deployment? - -```shell -helm uninstall helm-example -``` diff --git a/rest-heroes/deploy/helm/openshift/templates/configmap.yaml b/rest-heroes/deploy/helm/openshift/templates/configmap.yaml deleted file mode 100644 index b8dd3c89b..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/configmap.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config -data: - quarkus.hibernate-orm.database.generation: validate - quarkus.hibernate-orm.sql-load-script: no-file - quarkus.datasource.reactive.url: postgresql://heroes-db:5432/heroes_database - quarkus.opentelemetry.tracer.exporter.otlp.endpoint: http://otel-collector:4317 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-init -data: - get-data.sh: |- - #!/bin/bash - - curl https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/main/rest-heroes/deploy/db-init/initialize-tables.sql --output /docker-entrypoint-initdb.d/1-init-tables.sql diff --git a/rest-heroes/deploy/helm/openshift/templates/deployment.yaml b/rest-heroes/deploy/helm/openshift/templates/deployment.yaml deleted file mode 100644 index ba350577d..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - app.kubernetes.io/part-of: heroes-service - app.openshift.io/runtime: postgresql - name: heroes-db -spec: - replicas: 1 - selector: - matchLabels: - name: heroes-db - template: - metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - spec: - containers: - - envFrom: - - secretRef: - name: heroes-db-config - image: bitnami/postgresql:14 - name: heroes-db - ports: - - containerPort: 5432 - resources: - limits: - memory: 128Mi - requests: - memory: 32Mi - volumeMounts: - - mountPath: /bitnami/postgresql - name: heroes-db-data - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - initContainers: - - command: - - sh - - get-data.sh - image: registry.access.redhat.com/ubi8-minimal:8.6 - name: get-data - volumeMounts: - - mountPath: /docker-entrypoint-preinitdb.d - name: heroes-db-init - - mountPath: /docker-entrypoint-initdb.d - name: heroes-db-init-data - workingDir: /docker-entrypoint-preinitdb.d - volumes: - - emptyDir: {} - name: heroes-db-data - - emptyDir: {} - name: heroes-db-init-data - - configMap: - name: heroes-db-init - name: heroes-db-init diff --git a/rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml b/rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml deleted file mode 100644 index ea5c62136..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/deploymentconfig.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - replicas: 1 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - template: - metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - envFrom: - - configMapRef: - name: rest-heroes-config - - secretRef: - name: rest-heroes-config-creds - image: {{ .Values.app.image }} - imagePullPolicy: Always - livenessProbe: - failureThreshold: {{ .Values.app.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.livenessProbe.httpGet.path }} - port: {{ .Values.app.livenessProbe.httpGet.port }} - scheme: {{ .Values.app.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.app.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.livenessProbe.timeoutSeconds }} - name: rest-heroes - ports: - - containerPort: 8083 - name: http - protocol: TCP - readinessProbe: - failureThreshold: {{ .Values.app.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.app.readinessProbe.httpGet.path }} - port: {{ .Values.app.readinessProbe.httpGet.port }} - scheme: {{ .Values.app.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.app.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.app.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.app.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.app.readinessProbe.timeoutSeconds }} - triggers: - - imageChangeParams: - automatic: true - containerNames: - - rest-heroes - from: - kind: ImageStreamTag - name: rest-heroes:native-latest - type: ImageChange diff --git a/rest-heroes/deploy/helm/openshift/templates/imagestream.yaml b/rest-heroes/deploy/helm/openshift/templates/imagestream.yaml deleted file mode 100644 index 968e1d316..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/imagestream.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - name: rest-heroes -spec: - lookupPolicy: - local: false - tags: - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:java11-latest - importPolicy: {} - name: java11-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:java17-latest - importPolicy: {} - name: java17-latest - referencePolicy: - type: Source - - from: - kind: DockerImage - name: quay.io/quarkus-super-heroes/rest-heroes:native-latest - importPolicy: {} - name: native-latest - referencePolicy: - type: Source diff --git a/rest-heroes/deploy/helm/openshift/templates/route.yaml b/rest-heroes/deploy/helm/openshift/templates/route.yaml deleted file mode 100644 index f8565188a..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/route.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - port: - targetPort: http - to: - kind: Service - name: rest-heroes diff --git a/rest-heroes/deploy/helm/openshift/templates/secret.yaml b/rest-heroes/deploy/helm/openshift/templates/secret.yaml deleted file mode 100644 index 594569a2e..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/secret.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - name: rest-heroes-config-creds -data: - quarkus.datasource.username: c3VwZXJtYW4= - quarkus.datasource.password: c3VwZXJtYW4= -type: Opaque ---- -apiVersion: v1 -kind: Secret -metadata: - labels: - app: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db-config -data: - POSTGRESQL_DATABASE: aGVyb2VzX2RhdGFiYXNl - POSTGRESQL_USERNAME: c3VwZXJtYW4= - POSTGRESQL_PASSWORD: c3VwZXJtYW4= -type: Opaque diff --git a/rest-heroes/deploy/helm/openshift/templates/service.yaml b/rest-heroes/deploy/helm/openshift/templates/service.yaml deleted file mode 100644 index f6390a387..000000000 --- a/rest-heroes/deploy/helm/openshift/templates/service.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: heroes-db - application: heroes-service - system: quarkus-super-heroes - name: heroes-db -spec: - ports: - - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: heroes-db - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/scheme: http - app.openshift.io/vcs-url: https://github.com/quarkusio/quarkus-super-heroes - app.openshift.io/connects-to: "heroes-db,otel-collector" - app.openshift.io/vcs-ref: main - app.quarkus.io/commit-id: dc5044e4635b639b7165a38a9a97fece36f9427c - app.quarkus.io/build-timestamp: 2023-03-17 - 16:08:54 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8083" - labels: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - app: rest-heroes - application: heroes-service - system: quarkus-super-heroes - app.openshift.io/runtime: quarkus - name: rest-heroes -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 8083 - selector: - app.kubernetes.io/name: rest-heroes - app.kubernetes.io/part-of: heroes-service - app.kubernetes.io/version: native-latest - type: {{ .Values.app.serviceType }} diff --git a/rest-heroes/deploy/helm/openshift/values.yaml b/rest-heroes/deploy/helm/openshift/values.yaml deleted file mode 100644 index 78e3b1e36..000000000 --- a/rest-heroes/deploy/helm/openshift/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -app: - serviceType: ClusterIP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/live - scheme: HTTP - port: 8083 - image: rest-heroes:native-latest - readinessProbe: - failureThreshold: 3 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - initialDelaySeconds: 5 - httpGet: - path: /q/health/ready - scheme: HTTP - port: 8083 diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index fb1856d21..39fa59d2f 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -4,7 +4,6 @@ # Create the deploy/k8s files for each java version of each of the Quarkus services # Then add on the ui-super-heroes -INPUT_DIR=src/main/kubernetes OUTPUT_DIR_K8S=deploy/k8s OUTPUT_DIR_HELM=deploy/helm @@ -80,6 +79,7 @@ process_kubernetes_resources(){ for deployment_type in "${DEPLOYMENT_TYPES[@]}" do + echo "Processing k8s resources for ${project}:${deployment_type}" local output_filename="${version_tag}-${deployment_type}" local project_k8s_file="$project/$OUTPUT_DIR_K8S/${output_filename}.yml" @@ -117,10 +117,12 @@ process_kubernetes_resources(){ cat $mvn_k8s_file >> $all_downstream_output_file fi - # Order the resources for testing purposes - echo "Sorting kubernetes resources at $project_k8s_file" - jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; - + if [ "${DEBUG}" = true ]; then + # Order the resources for testing purposes + echo "DEBUG: Sorting kubernetes resources at $project_k8s_file" + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; + mv -f "${project_k8s_file}.sort" "${project_k8s_file}" + fi done } @@ -143,13 +145,14 @@ process_helm_resources(){ exit fi - if [[ "$project" == "rest-fights" ]]; then - echo "Copying rest villain and heroes ${deployment_type} helm charts to the rest fights one " - mkdir -p "${project_helm_dir}/charts/rest-villains" - cp -R rest-villains/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-villains" - mkdir -p "${project_helm_dir}/charts/rest-heroes" - cp -R rest-heroes/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-heroes" - fi +# TODO: For rest-fights We should generate two different helm charts, one with "all-downstream" resources, and another without. +# if [[ "$project" == "rest-fights" ]]; then +# echo "Copying rest villain and heroes ${deployment_type} helm charts to the rest fights one " +# mkdir -p "${project_helm_dir}/charts/rest-villains" +# cp -R rest-villains/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-villains" +# mkdir -p "${project_helm_dir}/charts/rest-heroes" +# cp -R rest-heroes/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-heroes" +# fi echo "Copying generated helm chart $project_helm_dir to $all_apps_helm_dir" rm -rf $all_apps_helm_dir @@ -158,16 +161,18 @@ process_helm_resources(){ # Execute templates into a k8s-like resources file. # This is optional, and only enabled for testing purposes - - local project_helm_generated_dir=$project/deploy/helm/generated - mkdir -p $project_helm_generated_dir - for kind in "java17" "native" - do - local project_helm_generated_file=$project_helm_generated_dir/${kind}-$deployment_type.yml - echo "Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" - helm template $project $project_helm_dir -f scripts/values-${kind}.yml > $project_helm_generated_file || exit - jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; - done + if [ "${DEBUG}" = true ]; then + local project_helm_generated_dir=$project/deploy/helm/generated + mkdir -p $project_helm_generated_dir + for kind in "java17" "native" + do + local project_helm_generated_file=$project_helm_generated_dir/${kind}-$deployment_type.yml + echo "DEBUG: Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" + helm template $project $project_helm_dir -f scripts/values-${kind}.yml > $project_helm_generated_file || exit + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; + mv -f "${project_helm_generated_file}.sort" "$project_helm_generated_file" + done + fi } process_quarkus_project() { @@ -188,12 +193,14 @@ process_ui_project() { local deployment_type=$1 local version_tag=$2 local project="ui-super-heroes" + local INPUT_DIR="src/main/kubernetes" local project_input_directory="$project/$INPUT_DIR" local input_file="$project_input_directory/${deployment_type}.yml" local project_k8s_file="$project/$OUTPUT_DIR_K8S/app-${deployment_type}.yml" local all_apps_k8s_file="$OUTPUT_DIR_K8S/${version_tag}-${deployment_type}.yml" rm -rf $project_k8s_file + mkdir -p $project/$OUTPUT_DIR_K8S if [[ -f "$input_file" ]]; then create_output_file $project_k8s_file @@ -252,7 +259,7 @@ do for project in "${PROJECTS[@]}" do - do_build $project $version_tag $javaVersion $kind + process_quarkus_project $project $version_tag $javaVersion $kind done done From 539db3cab4779c38bc363639a6c49f558aa07317 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 15:09:06 +0200 Subject: [PATCH 07/13] Revert pom versions --- event-statistics/pom.xml | 2 +- rest-fights/pom.xml | 2 +- rest-heroes/pom.xml | 2 +- rest-villains/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index f82948649..f2d3aa64b 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes event-statistics - native-latest + 1.0 Quarkus Sample :: Super-Heroes :: Statistics Microservice 3.24.2 diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 7f7c7d051..48f1b20cf 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-fights - native-latest + 1.0 Quarkus Sample :: Super-Heroes :: Fights Microservice 3.24.2 diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 180e8e09c..cb4347b2f 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.workshop.super-heroes rest-heroes - native-latest + 1.0 Quarkus Sample :: Super-Heroes :: Heroes Microservice 3.24.2 diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index b92565005..9d5ff3093 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.quarkus.sample.super-heroes rest-villains - native-latest + 1.0 Quarkus Sample :: Super-Heroes :: Villains Microservice 3.24.2 From aae0b95d327e26b177a88654e9fdd5daa440c714 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 15:26:07 +0200 Subject: [PATCH 08/13] Bump quarkus-helm to 1.0.7 --- event-statistics/pom.xml | 2 +- rest-fights/pom.xml | 2 +- rest-heroes/pom.xml | 2 +- rest-villains/pom.xml | 2 +- scripts/values-java11.yml | 9 --------- 5 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 scripts/values-java11.yml diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index f2d3aa64b..f34b4c4eb 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -90,7 +90,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.5 + 1.0.7 io.quarkus diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 48f1b20cf..38e8e9a3a 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -162,7 +162,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.5 + 1.0.7 io.quarkus diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index cb4347b2f..3ddd31f03 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -103,7 +103,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.5 + 1.0.7 io.quarkus diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index 9d5ff3093..7d9bb6677 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -103,7 +103,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.5 + 1.0.7 io.quarkus diff --git a/scripts/values-java11.yml b/scripts/values-java11.yml deleted file mode 100644 index bb740314d..000000000 --- a/scripts/values-java11.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -app: - image: quay.io/quarkus-super-heroes/rest-villains:java11-latest - resources: - requests: - memory: 256Mi - limits: - memory: 768Mi - version: java11-latest From f810dcd1998aeb6495ce68bfc1af6716c640e804 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 19 May 2023 15:37:16 +0200 Subject: [PATCH 09/13] Clean unused values files --- rest-villains/deploy/helm/values-java11.yaml | 9 --------- rest-villains/deploy/helm/values-java17.yaml | 9 --------- rest-villains/deploy/helm/values-native.yaml | 9 --------- 3 files changed, 27 deletions(-) delete mode 100644 rest-villains/deploy/helm/values-java11.yaml delete mode 100644 rest-villains/deploy/helm/values-java17.yaml delete mode 100644 rest-villains/deploy/helm/values-native.yaml diff --git a/rest-villains/deploy/helm/values-java11.yaml b/rest-villains/deploy/helm/values-java11.yaml deleted file mode 100644 index bb740314d..000000000 --- a/rest-villains/deploy/helm/values-java11.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -app: - image: quay.io/quarkus-super-heroes/rest-villains:java11-latest - resources: - requests: - memory: 256Mi - limits: - memory: 768Mi - version: java11-latest diff --git a/rest-villains/deploy/helm/values-java17.yaml b/rest-villains/deploy/helm/values-java17.yaml deleted file mode 100644 index c6d2b1ed8..000000000 --- a/rest-villains/deploy/helm/values-java17.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -app: - image: quay.io/quarkus-super-heroes/rest-villains:java17-latest - resources: - requests: - memory: 256Mi - limits: - memory: 768Mi - version: java17-latest diff --git a/rest-villains/deploy/helm/values-native.yaml b/rest-villains/deploy/helm/values-native.yaml deleted file mode 100644 index 15bcd8ef0..000000000 --- a/rest-villains/deploy/helm/values-native.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -app: - image: quay.io/quarkus-super-heroes/rest-villains:native-latest - resources: - requests: - memory: 32Mi - limits: - memory: 128Mi - version: native-latest From 4a6ac49b11590f02e4af71a358dc9edf45ae3d14 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 26 May 2023 14:02:20 +0200 Subject: [PATCH 10/13] - Dynamically compute version tuples. - Temporary disable copying helm charts to the super-heroes/deploy directory. - Removed unneeded image definition in value files. - Use helm.version property in pom files - Added helm resources to the commit in create-deploy-resources.yml - Reordered base loop for clarity --- .github/workflows/create-deploy-resources.yml | 2 +- event-statistics/pom.xml | 3 +- rest-fights/pom.xml | 3 +- rest-heroes/pom.xml | 3 +- rest-villains/pom.xml | 3 +- scripts/generate-k8s-resources.sh | 108 +++++++++--------- scripts/values-java17.yml | 1 - scripts/values-native.yml | 1 - 8 files changed, 65 insertions(+), 59 deletions(-) diff --git a/.github/workflows/create-deploy-resources.yml b/.github/workflows/create-deploy-resources.yml index 5f502b623..c1a2065d0 100644 --- a/.github/workflows/create-deploy-resources.yml +++ b/.github/workflows/create-deploy-resources.yml @@ -61,6 +61,6 @@ jobs: with: default_author: github_actions message: "Generate deploy resources (from ${{ github.workflow }} run # ${{ github.run_number }})" - add: '["**/deploy/k8s/*.yml", "deploy/k8s/*.yml", "**/deploy/docker-compose/*.yml", "deploy/docker-compose/*.yml", "deploy/db-init/**"]' + add: '["**/deploy/k8s/*.yml", "deploy/k8s/*.yml", "**/deploy/docker-compose/*.yml", "deploy/docker-compose/*.yml", "deploy/db-init/**", "**/deploy/helm/**]' pathspec_error_handling: exitImmediately new_branch: ${{ env.BRANCH }} diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index f34b4c4eb..4f87ed261 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -10,6 +10,7 @@ 3.24.2 4.1.1 3.11.0 + 1.0.7 true 17 UTF-8 @@ -90,7 +91,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.7 + ${helm.version} io.quarkus diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index 38e8e9a3a..dd3ae802d 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -9,6 +9,7 @@ 3.24.2 3.11.0 + 1.0.7 1.5.5.Final true 17 @@ -162,7 +163,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.7 + ${helm.version} io.quarkus diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 3ddd31f03..547f6c733 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -9,6 +9,7 @@ 3.24.2 3.11.0 + 1.0.7 1.5.5.Final 17 1.0.1.Final @@ -103,7 +104,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.7 + ${helm.version} io.quarkus diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index 7d9bb6677..d1ea97180 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -9,6 +9,7 @@ 3.24.2 3.11.0 + 1.0.7 1.5.5.Final 17 1.0.1.Final @@ -103,7 +104,7 @@ io.quarkiverse.helm quarkus-helm - 1.0.7 + ${helm.version} io.quarkus diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index 39fa59d2f..23ba0bf17 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -1,5 +1,4 @@ -#!/bin/bash -#-ex +#!/bin/bash -ex # Create the deploy/k8s files for each java version of each of the Quarkus services # Then add on the ui-super-heroes @@ -9,6 +8,30 @@ OUTPUT_DIR_HELM=deploy/helm DEPLOYMENT_TYPES=("kubernetes" "minikube" "openshift" "knative") PROJECTS=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") +KINDS=("java" "native") + + +JAVA_VERSIONS=(17) +NATIVE_JAVA_VERSION=17 +# Static initialization of version tuples +# Each tuple contains, the kind (java or native), the java version and the version tag. +# Native builds do not use all java versions, but a single one defined in NATIVE_JAVA_VERSION +VERSION_TUPLES=( ) +# We use the chance to create an array with just version tags, so we can reuse it later if needed. +VERSION_TAGS=() +for kind in "${KINDS[@]}" +do + if [[ "$kind" == "native" ]]; then + VERSION_TUPLES+=( "$kind,$NATIVE_JAVA_VERSION,$kind" ) + VERSION_TAGS+=( "$kind" ) + else + for javaVersion in "${JAVA_VERSIONS[@]}" + do + VERSION_TUPLES+=( "$kind,$javaVersion,$kind$javaVersion" ) + VERSION_TAGS+=( "$kind$javaVersion" ) + done + fi +done create_output_file() { local output_file=$1 @@ -38,7 +61,7 @@ do_build() { local mem_request="256Mi" fi - echo "Generating app resources for $project/$container_tag" + echo "Building app resources for $project/$container_tag" rm -rf $project/target printf -v deployment_types_str '%s,' "${DEPLOYMENT_TYPES[@]}" @@ -77,8 +100,6 @@ process_kubernetes_resources(){ local project=$1 local version_tag=$2 - for deployment_type in "${DEPLOYMENT_TYPES[@]}" - do echo "Processing k8s resources for ${project}:${deployment_type}" local output_filename="${version_tag}-${deployment_type}" @@ -123,7 +144,6 @@ process_kubernetes_resources(){ jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; mv -f "${project_k8s_file}.sort" "${project_k8s_file}" fi - done } process_helm_resources(){ @@ -154,41 +174,27 @@ process_helm_resources(){ # cp -R rest-heroes/${OUTPUT_DIR_HELM}/${deployment_type}/* "${project_helm_dir}/charts/rest-heroes" # fi - echo "Copying generated helm chart $project_helm_dir to $all_apps_helm_dir" - rm -rf $all_apps_helm_dir - mkdir -p $all_apps_helm_dir - cp -R $project_helm_dir/* $all_apps_helm_dir +# echo "Copying generated helm chart $project_helm_dir to $all_apps_helm_dir" +# rm -rf $all_apps_helm_dir +# mkdir -p $all_apps_helm_dir +# cp -R $project_helm_dir/* $all_apps_helm_dir # Execute templates into a k8s-like resources file. # This is optional, and only enabled for testing purposes if [ "${DEBUG}" = true ]; then local project_helm_generated_dir=$project/deploy/helm/generated mkdir -p $project_helm_generated_dir - for kind in "java17" "native" + for version_tag in "${VERSION_TAGS[@]}" do - local project_helm_generated_file=$project_helm_generated_dir/${kind}-$deployment_type.yml + local project_helm_generated_file=$project_helm_generated_dir/${version_tag}-$deployment_type.yml echo "DEBUG: Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" - helm template $project $project_helm_dir -f scripts/values-${kind}.yml > $project_helm_generated_file || exit + helm template $project $project_helm_dir -f scripts/values-${version_tag}.yml > $project_helm_generated_file || exit jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; mv -f "${project_helm_generated_file}.sort" "$project_helm_generated_file" done fi } -process_quarkus_project() { - local project=$1 - local version_tag=$2 - local javaVersion=$3 - local kind=$4 - - # 1st do the build - # The build will generate all the resources for the project - do_build $project $version_tag $javaVersion $kind - - # 2nd copy the generated k8s resources - process_kubernetes_resources $project $version_tag -} - process_ui_project() { local deployment_type=$1 local version_tag=$2 @@ -238,37 +244,35 @@ create_monitoring() { rm -rf $OUTPUT_DIR_K8S/*.yml +rm -rf OUTPUT_DIR_HELM/*.yml -for kind in "jvm" "native" +for tag in "${VERSION_TUPLES[@]}" do - # Keeping this if/else here for the future when we might want to build multiple java versions - if [[ "$kind" == "native" ]]; then - javaVersions=(17) - else - javaVersions=(17) -# javaVersions=(11 17) - fi + OLDIFS="$IFS"; IFS=','; set -- $tag; + kind=$1 + javaVersion=$2 + version_tag=$3 + IFS="$OLDIFS" + + for project in "${PROJECTS[@]}" + do + do_build $project $version_tag $javaVersion $kind - for javaVersion in "${javaVersions[@]}" - do - if [[ "$kind" == "native" ]]; then - version_tag="native" - else - version_tag="java${javaVersion}" - fi + done - for project in "${PROJECTS[@]}" - do - process_quarkus_project $project $version_tag $javaVersion $kind - done - done + for deployment_type in "${DEPLOYMENT_TYPES[@]}" + do + for project in "${PROJECTS[@]}" + do + process_kubernetes_resources $project $version_tag - for deployment_type in "${DEPLOYMENT_TYPES[@]}" + process_helm_resources $project $deployment_type + + done + done + + for deployment_type in "${DEPLOYMENT_TYPES[@]}" do - for project in "${PROJECTS[@]}" - do - process_helm_resources $project $deployment_type - done process_ui_project $deployment_type $version_tag done done diff --git a/scripts/values-java17.yml b/scripts/values-java17.yml index c6d2b1ed8..eaf784c29 100644 --- a/scripts/values-java17.yml +++ b/scripts/values-java17.yml @@ -1,6 +1,5 @@ --- app: - image: quay.io/quarkus-super-heroes/rest-villains:java17-latest resources: requests: memory: 256Mi diff --git a/scripts/values-native.yml b/scripts/values-native.yml index 15bcd8ef0..3c0bbe724 100644 --- a/scripts/values-native.yml +++ b/scripts/values-native.yml @@ -1,6 +1,5 @@ --- app: - image: quay.io/quarkus-super-heroes/rest-villains:native-latest resources: requests: memory: 32Mi From aeee7e5829a06c4566a2855250089db58e62f753 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 9 Jun 2023 17:24:00 +0200 Subject: [PATCH 11/13] Fix iteration on tags when appending to super-heroes/deploy/k8s --- scripts/generate-k8s-resources.sh | 164 ++++++++++++++++-------------- 1 file changed, 88 insertions(+), 76 deletions(-) diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index 23ba0bf17..6726e7b0d 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/bin/bash -u +# -ex # Create the deploy/k8s files for each java version of each of the Quarkus services # Then add on the ui-super-heroes @@ -10,25 +11,20 @@ DEPLOYMENT_TYPES=("kubernetes" "minikube" "openshift" "knative") PROJECTS=("rest-villains" "rest-heroes" "rest-fights" "event-statistics") KINDS=("java" "native") - JAVA_VERSIONS=(17) NATIVE_JAVA_VERSION=17 # Static initialization of version tuples # Each tuple contains, the kind (java or native), the java version and the version tag. # Native builds do not use all java versions, but a single one defined in NATIVE_JAVA_VERSION VERSION_TUPLES=( ) -# We use the chance to create an array with just version tags, so we can reuse it later if needed. -VERSION_TAGS=() for kind in "${KINDS[@]}" do if [[ "$kind" == "native" ]]; then VERSION_TUPLES+=( "$kind,$NATIVE_JAVA_VERSION,$kind" ) - VERSION_TAGS+=( "$kind" ) else for javaVersion in "${JAVA_VERSIONS[@]}" do VERSION_TUPLES+=( "$kind,$javaVersion,$kind$javaVersion" ) - VERSION_TAGS+=( "$kind$javaVersion" ) done fi done @@ -61,7 +57,7 @@ do_build() { local mem_request="256Mi" fi - echo "Building app resources for $project/$container_tag" + echo "Building app resources for $project/$version_tag" rm -rf $project/target printf -v deployment_types_str '%s,' "${DEPLOYMENT_TYPES[@]}" @@ -99,56 +95,62 @@ do_build() { process_kubernetes_resources(){ local project=$1 local version_tag=$2 + local deployment_type=$3 - echo "Processing k8s resources for ${project}:${deployment_type}" + echo "Processing k8s resources for ${project}:${deployment_type}" - local output_filename="${version_tag}-${deployment_type}" - local project_k8s_file="$project/$OUTPUT_DIR_K8S/${output_filename}.yml" - local all_apps_k8s_file="$OUTPUT_DIR_K8S/${output_filename}.yml" - local mvn_k8s_file="$project/target/kubernetes/${deployment_type}.yml" + local output_filename="${version_tag}-${deployment_type}" + local project_k8s_file="$project/$OUTPUT_DIR_K8S/${output_filename}.yml" + local all_apps_k8s_file="$OUTPUT_DIR_K8S/${output_filename}.yml" + local mvn_k8s_file="$project/target/kubernetes/${deployment_type}.yml" - mkdir -p $OUTPUT_DIR_K8S - mkdir -p $project/$OUTPUT_DIR_K8S - rm -rf $project_k8s_file + mkdir -p $OUTPUT_DIR_K8S + mkdir -p $project/$OUTPUT_DIR_K8S + rm -rf $project_k8s_file - create_output_file $project_k8s_file - create_output_file $all_apps_k8s_file + create_output_file $project_k8s_file + create_output_file $all_apps_k8s_file - # Now merge the generated resources to the top level (deploy/k8s) - if [[ -f "$mvn_k8s_file" ]]; then - echo "Adding ${deployment_type} resources from ($mvn_k8s_file) to $project_k8s_file and $all_apps_k8s_file" + # Now merge the generated resources to the top level (deploy/k8s) + if [[ -f "$mvn_k8s_file" ]]; then + echo "Adding ${deployment_type} resources from ($mvn_k8s_file) to $project_k8s_file and $all_apps_k8s_file" - cat $mvn_k8s_file >> $project_k8s_file - cat $mvn_k8s_file >> $all_apps_k8s_file - fi + cat $mvn_k8s_file >> $project_k8s_file + cat $mvn_k8s_file >> $all_apps_k8s_file - if [[ "$project" == "rest-fights" ]]; then - # Create a descriptor for all of the downstream services (rest-heroes and rest-villains) - local all_downstream_output_file="$project/$OUTPUT_DIR_K8S/${output_filename}-all-downstream.yml" - local villains_output_file="rest-villains/$OUTPUT_DIR_K8S/${output_filename}.yml" - local heroes_output_file="rest-heroes/$OUTPUT_DIR_K8S/${output_filename}.yml" + else + echo "****** The mvn_k8s_file file does not exit! $mvn_k8s_file ************" + exit 255 + fi - rm -rf $all_downstream_output_file + if [[ "$project" == "rest-fights" ]]; then + # Create a descriptor for all of the downstream services (rest-heroes and rest-villains) + local all_downstream_output_file="$project/$OUTPUT_DIR_K8S/${output_filename}-all-downstream.yml" + local villains_output_file="rest-villains/$OUTPUT_DIR_K8S/${output_filename}.yml" + local heroes_output_file="rest-heroes/$OUTPUT_DIR_K8S/${output_filename}.yml" - create_output_file $all_downstream_output_file + rm -rf $all_downstream_output_file - echo "Adding ${deployment_type} rest-fights resources ${mvn_k8s_file}, ${villains_output_file}, and $heroes_output_file to $all_downstream_output_file" - cat $villains_output_file >> $all_downstream_output_file - cat $heroes_output_file >> $all_downstream_output_file - cat $mvn_k8s_file >> $all_downstream_output_file - fi + create_output_file $all_downstream_output_file - if [ "${DEBUG}" = true ]; then - # Order the resources for testing purposes - echo "DEBUG: Sorting kubernetes resources at $project_k8s_file" - jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; - mv -f "${project_k8s_file}.sort" "${project_k8s_file}" - fi + echo "Adding ${deployment_type} rest-fights resources ${mvn_k8s_file}, ${villains_output_file}, and $heroes_output_file to $all_downstream_output_file" + cat $villains_output_file >> $all_downstream_output_file + cat $heroes_output_file >> $all_downstream_output_file + cat $mvn_k8s_file >> $all_downstream_output_file + fi + + if [ "${DEBUG}" = true ]; then + # Order the resources for testing purposes + echo "DEBUG: Sorting kubernetes resources at $project_k8s_file" + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "${project_k8s_file}" > "${project_k8s_file}.sort"; + mv -f "${project_k8s_file}.sort" "${project_k8s_file}" + fi } process_helm_resources(){ local project=$1 local deployment_type=$2 + local version_tag=$3 local mvn_helm_dir="$project/target/helm/${deployment_type}/$project" local project_helm_dir="$project/${OUTPUT_DIR_HELM}/${deployment_type}" @@ -184,14 +186,11 @@ process_helm_resources(){ if [ "${DEBUG}" = true ]; then local project_helm_generated_dir=$project/deploy/helm/generated mkdir -p $project_helm_generated_dir - for version_tag in "${VERSION_TAGS[@]}" - do - local project_helm_generated_file=$project_helm_generated_dir/${version_tag}-$deployment_type.yml - echo "DEBUG: Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" - helm template $project $project_helm_dir -f scripts/values-${version_tag}.yml > $project_helm_generated_file || exit - jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; - mv -f "${project_helm_generated_file}.sort" "$project_helm_generated_file" - done + local project_helm_generated_file=$project_helm_generated_dir/${version_tag}-$deployment_type.yml + echo "DEBUG: Applying and sorting helm resources for $project_helm_dir to $project_helm_generated_file" + helm template $project $project_helm_dir -f scripts/values-${version_tag}.yml > $project_helm_generated_file || exit + jbang yamlsort@someth2say -yamlpath "kind" -yamlpath "metadata.name" -i "$project_helm_generated_file" > "${project_helm_generated_file}.sort"; + mv -f "${project_helm_generated_file}.sort" "$project_helm_generated_file" fi } @@ -242,40 +241,53 @@ create_monitoring() { done } +main(){ + rm -rf $OUTPUT_DIR_K8S/*.yml + rm -rf OUTPUT_DIR_HELM/*.yml -rm -rf $OUTPUT_DIR_K8S/*.yml -rm -rf OUTPUT_DIR_HELM/*.yml + local tag + local deployment_type + local project + local kind + local javaVersion + local version_tag -for tag in "${VERSION_TUPLES[@]}" -do - OLDIFS="$IFS"; IFS=','; set -- $tag; - kind=$1 - javaVersion=$2 - version_tag=$3 - IFS="$OLDIFS" + echo "${VERSION_TUPLES[@]}" - for project in "${PROJECTS[@]}" - do - do_build $project $version_tag $javaVersion $kind + for tag in "${VERSION_TUPLES[@]}" + do + OLDIFS="$IFS"; IFS=','; set -- $tag; + kind=$1 + javaVersion=$2 + version_tag=$3 + IFS="$OLDIFS" - done + for project in "${PROJECTS[@]}" + do + do_build $project $version_tag $javaVersion $kind - for deployment_type in "${DEPLOYMENT_TYPES[@]}" - do - for project in "${PROJECTS[@]}" - do - process_kubernetes_resources $project $version_tag + done - process_helm_resources $project $deployment_type + for deployment_type in "${DEPLOYMENT_TYPES[@]}" + do + for project in "${PROJECTS[@]}" + do + process_kubernetes_resources $project $version_tag $deployment_type - done - done + process_helm_resources $project $deployment_type $version_tag + + done + done + + for deployment_type in "${DEPLOYMENT_TYPES[@]}" + do + process_ui_project $deployment_type $version_tag + done - for deployment_type in "${DEPLOYMENT_TYPES[@]}" - do - process_ui_project $deployment_type $version_tag done -done -## Handle the monitoring -create_monitoring + ## Handle the monitoring + create_monitoring +} + +main From 9735d8981d774dd774740952281f0455a7dd00e6 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 16 Jun 2023 15:02:24 +0200 Subject: [PATCH 12/13] Add workaround for quarkus-helm setting an incorrect service type in `minukube` --- scripts/generate-k8s-resources.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/scripts/generate-k8s-resources.sh b/scripts/generate-k8s-resources.sh index 6726e7b0d..8806bd70b 100755 --- a/scripts/generate-k8s-resources.sh +++ b/scripts/generate-k8s-resources.sh @@ -1,5 +1,11 @@ -#!/bin/bash -u +#!/bin/bash +# -u # -ex +if [ "${DEBUG}" = true ]; then + set -u +else + set -ex +fi # Create the deploy/k8s files for each java version of each of the Quarkus services # Then add on the ui-super-heroes @@ -88,7 +94,15 @@ do_build() { -Dquarkus.knative.annotations.\"app.openshift.io/vcs-url\"=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY \ -Dquarkus.knative.annotations.\"app.openshift.io/vcs-ref\"=$github_ref_name \ -Dquarkus.helm.version=1.0.0 \ - -Dquarkus.helm.name=$project + -Dquarkus.helm.name=$project \ + -Dquarkus.http.insecure-requests=disabled #Until https://github.com/quarkusio/quarkus/pull/33979 goes live (Quarkus 3.2 and backport) + + + # Bug in Dekorate: https://github.com/dekorateio/dekorate/pull/1217 + # The spec.type in `service.yml` gets wrongly assigned to `ClusterIP`, but for `minikube` it must be `NodePort`. + # K8s generates the right value, but helm gets it wrong. + # Solution is to change the default value programmatically, but only for the `minikube` deployment type. + yq '.app.serviceType="NodePort"' -i $project/target/helm/minikube/$project/values.yaml } @@ -252,7 +266,9 @@ main(){ local javaVersion local version_tag - echo "${VERSION_TUPLES[@]}" + if [ "${DEBUG}" = true ]; then + echo "Kind,Java Version,Tag:" "${VERSION_TUPLES[@]}" + fi for tag in "${VERSION_TUPLES[@]}" do From f4b588328a0be0fd745fbe49a43bc7c10f6a2d65 Mon Sep 17 00:00:00 2001 From: Jordi Sola Date: Fri, 16 Jun 2023 15:03:41 +0200 Subject: [PATCH 13/13] Bump quarkus-helm ot 1.0.8 --- event-statistics/pom.xml | 2 +- rest-fights/pom.xml | 2 +- rest-heroes/pom.xml | 2 +- rest-villains/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/event-statistics/pom.xml b/event-statistics/pom.xml index 4f87ed261..d5a0a2fcf 100644 --- a/event-statistics/pom.xml +++ b/event-statistics/pom.xml @@ -10,7 +10,7 @@ 3.24.2 4.1.1 3.11.0 - 1.0.7 + 1.0.8 true 17 UTF-8 diff --git a/rest-fights/pom.xml b/rest-fights/pom.xml index dd3ae802d..6bfe862ef 100644 --- a/rest-fights/pom.xml +++ b/rest-fights/pom.xml @@ -9,7 +9,7 @@ 3.24.2 3.11.0 - 1.0.7 + 1.0.8 1.5.5.Final true 17 diff --git a/rest-heroes/pom.xml b/rest-heroes/pom.xml index 547f6c733..e188bf997 100644 --- a/rest-heroes/pom.xml +++ b/rest-heroes/pom.xml @@ -9,7 +9,7 @@ 3.24.2 3.11.0 - 1.0.7 + 1.0.8 1.5.5.Final 17 1.0.1.Final diff --git a/rest-villains/pom.xml b/rest-villains/pom.xml index d1ea97180..a064824e4 100644 --- a/rest-villains/pom.xml +++ b/rest-villains/pom.xml @@ -9,7 +9,7 @@ 3.24.2 3.11.0 - 1.0.7 + 1.0.8 1.5.5.Final 17 1.0.1.Final