Skip to content
Snippets Groups Projects
Commit f66088b8 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-3388 rename helm chart value' (#78) from...

Merge pull request 'OZG-3388 rename helm chart value' (#78) from OZG-3388-helm-chart-adjustments into master

Reviewed-on: https://git.ozg-sh.de/mgm/user-manager/pulls/78
parents 29edc61b 8c204c92
No related branches found
No related tags found
No related merge requests found
# user-manager Project # user-manager
This project uses Quarkus, the Supersonic Subatomic Java Framework. This project uses Quarkus, the Supersonic Subatomic Java Framework.
...@@ -36,12 +36,21 @@ You can run your application in dev mode that enables live coding using: ...@@ -36,12 +36,21 @@ You can run your application in dev mode that enables live coding using:
> ```yaml > ```yaml
> keycloak: > keycloak:
> realm: your-realm > realm: your-realm
> kop: > ozgcloud:
> keycloak: > usersync:
> sync:
> period: "6h" > period: "6h"
> ``` > ```
## Running the server with custom realm
In order to start user-manager-server connecting againts dev keycloak locally with custom realm
use below configuration in your IDE or CLI.
```
-Dquarkus.profile=local,remotekc
-Dquarkus.oidc.auth-server-url=https://sso.dev.by.ozg-cloud.de/realms/sebo-test
-Dkop.keycloak.api.realm=sebo-test
-Dozgcloud.usersync.period="5s"
```
## Packaging and running the application ## Packaging and running the application
The application can be packaged using: The application can be packaged using:
...@@ -133,7 +142,7 @@ Usermanager als native Anwendung erstellen und lokal starten: ...@@ -133,7 +142,7 @@ Usermanager als native Anwendung erstellen und lokal starten:
-Dkop.keycloak.api.password=hlc_j1I1Ji0trC0 \ -Dkop.keycloak.api.password=hlc_j1I1Ji0trC0 \
-Dkop.keycloak.api.realm=by-kiel-dev \ -Dkop.keycloak.api.realm=by-kiel-dev \
-Dkop.keycloak.api.client=alfa \ -Dkop.keycloak.api.client=alfa \
-Dkop.keycloak.sync.cron="* */3 * * * ?" \ -Dozgcloud.usersync.period="5m" \
-Xmx32m -Xmx32m
``` ```
......
...@@ -98,8 +98,10 @@ spec: ...@@ -98,8 +98,10 @@ spec:
value: {{ include "app.ssoServerUrl" . }} value: {{ include "app.ssoServerUrl" . }}
- name: KOP_USER_MANAGER_URL - name: KOP_USER_MANAGER_URL
value: {{ include "app.baseUrl" . }} value: {{ include "app.baseUrl" . }}
- name: KOP_KEYCLOAK_SYNC_CRON {{- if ((.Values.ozgcloud).usersync).period }}
value: {{ .Values.kop.keycloak.sync.cron }} - name: OZGCLOUD_USERSYNC_PERIOD
value: {{ .Values.ozgcloud.usersync.period }}
{{- end }}
- name: QUARKUS_HTTP_CORS_ORIGINS - name: QUARKUS_HTTP_CORS_ORIGINS
value: {{ (include "app.goofyAddress" .) }} value: {{ (include "app.goofyAddress" .) }}
{{- with (.Values.env).customList }} {{- with (.Values.env).customList }}
......
...@@ -38,8 +38,6 @@ kop: ...@@ -38,8 +38,6 @@ kop:
keycloak: keycloak:
api: api:
user: userManagerApiUser user: userManagerApiUser
sync:
cron: 0 15 1 * * ?
imageCredentials: imageCredentials:
registry: docker.ozg-sh.de registry: docker.ozg-sh.de
......
...@@ -52,11 +52,6 @@ tests: ...@@ -52,11 +52,6 @@ tests:
content: content:
name: KOP_KEYCLOAK_API_REALM name: KOP_KEYCLOAK_API_REALM
value: sh-helm-test value: sh-helm-test
- contains:
path: spec.template.spec.containers[0].env
content:
name: KOP_KEYCLOAK_SYNC_CRON
value: 0 15 1 * * ?
- contains: - contains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
......
...@@ -69,3 +69,19 @@ tests: ...@@ -69,3 +69,19 @@ tests:
content: content:
name: QUARKUS_MONGODB_DATABASE name: QUARKUS_MONGODB_DATABASE
value: test-database value: test-database
- it: check user sync period set
set:
ozgcloud.usersync.period: "6h"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_USERSYNC_PERIOD
value: "6h"
- it: check user sync period NOT set
asserts:
- notContains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_USERSYNC_PERIOD
value: "6h"
\ No newline at end of file
...@@ -41,7 +41,7 @@ public class SyncScheduler { ...@@ -41,7 +41,7 @@ public class SyncScheduler {
@Inject @Inject
LockService syncLockService; LockService syncLockService;
@Scheduled(every = "{kop.keycloak.sync.period}", concurrentExecution = SKIP) @Scheduled(every = "{ozgcloud.usersync.period}", concurrentExecution = SKIP)
public void start() { public void start() {
if (syncLockService.isNotLocked()) { if (syncLockService.isNotLocked()) {
var lock = syncLockService.lockCollection(); var lock = syncLockService.lockCollection();
......
...@@ -21,8 +21,10 @@ kop: ...@@ -21,8 +21,10 @@ kop:
password: S9UEMuLG9y9ev99 password: S9UEMuLG9y9ev99
realm: by-e2e-local-dev realm: by-e2e-local-dev
client: alfa client: alfa
sync:
period: disabled
keycloak: keycloak:
url: https://sso.dev.by.ozg-cloud.de url: https://sso.dev.by.ozg-cloud.de
ozgcloud:
usersync:
period: disabled
\ No newline at end of file
...@@ -15,8 +15,6 @@ kop: ...@@ -15,8 +15,6 @@ kop:
user-manager: user-manager:
url: http://localhost:9092 url: http://localhost:9092
keycloak: keycloak:
sync:
period: disabled
api: api:
user: userManagerApiUser user: userManagerApiUser
password: hlc_j1I1Ji0trC0 password: hlc_j1I1Ji0trC0
...@@ -24,3 +22,7 @@ kop: ...@@ -24,3 +22,7 @@ kop:
organisations-einheit-id-key: organisationseinheitId organisations-einheit-id-key: organisationseinheitId
client: alfa client: alfa
ldap-id-key: LDAP_ID ldap-id-key: LDAP_ID
ozgcloud:
usersync:
period: disabled
\ No newline at end of file
...@@ -42,5 +42,7 @@ kop: ...@@ -42,5 +42,7 @@ kop:
password: "-" password: "-"
realm: by-kiel-dev realm: by-kiel-dev
client: alfa client: alfa
sync:
ozgcloud:
usersync:
period: "6h" period: "6h"
\ No newline at end of file
...@@ -18,8 +18,6 @@ quarkus: ...@@ -18,8 +18,6 @@ quarkus:
kop: kop:
keycloak: keycloak:
sync:
cron: "0 15 13 * * ?"
api: api:
user: "-" user: "-"
password: "-" password: "-"
...@@ -31,3 +29,7 @@ kop: ...@@ -31,3 +29,7 @@ kop:
url: http://localhost:9092 url: http://localhost:9092
keycloak: keycloak:
url: http://localhost:8088 url: http://localhost:8088
ozgcloud:
usersync:
period: disabled
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment