From 5f77b55c17bfed771aec4c6a9c0124ddbc8c44ae Mon Sep 17 00:00:00 2001 From: Bruno Salzano Date: Thu, 2 Oct 2025 22:34:25 +0200 Subject: [PATCH] fix: fixed systemapi tasks replaced $OPS and ops debug util kube ctl with ops and kubectl --- setup/nuvolaris/system-api/opsfile.yml | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/setup/nuvolaris/system-api/opsfile.yml b/setup/nuvolaris/system-api/opsfile.yml index d3c00548..f217aac8 100644 --- a/setup/nuvolaris/system-api/opsfile.yml +++ b/setup/nuvolaris/system-api/opsfile.yml @@ -36,19 +36,19 @@ env: SYS_API_CDB_HOST: couchdb SYS_API_CDB_USER: - sh: $OPS debug kube ctl CMD="-n nuvolaris get wsk/controller -o jsonpath='{.spec.couchdb.admin.user}'" + sh: kubectl -n nuvolaris get wsk/controller -o jsonpath='{.spec.couchdb.admin.user}' SYS_API_CDB_PASSWORD: - sh: $OPS debug kube ctl CMD="-n nuvolaris get wsk/controller -o jsonpath='{.spec.couchdb.admin.password}'" + sh: kubectl -n nuvolaris get wsk/controller -o jsonpath='{.spec.couchdb.admin.password}' SYS_API_HOSTNAME: - sh: $OPS debug kube ctl CMD="-n nuvolaris get ingress/apihost -o jsonpath='{.spec.rules[0].host}'" + sh: kubectl -n nuvolaris get ingress/apihost -o jsonpath='{.spec.rules[0].host}' INGRESS_TYPE: - sh: $OPS util ingress-type + sh: ops util ingress-type REGISTRY_PASS: - sh: $OPS debug kube ctl CMD="-n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.registry_password}'" + sh: kubectl -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.registry_password}' tasks: install-toml: @@ -56,15 +56,15 @@ tasks: silent: true cmds: - task: remove-toml - - $OPS debug kube ctl CMD="-n nuvolaris create configmap nuvolaris-buildkitd-conf --from-file=$OPS_PWD/setup/nuvolaris/system-api/deploy/buildkit/buildkitd.toml" + - kubectl -n nuvolaris create configmap nuvolaris-buildkitd-conf --from-file="$OPS_ROOT/setup/nuvolaris/system-api/deploy/buildkit/buildkitd.toml" remove-toml: desc: Remove the buildkitd.toml config map silent: true cmds: - | - if $OPS debug kube ctl CMD="-n nuvolaris get cm nuvolaris-buildkitd-conf" >/dev/null 2>&1; - then $OPS debug kube ctl CMD="-n nuvolaris delete configmap nuvolaris-buildkitd-conf" + if kubectl -n nuvolaris get cm nuvolaris-buildkitd-conf >/dev/null 2>&1; + then kubectl -n nuvolaris delete configmap nuvolaris-buildkitd-conf fi install-secret: @@ -73,8 +73,8 @@ tasks: cmds: - task: remove-secret - | - if ! $OPS debug kube ctl CMD="-n nuvolaris get secret registry-pull-secret-int" >/dev/null 2>&1; - then $OPS debug kube ctl CMD="create secret docker-registry registry-pull-secret-int --docker-server=http://nuvolaris-registry-svc:5000 --docker-username=opsuser --docker-password=${REGISTRY_PASS}" + if ! kubectl -n nuvolaris get secret registry-pull-secret-int >/dev/null 2>&1; + then kubectl create secret docker-registry registry-pull-secret-int --docker-server=http://nuvolaris-registry-svc:5000 --docker-username=opsuser --docker-password=${REGISTRY_PASS} fi remove-secret: @@ -82,8 +82,8 @@ tasks: silent: true cmds: - | - if $OPS debug kube ctl CMD="-n nuvolaris get secret registry-pull-secret-int" >/dev/null 2>&1; - then $OPS debug kube ctl CMD="-n nuvolaris delete secret registry-pull-secret-int" + if kubectl -n nuvolaris get secret registry-pull-secret-int >/dev/null 2>&1; + then kubectl -n nuvolaris delete secret registry-pull-secret-int fi @@ -96,9 +96,9 @@ tasks: - test -n "$IMAGES_SYSTEMAPI" || die "IMAGES_SYSTEMAPI is not set. Please set it to the desired image version." - envsubst -i api-template.yaml -o _api.yaml > /dev/null 2>&1 - envsubst -i ${INGRESS_TYPE}-template.yaml -o _ingress.yaml > /dev/null 2>&1 - - $OPS debug kube ctl CMD="-n nuvolaris apply -f $OPS_ROOT/setup/nuvolaris/system-api/_api.yaml" + - kubectl -n nuvolaris apply -f "$OPS_ROOT/setup/nuvolaris/system-api/_api.yaml" #- cat _ingress.yaml - - $OPS debug kube ctl CMD="-n nuvolaris apply -f $OPS_ROOT/setup/nuvolaris/system-api/_ingress.yaml" + - kubectl -n nuvolaris apply -f "$OPS_ROOT/setup/nuvolaris/system-api/_ingress.yaml" - task: install-toml - task: install-secret - | @@ -111,7 +111,7 @@ tasks: cmds: - task: remove-secret - task: remove-toml - - $OPS debug kube ctl CMD="-n nuvolaris delete sts/nuvolaris-system-api ing/nuvolaris-system-api-ingress svc/nuvolaris-system-api" + - kubectl -n nuvolaris delete sts/nuvolaris-system-api ing/nuvolaris-system-api-ingress svc/nuvolaris-system-api - | echo "System Admin API undeployed" @@ -121,11 +121,11 @@ tasks: desc: update the OpenServerless System Admin Api Stateful Set cmds: - task: deploy - - $OPS debug kube ctl CMD="-n nuvolaris rollout restart statefulset nuvolaris-system-api" + - kubectl -n nuvolaris rollout restart statefulset nuvolaris-system-api preconditions: - sh: '[ $IMAGES_SYSTEMAPI != $CURRENT_API_VERSION ]' msg: "Current OpenServerless System API stateful set it is already updated to newest version. Request ignored." env: CURRENT_API_VERSION: sh: | - echo $($OPS debug kube ctl CMD="-n nuvolaris get sts/nuvolaris-system-api -ojsonpath='{.spec.template.spec.containers[0].image}'") \ No newline at end of file + echo $(kubectl -n nuvolaris get sts/nuvolaris-system-api -ojsonpath='{.spec.template.spec.containers[0].image}') \ No newline at end of file