Skip to content

Commit 32db8d6

Browse files
misba7iromli
andauthored
feat(jans-lock): add jans-lock ingress (#1790)
* feat(lock): add lock ingress and its respective labels and annotations * fix(ingress): remove extra end * docs(jans-lock): update jans-lock endpoint * chore: update JANS_SOURCE_VERSION Signed-off-by: iromli <[email protected]> --------- Signed-off-by: iromli <[email protected]> Co-authored-by: Isman Firmansyah <[email protected]> Co-authored-by: iromli <[email protected]>
1 parent 4f61df7 commit 32db8d6

File tree

8 files changed

+126
-9
lines changed

8 files changed

+126
-9
lines changed

charts/gluu-all-in-one/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Kubernetes: `>=v1.22.0-0`
9797
| auth-server.ingress.firebaseMessagingEnabled | bool | `true` | Enable endpoint /firebase-messaging-sw.js |
9898
| auth-server.ingress.firebaseMessagingLabels | object | `{}` | Firebase Messaging ingress resource labels. key app is taken |
9999
| auth-server.ingress.lockConfigAdditionalAnnotations | object | `{}` | Lock config ingress resource additional annotations. |
100-
| auth-server.ingress.lockConfigEnabled | bool | `false` | Enable endpoint /.well-known/lock-master-configuration |
100+
| auth-server.ingress.lockConfigEnabled | bool | `false` | Enable endpoint /.well-known/lock-server-configuration |
101101
| auth-server.ingress.lockConfigLabels | object | `{}` | Lock config ingress resource labels. key app is taken |
102102
| auth-server.ingress.openidAdditionalAnnotations | object | `{}` | openid-configuration ingress resource additional annotations. |
103103
| auth-server.ingress.openidConfigEnabled | bool | `true` | Enable endpoint /.well-known/openid-configuration |

charts/gluu-all-in-one/templates/nginx-ingress.yaml

+49-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ spec:
748748
- host: {{ .Values.fqdn | quote }}
749749
http:
750750
paths:
751-
- path: /.well-known/lock-master-configuration
751+
- path: /.well-known/lock-server-configuration
752752
pathType: Exact
753753
backend:
754754
service:
@@ -757,4 +757,52 @@ spec:
757757
number: 8080
758758
{{- end }}
759759

760+
---
761+
762+
{{ if and (index .Values "auth-server" "lockEnabled") (index .Values "auth-server" "ingress" "lockEnabled") -}}
763+
{{ $fullName := include "flex-all-in-one.fullname" . -}}
764+
{{- $ingressPath := index .Values "nginx-ingress" "ingress" "path" -}}
765+
apiVersion: networking.k8s.io/v1
766+
kind: Ingress
767+
metadata:
768+
name: {{ $fullName }}-lock
769+
labels:
770+
app: {{ $fullName }}-lock
771+
{{- if index .Values "nginx-ingress" "ingress" "additionalLabels" }}
772+
{{ toYaml (index .Values "nginx-ingress" "ingress" "additionalLabels") | indent 4 }}
773+
{{- end }}
774+
{{- if index .Values "auth-server" "ingress" "lockLabels" }}
775+
{{ toYaml (index .Values "auth-server" "ingress" "lockLabels") | indent 4 }}
776+
{{- end }}
777+
annotations:
778+
nginx.ingress.kubernetes.io/ssl-redirect: "false"
779+
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
780+
nginx.ingress.kubernetes.io/rewrite-target: /jans-auth
781+
{{- if index .Values "auth-server" "ingress" "lockAdditionalAnnotations" }}
782+
{{ toYaml (index .Values "auth-server" "ingress" "lockAdditionalAnnotations") | indent 4 }}
783+
{{- end }}
784+
{{- if index .Values "nginx-ingress" "ingress" "additionalAnnotations" }}
785+
{{ toYaml (index .Values "nginx-ingress" "ingress" "additionalAnnotations") | indent 4 }}
786+
{{- end }}
787+
spec:
788+
ingressClassName: {{ index .Values "nginx-ingress" "ingress" "ingressClassName" }}
789+
{{- if index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
790+
tls:
791+
- hosts:
792+
- {{ .Values.fqdn | quote }}
793+
secretName: {{ index .Values "nginx-ingress" "ingress" "tlsSecretName" }}
760794
{{- end }}
795+
rules:
796+
- host: {{ .Values.fqdn | quote }}
797+
http:
798+
paths:
799+
- path: /jans-lock
800+
pathType: Exact
801+
backend:
802+
service:
803+
name: {{ .Values.service.name }}
804+
port:
805+
number: 8080
806+
{{- end }}
807+
808+
{{- end }}

charts/gluu-all-in-one/values.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,18 @@ auth-server:
256256
authServerProtectedToken: false
257257
# -- Enable mTLS onn Auth server endpoint /jans-auth/restv1/register. Currently not working in Istio.
258258
authServerProtectedRegister: false
259-
# -- Enable endpoint /.well-known/lock-master-configuration
259+
# -- Enable endpoint /.well-known/lock-server-configuration
260260
lockConfigEnabled: false
261+
# -- Enable endpoint /jans-lock
262+
lockEnabled: false
261263
# -- Lock config ingress resource labels. key app is taken
262264
lockConfigLabels: {}
263265
# -- Lock config ingress resource additional annotations.
264266
lockConfigAdditionalAnnotations: {}
267+
# -- Lock ingress resource labels. key app is taken
268+
lockLabels: { }
269+
# -- Lock ingress resource additional annotations.
270+
lockAdditionalAnnotations: { }
265271
# -- openid-configuration ingress resource labels. key app is taken
266272
openidConfigLabels: { }
267273
# -- openid-configuration ingress resource additional annotations.

charts/gluu/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Kubernetes: `>=v1.21.0-0`
353353
| global.auth-server.ingress.firebaseMessagingEnabled | bool | `true` | Enable endpoint /firebase-messaging-sw.js |
354354
| global.auth-server.ingress.firebaseMessagingLabels | object | `{}` | Firebase Messaging ingress resource labels. key app is taken |
355355
| global.auth-server.ingress.lockConfigAdditionalAnnotations | object | `{}` | Lock config ingress resource additional annotations. |
356-
| global.auth-server.ingress.lockConfigEnabled | bool | `false` | Enable endpoint /.well-known/lock-master-configuration |
356+
| global.auth-server.ingress.lockConfigEnabled | bool | `false` | Enable endpoint /.well-known/lock-server-configuration |
357357
| global.auth-server.ingress.lockConfigLabels | object | `{}` | Lock config ingress resource labels. key app is taken |
358358
| global.auth-server.ingress.openidAdditionalAnnotations | object | `{}` | openid-configuration ingress resource additional annotations. |
359359
| global.auth-server.ingress.openidConfigEnabled | bool | `true` | Enable endpoint /.well-known/openid-configuration |

charts/gluu/charts/nginx-ingress/templates/ingress.yaml

+58-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ spec:
888888
- host: {{ $host | quote }}
889889
http:
890890
paths:
891-
- path: /.well-known/lock-master-configuration
891+
- path: /.well-known/lock-server-configuration
892892
pathType: Exact
893893
backend:
894894
service:
@@ -898,3 +898,60 @@ spec:
898898
{{- end }}
899899
{{- end }}
900900
{{- end }}
901+
902+
---
903+
904+
{{ if and (index .Values "global" "auth-server" "lockEnabled") (index .Values "global" "auth-server" "ingress" "lockEnabled") -}}
905+
{{ $fullName := include "nginx-ingress.fullname" . -}}
906+
{{- $ingressPath := .Values.ingress.path -}}
907+
apiVersion: networking.k8s.io/v1
908+
kind: Ingress
909+
metadata:
910+
name: {{ $fullName }}-lock
911+
labels:
912+
app: {{ $fullName }}-lock
913+
{{- if .Values.ingress.additionalLabels }}
914+
{{ toYaml .Values.ingress.additionalLabels | indent 4 }}
915+
{{- end }}
916+
{{- if index .Values.global "auth-server" "ingress" "lockLabels" }}
917+
{{ toYaml (index .Values.global "auth-server" "ingress" "lockLabels") | indent 4 }}
918+
{{- end }}
919+
annotations:
920+
nginx.ingress.kubernetes.io/ssl-redirect: "false"
921+
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
922+
nginx.ingress.kubernetes.io/rewrite-target: /jans-auth/
923+
{{- if index .Values.global "auth-server" "ingress" "lockAdditionalAnnotations" }}
924+
{{ toYaml (index .Values.global "auth-server" "ingress" "lockAdditionalAnnotations") | indent 4 }}
925+
{{- end }}
926+
{{- if .Values.ingress.additionalAnnotations }}
927+
{{ toYaml .Values.ingress.additionalAnnotations | indent 4 }}
928+
{{- end }}
929+
spec:
930+
ingressClassName: {{ .Values.ingress.ingressClassName }}
931+
{{- if .Values.ingress.tls }}
932+
tls:
933+
{{- range .Values.ingress.tls }}
934+
- hosts:
935+
{{- range .hosts }}
936+
- {{ . | quote }}
937+
{{- end }}
938+
secretName: {{ .secretName }}
939+
{{- end }}
940+
{{- end }}
941+
rules:
942+
{{- range .Values.ingress.hosts }}
943+
{{- $host := . -}}
944+
{{- with $ }}
945+
- host: {{ $host | quote }}
946+
http:
947+
paths:
948+
- path: /jans-lock
949+
pathType: Exact
950+
backend:
951+
service:
952+
name: {{ index .Values "global" "auth-server" "authServerServiceName" }}
953+
port:
954+
number: 8080
955+
{{- end }}
956+
{{- end }}
957+
{{- end }}

charts/gluu/values.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,18 @@ global:
989989
authServerProtectedToken: false
990990
# -- Enable mTLS onn Auth server endpoint /jans-auth/restv1/register. Currently not working in Istio.
991991
authServerProtectedRegister: false
992-
# -- Enable endpoint /.well-known/lock-master-configuration
992+
# -- Enable endpoint /.well-known/lock-server-configuration
993993
lockConfigEnabled: false
994+
# -- Enable endpoint /jans-lock
995+
lockEnabled: false
994996
# -- Lock config ingress resource labels. key app is taken
995997
lockConfigLabels: { }
996998
# -- Lock config ingress resource additional annotations.
997-
lockConfigAdditionalAnnotations: { }
999+
lockConfigAdditionalAnnotations: { }
1000+
# -- Lock ingress resource labels. key app is taken
1001+
lockLabels: { }
1002+
# -- Lock ingress resource additional annotations.
1003+
lockAdditionalAnnotations: { }
9981004
# -- openid-configuration ingress resource labels. key app is taken
9991005
openidConfigLabels: { }
10001006
# -- openid-configuration ingress resource additional annotations.

docker-admin-ui/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ EXPOSE 8080
2020
# Assets sync
2121
# ===========
2222

23-
ENV JANS_SOURCE_VERSION=e157cd4c8ff92c04e400fea29c51ae54f842a678
23+
ENV JANS_SOURCE_VERSION=1a86124407fdd8adb9f6360c8210b7e86291212f
2424
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
2525

2626
# note that as we're pulling from a monorepo (with multiple project in it)

docker-flex-all-in-one/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RUN ln -sf /app/flex_aio/admin_ui/entrypoint.sh /app/bin/admin-ui-entrypoint.sh
6565
# Assets sync
6666
# ===========
6767

68-
ENV JANS_SOURCE_VERSION=e157cd4c8ff92c04e400fea29c51ae54f842a678
68+
ENV JANS_SOURCE_VERSION=1a86124407fdd8adb9f6360c8210b7e86291212f
6969

7070
# note that as we're pulling from a monorepo (with multiple project in it)
7171
# we are using partial-clone and sparse-checkout to get the assets

0 commit comments

Comments
 (0)