From b33bdd59123d705f6c7881caa3b2446419a06fbd Mon Sep 17 00:00:00 2001 From: Manuel Esberger <esberger.manuel@live.at> Date: Sat, 5 Oct 2024 14:18:26 +0200 Subject: [PATCH] fix gateway path and add fix_idenity.sh script that patches the identity server to the quotas-policy --- helm/dbrepo/values.yaml | 2 +- helm/fix_identity.sh | 68 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 helm/fix_identity.sh diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index 955482a257..6b02c06b4c 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -46,7 +46,7 @@ namespace: aris-dbrepo-dev hostname: dbrepo.arisnet.ac.at ## @param gateway The gateway endpoint. ## -gateway: https://arisnet.ac.at +gateway: https://dbrepo.arisnet.ac.at ## @param strategyType The image pull strategyType: RollingUpdate ## @param clusterDomain The cluster domain. diff --git a/helm/fix_identity.sh b/helm/fix_identity.sh new file mode 100644 index 0000000000..a5772e2e98 --- /dev/null +++ b/helm/fix_identity.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +# Define variables +NAMESPACE="aris-dbrepo-dev" +STATEFULSET_NAME="identity-service" + +# Set resource limits and requests +oc patch statefulset $STATEFULSET_NAME -n $NAMESPACE --type='json' -p='[ + { + "op": "add", + "path": "/spec/template/spec/containers/0/resources", + "value": { + "limits": { + "memory": "512Mi" + }, + "requests": { + "cpu": "25m", + "memory": "256Mi" + } + } + }, + { + "op": "add", + "path": "/spec/template/spec/initContainers/0/resources", + "value": { + "limits": { + "memory": "512Mi" + }, + "requests": { + "cpu": "25m", + "memory": "256Mi" + } + } + }, + { + "op": "add", + "path": "/spec/template/spec/initContainers/1/resources", + "value": { + "limits": { + "memory": "512Mi" + }, + "requests": { + "cpu": "25m", + "memory": "256Mi" + } + } + } +]' + + +oc patch statefulset $STATEFULSET_NAME -n $NAMESPACE --type='json' -p='[ + { + "op": "remove", + "path": "/spec/template/spec/securityContext/fsGroup" + }, + { + "op": "remove", + "path": "/spec/template/spec/initContainers/0/securityContext/runAsUser" + }, + { + "op": "remove", + "path": "/spec/template/spec/initContainers/1/securityContext/runAsUser" + }, + { + "op": "remove", + "path": "/spec/template/spec/containers/0/securityContext/runAsUser" + } +]' \ No newline at end of file -- GitLab