From cda024e21c345147d54765ab5fd4fc03b8e8ef1c Mon Sep 17 00:00:00 2001 From: Amro Misbah Date: Tue, 28 May 2024 09:59:39 +0300 Subject: [PATCH] docs: using customScripts to use large jars --- docs/source/operation/custom-design.md | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/docs/source/operation/custom-design.md b/docs/source/operation/custom-design.md index eee47794..4f1e049c 100644 --- a/docs/source/operation/custom-design.md +++ b/docs/source/operation/custom-design.md @@ -531,3 +531,60 @@ This guide will show examples of how to customize pages in oxShibboleth (SAML ID ```bash helm upgrade gluu gluu/gluu -n gluu --version=1.7.x -f values.yaml ``` +## Custom Jar file for scripts + +### for JARs less than 1MB +1. Create a configmap with the custom jar file: + `kubectl -n create cm my-custom-jar --from-file=mycustom.jar` + +1. Mount the configmap in your values.yaml under `oxauth.volumes` and `oxauth.volumeMounts` + + ``` + oxauth: + volumeMounts: + - name: my-custom-jar-volume + mountPath: /opt/gluu/jetty/oxauth/custom/libs/mycustom.jar + subPath: mycustom.jar + volumes: + - name: my-custom-jar-volume + configMap: + name: my-custom-jar + ``` + +1. Run helm install or helm upgrade if Gluu has been already installed. + ```bash + helm upgrade gluu/gluu -n -f values.yaml --version=4.5.x + ``` + +### For JARs greater than 1MB +1. Create a configmap or secret for a shell script that contains instructions to pull the custom jar file: + + ```shell + #!/bin/sh + # This script will pull the custom jar file from a remote location + # and place it in the correct location for oxAuth to use it + wget -O /opt/gluu/jetty/oxauth/custom/libs/mycustom.jar https://mydomain.com/mycustom.jar + ``` + `kubectl -n create cm my-custom-jar --from-file=mycustomjar.sh` + +1. Mount the configmap or secret in your values.yaml under `oxauth.volumes` and `oxauth.volumeMounts` + + ``` + oxauth: + volumeMounts: + - name: my-custom-jar-volume + mountPath: /tmp/mycustomjar.sh + subPath: mycustomjar.sh + volumes: + - name: my-custom-jar-volume + configMap: + name: my-custom-jar + defaultMode: 0755 + customScripts: + - /tmp/mycustomjar.sh + ``` + +1. Run helm install or helm upgrade if Gluu has been already installed. + ```bash + helm upgrade gluu/gluu -n -f values.yaml --version=4.5.x + ``` \ No newline at end of file