Skip to content

fix(charts): missing feature of jans-keycloak-link #11257

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

Merged
merged 13 commits into from
May 5, 2025
Merged
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
16 changes: 16 additions & 0 deletions charts/janssen-all-in-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,22 @@ Kubernetes: `>=v1.22.0-0`
| kc-scheduler.usrEnvs.secret | object | `{}` | Add custom secret envs to the service variable1: value1 |
| kc-scheduler.volumeMounts | list | `[]` | Configure any additional volumesMounts that need to be attached to the containers |
| kc-scheduler.volumes | list | `[]` | Configure any additional volumes that need to be attached to the pod |
| keycloak-link.appLoggers | object | `{"enableStdoutLogPrefix":"true","keycloakLinkLogLevel":"INFO","keycloakLinkLogTarget":"STDOUT","persistenceDurationLogLevel":"INFO","persistenceDurationLogTarget":"FILE","persistenceLogLevel":"INFO","persistenceLogTarget":"FILE","scriptLogLevel":"INFO","scriptLogTarget":"FILE"}` | App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed. |
| keycloak-link.appLoggers.enableStdoutLogPrefix | string | `"true"` | Enable log prefixing which enables prepending the STDOUT logs with the file name. i.e keycloak-link-persistence ===> 2022-12-20 17:49:55,744 INFO |
| keycloak-link.appLoggers.keycloakLinkLogLevel | string | `"INFO"` | jans-keycloak-link.log level |
| keycloak-link.appLoggers.keycloakLinkLogTarget | string | `"STDOUT"` | jans-keycloak-link.log target |
| keycloak-link.appLoggers.persistenceDurationLogLevel | string | `"INFO"` | jans-keycloak-link_persistence_duration.log level |
| keycloak-link.appLoggers.persistenceDurationLogTarget | string | `"FILE"` | jans-keycloak-link_persistence_duration.log target |
| keycloak-link.appLoggers.persistenceLogLevel | string | `"INFO"` | jans-keycloak-link_persistence.log level |
| keycloak-link.appLoggers.persistenceLogTarget | string | `"FILE"` | jans-keycloak-link_persistence.log target |
| keycloak-link.appLoggers.scriptLogLevel | string | `"INFO"` | jans-keycloak-link_script.log level |
| keycloak-link.appLoggers.scriptLogTarget | string | `"FILE"` | jans-keycloak-link_script.log target |
| keycloak-link.cnCustomJavaOptions | string | `""` | passing custom java options to link. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS JAVA_OPTIONS in envs. |
| keycloak-link.enabled | bool | `false` | Boolean flag to enable/disable the link chart. |
| keycloak-link.ingress | object | `{"keycloakLinkAdditionalAnnotations":{},"keycloakLinkEnabled":true,"keycloakLinkLabels":{}}` | Enable endpoints in either istio or nginx ingress depending on users choice |
| keycloak-link.ingress.keycloakLinkAdditionalAnnotations | object | `{}` | keycloak-link ingress resource additional annotations. |
| keycloak-link.ingress.keycloakLinkLabels | object | `{}` | keycloak-link ingress resource labels. key app is taken |
| keycloak-link.keycloakLinkServiceName | string | `"keycloak-link"` | Name of the keycloak-link service. Please keep it as default. |
| lbIp | string | `"22.22.22.22"` | The Loadbalancer IP created by nginx or istio on clouds that provide static IPs. This is not needed if `fqdn` is globally resolvable. |
| lifecycle | object | `{}` | |
| link.appLoggers | object | `{"enableStdoutLogPrefix":"true","linkLogLevel":"INFO","linkLogTarget":"STDOUT","persistenceDurationLogLevel":"INFO","persistenceDurationLogTarget":"FILE","persistenceLogLevel":"INFO","persistenceLogTarget":"FILE","scriptLogLevel":"INFO","scriptLogTarget":"FILE"}` | App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed. |
Expand Down
3 changes: 3 additions & 0 deletions charts/janssen-all-in-one/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ Create aio enabled list
{{- if .Values.saml.enabled}}
{{ $newList = append $newList ("jans-saml") }}
{{- end}}
{{- if index .Values "keycloak-link" "enabled" }}
{{ $newList = append $newList ("jans-keycloak-link") }}
{{- end }}
{{ toJson $newList }}
{{- end }}

Expand Down
30 changes: 30 additions & 0 deletions charts/janssen-all-in-one/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,36 @@ data:
CN_MESSAGE_TYPE: {{ .Values.configmap.cnMessageType | quote }}
CN_CONFIGURATOR_CONFIGURATION_FILE: {{ .Values.cnConfiguratorConfigurationFile | quote }}
CN_CONFIGURATOR_DUMP_FILE: {{ .Values.cnConfiguratorDumpFile | quote }}
{{- if .Values.link.enabled }}
CN_LINK_APP_LOGGERS: {{ .Values.link.appLoggers
| toJson
| replace "linkLogTarget" "link_log_target"
| replace "linkLogLevel" "link_log_level"
| replace "persistenceLogTarget" "persistence_log_target"
| replace "persistenceLogLevel" "persistence_log_level"
| replace "persistenceDurationLogTarget" "persistence_duration_log_target"
| replace "persistenceDurationLogLevel" "persistence_duration_log_level"
| replace "scriptLogTarget" "script_log_target"
| replace "scriptLogLevel" "script_log_level"
| replace "enableStdoutLogPrefix" "enable_stdout_log_prefix"
| squote
}}
{{- end }}
{{- if index .Values "keycloak-link" "enabled" }}
CN_KEYCLOAK_LINK_APP_LOGGERS: {{ index .Values "keycloak-link" "appLoggers"
| toJson
| replace "keycloakLinkLogTarget" "keycloak_link_log_target"
| replace "keycloakLinkLogLevel" "keycloak_link_log_level"
| replace "persistenceLogTarget" "persistence_log_target"
| replace "persistenceLogLevel" "persistence_log_level"
| replace "persistenceDurationLogTarget" "persistence_duration_log_target"
| replace "persistenceDurationLogLevel" "persistence_duration_log_level"
| replace "scriptLogTarget" "script_log_target"
| replace "scriptLogLevel" "script_log_level"
| replace "enableStdoutLogPrefix" "enable_stdout_log_prefix"
| squote
}}
{{- end }}

