Skip to content

Commit

Permalink
added ofk-no to deployment to api - wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Erling Jahr committed Nov 17, 2023
1 parent c4f1c14 commit dcc30b5
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 9 deletions.
5 changes: 5 additions & 0 deletions kustomize/base/flais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ spec:
permission: admin
database:
database: fint-kontroll
env:
- name: fint.kontroll.authorization.authorized-role
value: "https://role-catalog.vigoiks.no/vigo/kontroll/user"
- name: fint.kontroll.authorization.authorized-org-id
value: "vigo.no"
envFrom:
- configMapRef:
name: fint-kontroll-access-management-config
40 changes: 40 additions & 0 deletions kustomize/overlays/api/ofk-no/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ofk-no
resources:
- ../../../base
commonLabels:
app.kubernetes.io/name: fint-kontroll-user-catalog
app.kubernetes.io/instance: fint-kontroll-user-catalog_ofk-no
app.kubernetes.io/version: latest
app.kubernetes.io/component: backend
app.kubernetes.io/part-of: fint-kontroll
fintlabs.no/team: bas
fintlabs.no/org-id: ofk.no
patches:
- patch: |-
- op: replace
path: "/spec/orgId"
value: "ofk.no"
- op: replace
path: "/spec/env/0/value"
value: "https://role-catalog.vigoiks.no/vigo/kontroll/user"
- op: replace
path: "/spec/env/1/value"
value: "ofk.no"
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "ofk-no.kontroll.*"
- op: replace
path: "/spec/kafka/acls/1/topic"
value: "ofk-no.kontroll.*"
- op: replace
path: "/spec/ingress/basePath"
value: "/ofk-no/api/users"
- op: replace
path: "/spec/url/basePath"
value: "/ofk-no"
target:
kind: Application
name: fint-kontroll-user-catalog
22 changes: 20 additions & 2 deletions kustomize/overlays/beta/fintlabs-no/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,27 @@ commonLabels:
patches:
- patch: |-
- op: replace
path: "/spec/acls/0/topic"
path: "/spec/orgId"
value: "fintlabs.no"
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "fintlabs-no.kontroll.*"
- op: replace
path: "/spec/kafka/acls/1/topic"
value: "fintlabs-no.kontroll.*"
- op: replace
path: "/spec/env/0/value"
value: "https://role-catalog.vigoiks.no/vigo/kontroll/user"
- op: replace
path: "/spec/env/1/value"
value: "vigo.no"
- op: replace
path: "/spec/ingress/basePath"
value: '/beta/fintlabs-no/api/users'
- op: replace
path: "/spec/url/basePath"
value: "/beta/fintlabs-no"
target:
kind: KafkaUserAndAcl
kind: Application
name: fint-kontroll-user-catalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import no.fintlabs.kafka.entity.EntityConsumerFactoryService;
import no.fintlabs.kafka.entity.topic.EntityTopicNameParameters;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.listener.ConcurrentMessageListenerContainer;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fint:
opa:
url: http://localhost:8181/v1/data/accessmanagement
authorization:
authorized-role: https://role-catalog.vigoiks.no/vigo/samtykke/user
authorized-role: https://role-catalog.vigoiks.no/vigo/kontroll/user
authorized-org-id: vigo.no
externalusers: yes
spring:
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ fint:
cache:
defaultCacheEntryTimeToLiveMillis: 518400000
defaultCacheHeapSize: 1000000
integration:
service:
authorized-role: https://role-catalog.vigoiks.no/vigo/samtykke/user
# integration:
# service:
# authorized-role: https://role-catalog.vigoiks.no/vigo/kontroll/user
kontroll:
user-catalog:
pagesize: 50
opa:
url: http://fint-kontroll-opa:8181/v1/data/accessmanagement
authorization:
authorized-role:
authorized-org-id:
authorized-role: https://role-catalog.vigoiks.no/vigo/kontroll/user
authorized-org-id: vigo.no
externalusers: yes
spring:
security:
Expand Down

0 comments on commit dcc30b5

Please sign in to comment.