Skip to content

Commit

Permalink
Legger til config for dokgen på gcp (#2638)
Browse files Browse the repository at this point in the history
  • Loading branch information
dijjal authored Jan 4, 2024
1 parent 3df01a3 commit bf9e520
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .deploy/naiserator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
outbound:
rules:
- application: fppdfgen
- application: fpdokgen
- application: fpoversikt
- application: clamav
namespace: nais-system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 3 additions & 2 deletions domene/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion domene/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion domene/src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ no.nav.security.jwt:

virus:
enabled: false
fppdfgen:
pdfgenerator:
enabled: false
mottak:
uri: ${fpsoknad-mottak.override.url}
Expand Down

0 comments on commit bf9e520

Please sign in to comment.