Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K9 abakus initial commit #2514

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 2 additions & 39 deletions .deploy/dev-fss-teamforeldrepenger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"environment": "dev",
"kafkaPool": "nav-dev",
"serviceuserkv": "serviceuser/data/dev/srvfpabakus",
"serviceuserkv": "serviceuser/data/dev/srvk9-abakus",
"minReplicas": "1",
"maxReplicas": "2",
"limits": {
Expand All @@ -12,33 +12,12 @@
"cpu": "200m",
"mem": "1024Mi"
},
"ingresses": [
"https://fpabakus.dev-fss-pub.nais.io"
],
"env": {
"APPD_ENABLED": "false"
},
"groups": [
"27e77109-fef2-48ce-a174-269074490353",
"8cddda87-0a22-4d35-9186-a2c32a6ab450",
"93e8903d-5c3f-4cbe-929e-0afeb22dec73",
"5bc5cae2-3ef9-4897-9828-766757299de8",
"5a7b4d5e-f80b-451c-aae2-2ab1c90f039d"
"0bc9661c-975c-4adb-86d1-a97172490662"
],
"AZURE_IAC_RULES": [
{
"app": "fp-swagger",
"namespace": "teamforeldrepenger",
"cluster": "dev-gcp",
"scopes": [
"swagger"
]
},
{
"app": "fpsak",
"namespace": "teamforeldrepenger",
"cluster": "dev-fss"
},
{
"app": "k9-sak",
"namespace": "k9saksbehandling",
Expand All @@ -53,22 +32,6 @@
"app": "k9-formidling",
"namespace": "k9saksbehandling",
"cluster": "dev-fss"
},
{
"app": "tiltakspenger-fp",
"namespace": "tpts",
"cluster": "dev-fss",
"roles": [
"ekstern"
]
},
{
"app": "sparkel-sputnik",
"namespace": "tbd",
"cluster": "dev-gcp",
"roles": [
"ekstern"
]
}
]
}
14 changes: 7 additions & 7 deletions .deploy/naiserator.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
kind: Application
apiVersion: nais.io/v1alpha1
metadata:
name: fpabakus
namespace: teamforeldrepenger
name: k9-abakus
namespace: k9saksbehandling
labels:
team: teamforeldrepenger
team: k9saksbehandling
spec:
image: {{image}}
port: 8080
Expand All @@ -13,23 +13,23 @@ spec:
- {{url}}
{{/each}}
liveness:
path: /fpabakus/internal/health/isAlive
path: /k9/abakus/internal/health/isAlive
initialDelay: 10
periodSeconds: 10
failureThreshold: 20
timeout: 3
readiness:
path: /fpabakus/internal/health/isReady
path: /k9/abakus/internal/health/isReady
initialDelay: 10
periodSeconds: 10
failureThreshold: 20
timeout: 3
preStopHook:
http:
path: /fpabakus/internal/health/preStop
path: /k9/abakus/internal/health/preStop
prometheus:
enabled: true
path: /fpabakus/internal/metrics/prometheus
path: /k9/abakus/internal/metrics/prometheus
replicas:
min: {{minReplicas}}
max: {{maxReplicas}}
Expand Down
41 changes: 2 additions & 39 deletions .deploy/prod-fss-teamforeldrepenger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"environment": "prod",
"kafkaPool": "nav-prod",
"serviceuserkv": "serviceuser/data/prod/srvfpabakus",
"serviceuserkv": "serviceuser/data/prod/srvk9-abakus",
"minReplicas": "2",
"maxReplicas": "6",
"limits": {
Expand All @@ -12,33 +12,12 @@
"cpu": "500m",
"mem": "1024Mi"
},
"ingresses": [
"https://fpabakus.prod-fss-pub.nais.io"
],
"env": {
"APPD_ENABLED": "true"
},
"groups": [
"73107205-17ec-4a07-a56e-e0a8542f90c9",
"77f05833-ebfd-45fb-8be7-88eca8e7418f",
"466d0df7-22ba-4c68-b848-73478cfd0486",
"be11a922-59a2-4afa-b5ad-b9e9bd445268",
"04b22158-354a-483f-a836-cf19b17ba5c3"
"1509dc91-a955-4e72-b64c-2f049e37c0c6"
],
"AZURE_IAC_RULES": [
{
"app": "fp-swagger",
"namespace": "teamforeldrepenger",
"cluster": "prod-gcp",
"scopes": [
"swagger"
]
},
{
"app": "fpsak",
"namespace": "teamforeldrepenger",
"cluster": "prod-fss"
},
{
"app": "k9-sak",
"namespace": "k9saksbehandling",
Expand All @@ -53,22 +32,6 @@
"app": "k9-formidling",
"namespace": "k9saksbehandling",
"cluster": "prod-fss"
},
{
"app": "tiltakspenger-fp",
"namespace": "tpts",
"cluster": "prod-fss",
"roles": [
"ekstern"
]
},
{
"app": "sparkel-sputnik",
"namespace": "tbd",
"cluster": "prod-gcp",
"roles": [
"ekstern"
]
}
]
}
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @navikt/teamforeldrepenger @navikt/k9saksbehandling
* @navikt/k9saksbehandling
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class PdpRequestBuilderImpl implements PdpRequestBuilder {

private static final Cluster CLUSTER = Environment.current().getCluster();
private static final String ABAC_DOMAIN = "duplo";
private static final String ABAC_DOMAIN = "k9";
private static final List<String> INTERNAL_CLUSTER_NAMESPACE = List.of(CLUSTER.clusterName() + ":k9saksbehandling",
CLUSTER.clusterName() + ":teamforeldrepenger");

Expand Down
20 changes: 10 additions & 10 deletions lokalutvikling/postgres-init/fpabakus.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE DATABASE fpabakus_unit;
CREATE USER fpabakus_unit WITH PASSWORD 'fpabakus_unit';
GRANT ALL ON DATABASE fpabakus_unit TO fpabakus_unit;
ALTER DATABASE fpabakus_unit SET timezone TO 'Europe/Oslo';
ALTER DATABASE fpabakus_unit OWNER TO fpabakus_unit;
CREATE DATABASE k9_abakus_unit;
CREATE USER k9_abakus_unit WITH PASSWORD 'k9_abakus_unit';
GRANT ALL ON DATABASE k9_abakus_unit TO k9abakus_unit;
ALTER DATABASE k9_abakus_unit SET timezone TO 'Europe/Oslo';
ALTER DATABASE k9_abakus_unit OWNER TO k9_abakus_unit;

CREATE DATABASE fpabakus;
CREATE USER fpabakus WITH PASSWORD 'fpabakus';
GRANT ALL ON DATABASE fpabakus TO fpabakus;
ALTER DATABASE fpabakus SET timezone TO 'Europe/Oslo';
ALTER DATABASE fpabakus OWNER TO fpabakus;
CREATE DATABASE k9_abakus;
CREATE USER k9_abakus WITH PASSWORD 'k9_abakus';
GRANT ALL ON DATABASE k9_abakus TO k9_abakus;
ALTER DATABASE k9_abakus SET timezone TO 'Europe/Oslo';
ALTER DATABASE k9_abakus OWNER TO k9_abakus;
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ApiConfig() {
OpenAPI oas = new OpenAPI();
Info info = new Info().title("Vedtaksløsningen - Abakus").version("1.0").description("REST grensesnitt for Vedtaksløsningen.");

oas.info(info).addServersItem(new Server().url(ENV.getProperty("context.path", "/fpabakus")));
oas.info(info).addServersItem(new Server().url(ENV.getProperty("context.path", "/k9/abakus")));
var oasConfig = new SwaggerConfiguration().id(ID_PREFIX + ApiConfig.class.getName())
.openAPI(oas)
.prettyPrint(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public EksternApiConfig() {
.version("1.0")
.description("Ekstern REST grensesnitt for Abakus. Alle kall må authentiseres med en gyldig Azure OBO eller CC token.");

oas.info(info).addServersItem(new Server().url(ENV.getProperty("context.path", "/fpabakus")));
oas.info(info).addServersItem(new Server().url(ENV.getProperty("context.path", "/k9/abakus")));
var oasConfig = new SwaggerConfiguration().id(ID_PREFIX + EksternApiConfig.class.getName())
.openAPI(oas)
.prettyPrint(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class JettyServer {
private static final Environment ENV = Environment.current();
private static final Logger LOG = LoggerFactory.getLogger(JettyServer.class);

private static final String CONTEXT_PATH = ENV.getProperty("context.path", "/fpabakus");
private static final String CONTEXT_PATH = ENV.getProperty("context.path", "/k9/abakus");
private static final String JETTY_SCAN_LOCATIONS = "^.*jersey-.*\\.jar$|^.*felles-.*\\.jar$|^.*/app\\.jar$";
private static final String JETTY_LOCAL_CLASSES = "^.*/target/classes/|";
private final Integer serverPort;
Expand Down
14 changes: 7 additions & 7 deletions web/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jetty
server.port=8080
context.path=/fpabakus
application.name=fpabakus
context.path=/k9/abakus
application.name=k9-abakus

azure.http.proxy=http://webproxy.nais:8088

Expand All @@ -11,12 +11,12 @@ azure.http.proxy=http://webproxy.nais:8088

# Auditlogger
auditlogger.enabled=true
auditlogger.vendor=Foreldrepenger
auditlogger.product=fpabakus
auditlogger.vendor=k9
auditlogger.product=k9-abakus

#ABAC
abac.pdp.endpoint.url=http://abac-duplo/application/authorize
abac.attributt.drift=no.nav.abac.attributter.resource.duplo.abakus.drift
abac.pdp.endpoint.url=http://abac-k9/application/authorize
abac.attributt.drift=no.nav.abac.attributter.k9.drift

#Kafka (Aiven)
kafka.fattevedtak.topic=teamforeldrepenger.familie-vedtakfattet-v1
Expand All @@ -27,7 +27,7 @@ fpabakus.it.sp.grunnlag.url=http://infotrygd-sykepenger-fp.infotrygd/grunnlag

# PDL
pdl.base.url=http://pdl-api.pdl/graphql
pdl.tema=FOR
pdl.tema=OMS

# Database
#defaultDS.username=<kommer.fra.vault>
Expand Down
2 changes: 1 addition & 1 deletion web/src/test/resources/application-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ fpabakus.it.ps.scopes=testscope
organisasjon.rs.url=https://localhost:8063/rest/ereg/api/v1/organisasjon

# Database
defaultDS.username=fpabakus
defaultDS.username=k9-abakus
defaultDS.url=jdbc:postgresql://localhost:5432/fpabakus?reWriteBatchedInserts=true
4 changes: 2 additions & 2 deletions web/src/test/resources/application-vtp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fpabakus.it.ps.scopes=testscope
organisasjon.rs.url=http://localhost:8060/rest/ereg/api/v1/organisasjon

# Database
defaultDS.username=fpabakus
defaultDS.url=jdbc:postgresql://localhost:5432/fpabakus?reWriteBatchedInserts=true
defaultDS.username=k9-abakus
defaultDS.url=jdbc:postgresql://localhost:5432/k9-abakus?reWriteBatchedInserts=true

#fpsak.override.url=http://localhost:8080/fpsak
#fpwsproxy.override.url=http://localhost:8060/rest/api/fpwsproxy