From ceae6ef03d1ac4313d9fe17fd91905725934a3ba Mon Sep 17 00:00:00 2001
From: Sandro Flausino <sjunior@vertigo.com.br>
Date: Mon, 11 Sep 2023 14:00:43 -0300
Subject: [PATCH] fix(mockserver) updating chart and ingress reference values

---
 lib/versions.sh                                     | 2 +-
 vkpr/mockserver/install/src/unix/formula/formula.sh | 6 ++++--
 vkpr/mockserver/install/src/utils/mockserver.yaml   | 4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/versions.sh b/lib/versions.sh
index cb002898..4ec53338 100644
--- a/lib/versions.sh
+++ b/lib/versions.sh
@@ -17,7 +17,7 @@ export VKPR_EXTERNAL_DNS_VERSION="1.10.1" \
       VKPR_ARGOCD_EVENTS_VERSION="2.0.5" \
       VKPR_ARGOCD_WORKFLOWS_VERSION="0.19.6" \
       VKPR_JAEGER_VERSION="0.69.1" \
-      VKPR_MOCKSERVER_VERSION="5.14.0" \
+      VKPR_MOCKSERVER_VERSION="5.15.0" \
       VKPR_DEVPORTAL_VERSION="0.9.0" \
       VKPR_NEXUS_VERSION="4.14.0" \
       VKPR_EXTERNAL_SECRETS_VERSION="0.6.0" \
diff --git a/vkpr/mockserver/install/src/unix/formula/formula.sh b/vkpr/mockserver/install/src/unix/formula/formula.sh
index fd1bd2f8..13a38ac8 100755
--- a/vkpr/mockserver/install/src/unix/formula/formula.sh
+++ b/vkpr/mockserver/install/src/unix/formula/formula.sh
@@ -49,8 +49,10 @@ validateInputs() {
 }
 
 settingMockServer() {
-  YQ_VALUES=".ingress.hosts[0] = \"$VKPR_ENV_MOCKSERVER_DOMAIN\" |
-    .ingress.ingressClass.name = \"$VKPR_ENV_MOCKSERVER_INGRESS_CLASS_NAME\"
+  YQ_VALUES=".ingress.hosts[0].host = \"$VKPR_ENV_MOCKSERVER_DOMAIN\" |
+    .ingress.hosts[0].paths[0].path = \"/\" |
+    .ingress.hosts[0].paths[0].pathType = \"ImplementationSpecific\" |
+    .ingress.className = \"$VKPR_ENV_MOCKSERVER_INGRESS_CLASS_NAME\"
   "
 
   if [[ "$VKPR_ENV_GLOBAL_SECURE" == true ]]; then
diff --git a/vkpr/mockserver/install/src/utils/mockserver.yaml b/vkpr/mockserver/install/src/utils/mockserver.yaml
index 4c1de9c3..4cceb70f 100644
--- a/vkpr/mockserver/install/src/utils/mockserver.yaml
+++ b/vkpr/mockserver/install/src/utils/mockserver.yaml
@@ -2,5 +2,5 @@ service:
   type: ClusterIP
 ingress:
   enabled: true
-  ingressClass:
-    enabled: true
+  className: nginx
+  path: /