From 3a9400d587a30fc5e6b85ce589bc5286205d9053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20P=C3=B8hner?= Date: Thu, 4 Jan 2024 12:10:57 +0100 Subject: [PATCH] =?UTF-8?q?Legger=20til=20config=20for=20dokgen=20p=C3=A5?= =?UTF-8?q?=20gcp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .deploy/naiserator.yaml | 1 + .../selvbetjening/innsending/pdf/PdfGeneratorConfig.java | 9 +++++---- domene/src/main/resources/application-dev.yml | 5 +++-- domene/src/main/resources/application-prod.yml | 2 +- domene/src/main/resources/application-test.yml | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.deploy/naiserator.yaml b/.deploy/naiserator.yaml index 9c747405b..1e3c2b9e8 100644 --- a/.deploy/naiserator.yaml +++ b/.deploy/naiserator.yaml @@ -26,6 +26,7 @@ spec: outbound: rules: - application: fppdfgen + - application: fpdokgen - application: fpoversikt - application: clamav namespace: nais-system diff --git a/domene/src/main/java/no/nav/foreldrepenger/selvbetjening/innsending/pdf/PdfGeneratorConfig.java b/domene/src/main/java/no/nav/foreldrepenger/selvbetjening/innsending/pdf/PdfGeneratorConfig.java index b3de35a43..a01c202ec 100644 --- a/domene/src/main/java/no/nav/foreldrepenger/selvbetjening/innsending/pdf/PdfGeneratorConfig.java +++ b/domene/src/main/java/no/nav/foreldrepenger/selvbetjening/innsending/pdf/PdfGeneratorConfig.java @@ -7,21 +7,22 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.bind.DefaultValue; -@ConfigurationProperties(prefix = "fppdfgen") +@ConfigurationProperties(prefix = "pdfgenerator") public class PdfGeneratorConfig { - - private static final String TILBAKEBETALING_UTTALELSE = "api/v1/genpdf/tilbakebetaling/uttalelse"; private final URI uri; + private final String path; private final boolean enabled; public PdfGeneratorConfig(@DefaultValue("http://fppdfgen") URI uri, + @DefaultValue("api/v1/genpdf/tilbakebetaling/uttalelse") String path, @DefaultValue("true") boolean enabled) { this.uri = uri; + this.path = path; this.enabled = enabled; } URI tilbakebetalingURI() { - return uri(uri, TILBAKEBETALING_UTTALELSE); + return uri(uri, path); } public boolean isEnabled() { diff --git a/domene/src/main/resources/application-dev.yml b/domene/src/main/resources/application-dev.yml index e454a5d89..feff8b464 100644 --- a/domene/src/main/resources/application-dev.yml +++ b/domene/src/main/resources/application-dev.yml @@ -41,8 +41,9 @@ oppslag: uri: https://fpsoknad-mottak.dev-fss-pub.nais.io/api/ mottak: uri: https://fpsoknad-mottak.dev-fss-pub.nais.io/api/ -fppdfgen: - uri: http://fppdfgen +pdfgenerator: + uri: http://fpdokgen + path: template/selvbetjening-tilsvar-tilbakebetalingvarsel/template_en/create-pdf-variation oversikt: uri: http://fpoversikt safselvbetjening: diff --git a/domene/src/main/resources/application-prod.yml b/domene/src/main/resources/application-prod.yml index 9a9938376..23c42f38d 100644 --- a/domene/src/main/resources/application-prod.yml +++ b/domene/src/main/resources/application-prod.yml @@ -30,7 +30,7 @@ oppslag: uri: https://fpsoknad-mottak.prod-fss-pub.nais.io/api/ mottak: uri: https://fpsoknad-mottak.prod-fss-pub.nais.io/api/ -fppdfgen: +pdfgenerator: uri: http://fppdfgen oversikt: uri: http://fpoversikt diff --git a/domene/src/main/resources/application-test.yml b/domene/src/main/resources/application-test.yml index 0b55c00c8..fa0bae9c9 100644 --- a/domene/src/main/resources/application-test.yml +++ b/domene/src/main/resources/application-test.yml @@ -32,7 +32,7 @@ no.nav.security.jwt: virus: enabled: false -fppdfgen: +pdfgenerator: enabled: false mottak: uri: ${fpsoknad-mottak.override.url}