Skip to content

Commit

Permalink
- Lagt til oppsett for sykemelding-proxy
Browse files Browse the repository at this point in the history
#deploy-proxy-sykemelding
  • Loading branch information
stigus committed Nov 26, 2024
1 parent 45c4c0f commit a7c8e12
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/proxy.sykemelding-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: "dev-fss"
cluster: "dev-gcp"
working-directory: "proxies/sykemelding-proxy"
deploy-tag: "#deploy-proxy-sykemelding"
permissions:
Expand Down
6 changes: 3 additions & 3 deletions proxies/sykemelding-proxy/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ spec:
cluster: dev-gcp
outbound:
rules:
- application: skjermede-personer
namespace: nom
- application: syfosmregler
namespace: teamsykmelding
liveness:
path: /internal/isAlive
initialDelay: 4
Expand Down Expand Up @@ -79,4 +79,4 @@ spec:
envFrom:
- secret: azure-trygdeetaten-testnav-sykemelding-proxy-trygdeetaten
ingresses:
- "https://testnav-sykemelding-proxy.dev-fss-pub.nais.io"
- "https://testnav-sykemelding-proxy.intern.dev.nav.no"
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

@RestController
public class StatusController {
private static final String TEAM = "Team Org (NOM)";
private static final String TEAM = "Team sykmelding";

@GetMapping(value = "/internal/status", produces = MediaType.APPLICATION_JSON_VALUE)
public Map<String, TestnavStatusResponse> getStatus() {
var statusWebClient = WebClient.builder().build();

var status = checkConsumerStatus(
"http://skjermede-personer.nom.svc.nais.local" + "/internal/isAlive",
"http://skjermede-personer.nom.svc.nais.local" + "/internal/isReady",
"http://syfosmregler.teamsykmelding.svc.cluster.local" + "/internal/isAlive",
"http://syfosmregler.teamsykmelding.svc.cluster.local" + "/internal/isReady",
statusWebClient);

return Map.of(
"skjermede-personer", status
"syfosmregler", status
);
}

Expand Down Expand Up @@ -61,4 +61,4 @@ private Mono<String> checkStatus(WebClient webClient, String url) {
.doOnSuccess(result -> Mono.just("OK"))
.map(result -> result.startsWith("Error:") ? result : "OK");
}
}
}
4 changes: 2 additions & 2 deletions proxies/sykemelding-proxy/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535
spring:
application:
name: testnav-sykemelding-proxy
description: Proxy for sykemelding som legger på sikkerhet.
description: Proxy for sykemelding.
security:
oauth2:
resourceserver:
Expand Down Expand Up @@ -33,5 +33,5 @@ consumers:
sykemelding:
name: syfosmregler
namespace: teamsykmelding
url: https://syfosmregler.intern.dev.nav.no
url: http://syfosmregler.teamsykmelding.svc.cluster.local
cluster: dev-gcp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ class RouteLocatorConfigTest {
@Autowired
private WebTestClient webClient;

@TestConfiguration
static class TestAuthenticationConfig {

@Primary
@Bean
GatewayFilter getNoopAuthenticationFilter() {
return (exchange, chain) -> chain.filter(exchange);

}

}

@Test
void shouldRouteToStub() {

Expand All @@ -53,16 +65,4 @@ void shouldRouteToStub() {

}

@TestConfiguration
static class TestAuthenticationConfig {

@Primary
@Bean
GatewayFilter getNoopAuthenticationFilter() {
return (exchange, chain) -> chain.filter(exchange);

}

}

}

0 comments on commit a7c8e12

Please sign in to comment.