---

Expand Down
47 changes: 47 additions & 0 deletions charts/janssen-all-in-one/templates/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -948,4 +948,51 @@ spec:
number: 8080
{{- end }}

---

{{ if index .Values "keycloak-link" "ingress" "keycloakLinkEnabled" -}}
{{ $fullName := include "janssen-all-in-one.fullname" . -}}
{{- $ingressPath := index .Values "nginx-ingress" "ingress" "path" -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-keycloak-link
labels:
app: {{ $fullName }}-keycloak-link
{{- if index .Values "nginx-ingress" "ingress" "additionalLabels" }}
{{ toYaml (index .Values "nginx-ingress" "ingress" "additionalLabels") | indent 4 }}
{{- end }}
{{- if index .Values "keycloak-link" "ingress" "keycloakLinkLabels" }}
{{ toYaml (index .Values "keycloak-link" "ingress" "keycloakLinkLabels") | indent 4 }}
{{- end }}
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
{{- if index .Values "keycloak-link" "ingress" "keycloakLinkAdditionalAnnotations" }}
{{ toYaml (index .Values "keycloak-link" "ingress" "keycloakLinkAdditionalAnnotations") | indent 4 }}
{{- end }}
{{- if index .Values "nginx-ingress" "ingress" "additionalAnnotations" }}
{{ toYaml (index .Values "nginx-ingress" "ingress" "additionalAnnotations") | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ index .Values "nginx-ingress" "ingress" "ingressClassName" }}
{{- if index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
tls:
- hosts:
- {{ .Values.fqdn | quote }}
secretName: {{ index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
{{- end }}
rules:
- host: {{ .Values.fqdn | quote }}
http:
paths:
- path: /jans-keycloak-link
pathType: Prefix
backend:
service:
name: {{ .Values.service.name }}
port:
number: 8080
{{- end }}

{{- end }}
36 changes: 36 additions & 0 deletions charts/janssen-all-in-one/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -881,3 +881,39 @@ cleanup:
customCommand: []
# -- Boolean flag to enable/disable the cleanup cronjob chart.
enabled: true

keycloak-link:
# -- Name of the keycloak-link service. Please keep it as default.
keycloakLinkServiceName: keycloak-link
# -- Boolean flag to enable/disable the link chart.
enabled: false
# -- passing custom java options to link. Notice you do not need to pass in any loggers options as they are introduced below in appLoggers. DO NOT PASS JAVA_OPTIONS in envs.
cnCustomJavaOptions: ""
# -- App loggers can be configured to define where the logs will be redirected to and the level of each in which it should be displayed.
appLoggers:
# -- Enable log prefixing which enables prepending the STDOUT logs with the file name. i.e keycloak-link-persistence ===> 2022-12-20 17:49:55,744 INFO
enableStdoutLogPrefix: "true"
# -- jans-keycloak-link.log target
keycloakLinkLogTarget: "STDOUT"
# -- jans-keycloak-link.log level
keycloakLinkLogLevel: "INFO"
# -- jans-keycloak-link_persistence.log target
persistenceLogTarget: "FILE"
# -- jans-keycloak-link_persistence.log level
persistenceLogLevel: "INFO"
# -- jans-keycloak-link_persistence_duration.log target
persistenceDurationLogTarget: "FILE"
# -- jans-keycloak-link_persistence_duration.log level
persistenceDurationLogLevel: "INFO"
# -- jans-keycloak-link_script.log target
scriptLogTarget: "FILE"
# -- jans-keycloak-link_script.log level
scriptLogLevel: "INFO"
# -- Enable endpoints in either istio or nginx ingress depending on users choice
ingress:
# Enable keycloak-link endpoints /jans-keycloak-link
keycloakLinkEnabled: true
# -- keycloak-link ingress resource labels. key app is taken
keycloakLinkLabels: { }
# -- keycloak-link ingress resource additional annotations.
keycloakLinkAdditionalAnnotations: { }
6 changes: 6 additions & 0 deletions charts/janssen/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ annotations:
image: ghcr.io/janssenproject/jans/cloudtools:0.0.0-nightly
- name: cleanup
image: ghcr.io/janssenproject/jans/cloudtools:0.0.0-nightly
- name: keycloak-link
image: ghcr.io/janssenproject/jans/keycloak-link:0.0.0-nightly
artifacthub.io/license: Apache-2.0
artifacthub.io/prerelease: 'true'
catalog.cattle.io/certified: partner
Expand Down Expand Up @@ -101,3 +103,7 @@ dependencies:
- name: cleanup
condition: global.cleanup.enabled
version: 0.0.0-nightly

- name: keycloak-link
condition: global.keycloak-link.enabled
version: 0.0.0-nightly
Loading