From f024ba6dfb058c952a5a1313b90a052f343600f3 Mon Sep 17 00:00:00 2001 From: Stefan Kapferer Date: Wed, 14 Feb 2024 11:35:39 +0100 Subject: [PATCH] Deployment: setup DEV environment --- .../dev/tla-sample-backend-env-config.yaml | 7 ++++++ .../dev/tla-sample-backend-ingress.yaml | 23 +++++++++++++++++++ src/main/resources/application-dev.properties | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 deployment/k8s/tla-sample-backend/dev/tla-sample-backend-env-config.yaml create mode 100644 deployment/k8s/tla-sample-backend/dev/tla-sample-backend-ingress.yaml create mode 100644 src/main/resources/application-dev.properties diff --git a/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-env-config.yaml b/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-env-config.yaml new file mode 100644 index 0000000..f98ccc6 --- /dev/null +++ b/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-env-config.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: tla-sample-backend-env-config +data: + DEBUG_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044" + JAVA_OPTS: "-Xmx1g -Xms1g -Dspring.profiles.active=dev -DSpring.config.additional-location=file:/srv/web/conf/ -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.io.tmpdir=/srv/web/tmp" diff --git a/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-ingress.yaml b/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-ingress.yaml new file mode 100644 index 0000000..51ef7e8 --- /dev/null +++ b/deployment/k8s/tla-sample-backend/dev/tla-sample-backend-ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: tla-sample-backend-ingress + annotations: + kubernetes.io/ingress.global-static-ip-name: tla-sample-backend-ip +spec: + defaultBackend: + service: + name: tla-sample-backend + port: + number: 8080 + rules: + - host: tla-sample-app.contextmapper.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: tla-sample-backend + port: + number: 8080 diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..bd4207a --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,4 @@ +spring.datasource.url=jdbc:postgresql://tla-sample-db:5432/tla-sample +spring.datasource.username=tla-sample +spring.datasource.driverClassName=org.postgresql.Driver +spring.jpa.hibernate.ddl-auto=validate