This is an automated email from the ASF dual-hosted git repository.

sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-task.git

commit d36a0f364c6bda7b585957006704a763599681c1
Author: Build OpenServerless <[email protected]>
AuthorDate: Sun Sep 20 18:52:52 2026 +0000

    fixed adduser
---
 setup/openserverless/opsfile.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/setup/openserverless/opsfile.yml b/setup/openserverless/opsfile.yml
index 87fa75e..0e1c5a1 100644
--- a/setup/openserverless/opsfile.yml
+++ b/setup/openserverless/opsfile.yml
@@ -273,6 +273,12 @@ tasks:
     silent: true
     desc: create a new U=user (default 'devel') with P=password, (default a 
random pw)
     vars:
+      APIHOST:
+        sh: ops util kubeget cm/config .metadata.annotations.apihost
+      PROTO:
+        sh:  echo '{{.APIHOST}}' | rg -o '(https?)://' -r '$1'
+      DOMAIN:
+        sh:  echo '{{.APIHOST}}' | rg -o 
'https?://((?:[a-zA-Z0-9-]+\.)+[a-zA-Z]+)/?' -r '$1'
       USR: '{{or .U "devel" }}'
       PSW:
         sh: |
@@ -281,14 +287,10 @@ tasks:
             else echo "{{.P}}"
             fi
       FLAGS: '{{or .F "--all"}}'
-
     env:
-      APIHOST:
-        sh: echo "$OPERATOR_CONFIG_HOSTPROTOCOL://$OPERATOR_CONFIG_APIHOST"
-      HOST:
-        sh: echo 
"$OPERATOR_CONFIG_HOSTPROTOCOL://{{.USR}}.$OPERATOR_CONFIG_APIHOST"
+      APIHOST: '{{.APIHOST}}'
+      HOST: '{{.PROTO}}//{{.USR}}.{{.DOMAIN}}'
     cmds:
-    #- test ! -e ~/.ops/{{.USR}}.password || die "User {{.USR}} already exists 
- check .ops/{{.USR}}.password in your home for password"
     - |
       if kubectl -n openserverless get wsku/{{.USR}} 2>/dev/null
       then die "User {{.USR}} already exists - check ~/.ops/{{.USR}}.password 
in your home for password"

Reply via email to