Skip to content

Commit f5ab958

Browse files
authored
Bugfix/fikser script navn (#409)
* Opprydning i Jetty konfig, fikset loadbalancer * Fikser feil script navn.
1 parent f0db7e9 commit f5ab958

File tree

6 files changed

+15
-49
lines changed

6 files changed

+15
-49
lines changed

.deploy/dev-fss-q0.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ spec:
4848
- mountPath: /var/run/secrets/nais.io/appdynamics
4949
kvPath: /apikey/appdynamics/dev
5050
env:
51-
- name: LOADBALANCER_FQDN
52-
value: fpabakus-q0.nais.preprod.local
51+
- name: LOADBALANCER_URL
52+
value: https://fpabakus-q0.nais.preprod.local
5353
- name: ABAC_PDP_ENDPOINT_URL
5454
value: https://wasapp-q0.adeo.no/asm-pdp/authorize
5555
- name: SECURITYTOKENSERVICE_URL

.deploy/dev-fss-q1.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ spec:
4848
- mountPath: /var/run/secrets/nais.io/appdynamics
4949
kvPath: /apikey/appdynamics/dev
5050
env:
51-
- name: LOADBALANCER_FQDN
52-
value: fpabakus-q1.nais.preprod.local
51+
- name: LOADBALANCER_URL
52+
value: https://fpabakus-q1.nais.preprod.local
5353
- name: ABAC_PDP_ENDPOINT_URL
5454
value: https://wasapp-q1.adeo.no/asm-pdp/authorize
5555
- name: SECURITYTOKENSERVICE_URL

.deploy/dev-fss-t4.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ spec:
4848
- mountPath: /var/run/secrets/nais.io/appdynamics
4949
kvPath: /apikey/appdynamics/dev
5050
env:
51-
- name: LOADBALANCER_FQDN
52-
value: fpabakus-t4.nais.preprod.local
51+
- name: LOADBALANCER_URL
52+
value: https://fpabakus-t4.nais.preprod.local
5353
- name: ABAC_PDP_ENDPOINT_URL
5454
value: https://wasapp-t4.adeo.no/asm-pdp/authorize
5555
- name: SECURITYTOKENSERVICE_URL

.deploy/prod-fss-default.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ spec:
4848
- mountPath: /var/run/secrets/nais.io/appdynamics
4949
kvPath: /apikey/appdynamics/prod
5050
env:
51-
- name: LOADBALANCER_FQDN
52-
value: fpabakus.nais.adeo.no
51+
- name: LOADBALANCER_URL
52+
value: https://fpabakus.nais.adeo.no
5353
- name: ABAC_PDP_ENDPOINT_URL
5454
value: https://wasapp.adeo.no/asm-pdp/authorize
5555
- name: SECURITYTOKENSERVICE_URL
File renamed without changes.

web/src/main/java/no/nav/foreldrepenger/abakus/jetty/JettyServer.java

+7-41
Original file line numberDiff line numberDiff line change
@@ -46,51 +46,18 @@ public JettyServer(int serverPort) {
4646

4747
public static void main(String[] args) throws Exception {
4848
System.setProperty(NAIS_CLUSTER_NAME, ENV.clusterName());
49-
JettyServer jettyServer;
50-
if (args.length > 0) {
51-
int serverPort = Integer.parseUnsignedInt(args[0]);
52-
jettyServer = new JettyServer(serverPort);
53-
} else {
54-
jettyServer = new JettyServer();
55-
}
56-
jettyServer.bootStrap();
57-
}
58-
59-
@Override
60-
protected void konfigurerMiljø() throws Exception {
61-
hacks4Nais();
62-
}
63-
64-
private void hacks4Nais() {
65-
loadBalancerFqdnTilLoadBalancerUrl();
66-
temporært();
49+
jettyServer(args).bootStrap();
6750
}
6851

69-
private void loadBalancerFqdnTilLoadBalancerUrl() {
70-
if (System.getenv("LOADBALANCER_FQDN") != null) {
71-
String loadbalancerFqdn = System.getenv("LOADBALANCER_FQDN");
72-
String protocol = (loadbalancerFqdn.startsWith("localhost")) ? "http" : "https";
73-
System.setProperty("loadbalancer.url", protocol + "://" + loadbalancerFqdn);
52+
private static AbstractJettyServer jettyServer(String[] args) {
53+
if (args.length > 0) {
54+
return new JettyServer(Integer.parseUnsignedInt(args[0]));
7455
}
56+
return new JettyServer();
7557
}
7658

77-
private void temporært() {
78-
// FIXME (u139158): PFP-1176 Skriv om i OpenAmIssoHealthCheck og
79-
// AuthorizationRequestBuilder når Jboss dør
80-
if (System.getenv("OIDC_OPENAM_HOSTURL") != null) {
81-
System.setProperty("OpenIdConnect.issoHost", System.getenv("OIDC_OPENAM_HOSTURL"));
82-
}
83-
// FIXME (u139158): PFP-1176 Skriv om i AuthorizationRequestBuilder og
84-
// IdTokenAndRefreshTokenProvider når Jboss dør
85-
if (System.getenv("OIDC_OPENAM_AGENTNAME") != null) {
86-
System.setProperty("OpenIdConnect.username", System.getenv("OIDC_OPENAM_AGENTNAME"));
87-
}
88-
// FIXME (u139158): PFP-1176 Skriv om i IdTokenAndRefreshTokenProvider når Jboss
89-
// dør
90-
if (System.getenv("OIDC_OPENAM_PASSWORD") != null) {
91-
System.setProperty("OpenIdConnect.password", System.getenv("OIDC_OPENAM_PASSWORD"));
92-
}
93-
}
59+
@Override
60+
protected void konfigurerMiljø() throws Exception {}
9461

9562
@Override
9663
protected void konfigurerJndi() throws Exception {
@@ -145,5 +112,4 @@ protected ResourceCollection createResourceCollection() throws IOException {
145112
return new ResourceCollection(
146113
Resource.newClassPathResource("/web"));
147114
}
148-
149115
}

0 commit comments

Comments
 (0)