From 31fb3b37b92458d6c7b04da08e573c69b5643484 Mon Sep 17 00:00:00 2001 From: Josef Karasek Date: Thu, 3 Sep 2026 16:11:59 +0200 Subject: [PATCH 1/5] Deprecate mode `Managed` Signed-off-by: Josef Karasek --- README.md | 1 - kubectl-kedify | 52 +------------------------------------------------- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/README.md b/README.md index 6db5bef..3db62cc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Simple TUI based shell script for installing and interfacing with Kedify. ### Core Commands -- **install, i** - Installs the Kedify agent - **delete, d** - Uninstalls the Kedify agent - **status, s** - Prints the status of Kedify agent - **logs, l** - Prints the logs of Kedify agent diff --git a/kubectl-kedify b/kubectl-kedify index 8bda822..71542b7 100755 --- a/kubectl-kedify +++ b/kubectl-kedify @@ -37,8 +37,6 @@ kedify::__resolve_script_path() { SCRIPT_PATH="$(kedify::__resolve_script_path "$0")" DIR="${DIR:-$( cd "$( dirname "${SCRIPT_PATH}" )" && pwd )}" -# API=${TEMPLATE_FILE:-"https://api.kedify.io"} -API=${TEMPLATE_FILE:-"https://api.dev.kedify.io"} AUTOSCALABLE_RESOURCE_KINDS=(ingress service virtualservice httproute) AUTOSCALABLE_RESOURCE_KIND="" TEMPLATE_FILE=${TEMPLATE_FILE:-"hso.yaml"} @@ -124,9 +122,6 @@ main() { export KUBECTL case "${1}" in - install|i) - install "$@" - ;; delete|d) delete "$@" ;; @@ -236,45 +231,6 @@ check_result() { exit 0 } -install() { - if [[ $# -gt 2 ]] && [[ "${2}" == --email ]]; then - export EMAIL="${3}" - else - # ask about email - echo "Please enter your email address:" - if [[ -n "${BASH_VERSION:-}" ]]; then - read -er EMAIL - else - read -r EMAIL - fi - export EMAIL - [[ -z $EMAIL ]] && echo "Email can't be empty" && exit 1 - fi - set +e - AGENT_ID=$(curl -s --request POST --data '{"email": "'"${EMAIL}"'","name":"cli"}' "${API}"/onboarding/create | jq -e -r '.agent_id') - retVal=$? - [ $retVal -ne 0 ] && echo "Can't create JWT token: $(curl -s --request POST --data '{"email": "'"${EMAIL}"'","name":"cli"}' "${API}"/onboarding/create|jq -C)" && exit 1 - set -e - TOKEN=$(curl -s --request POST --data '{"email": "'"${EMAIL}"'","name":"cli"}' "${API}"/onboarding/create | jq -r '.token') - if [[ $- == *i* ]] || kedify::__has_yes_flag "$@"; then - _resp="y" - else # ask only if shell is interactive or -y was passed - printf "Do you want to install Kedify on cluster %s'%s'%s\nHit 'p' for showing the manifests only." \ - "$COL" "$(kubectl config current-context)" "$RES" - echo "[y/N/p]?" - kedify::__read_single_char - _resp="${REPLY}" - fi - [[ $_resp =~ [yY] ]] && { - # here we apply the manifests - kubectl apply -f "${API}/onboarding/agent/${AGENT_ID}?token=${TOKEN}" - } - [[ $_resp =~ [pP] ]] && { - curl -s "${API}/onboarding/agent/${AGENT_ID}?token=${TOKEN}" | ${BAT} --color=always -lyaml - } - exit 0 -} - status() { clear figlet kedify status @@ -319,10 +275,9 @@ delete() { print_usage() { cat << EOF -Usage: kubectl kedify (i)nstall | (d)elete | (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | (h)elp +Usage: kubectl kedify (d)elete | (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | (h)elp Available commands: - install, i Installs the Kedify agent delete, d Uninstalls the Kedify agent logs, l Prints the logs of Kedify agent status, s Prints the status of Kedify agent @@ -336,8 +291,6 @@ Available commands: --help, -h Shows this help message Examples: - kubectl kedify install ... installs the Kedify agent in interactive mode - kubectl kedify i --email john.doe@email.com -y ... installs the Kedify agent w/o asking kubectl kedify d -y ... deletes the Kedify agent w/o asking kubectl kedify autoscale ... will ask questions kubectl kedify autoscale ingress ... will ask questions about what ingress to autoscale @@ -350,9 +303,6 @@ Examples: kubectl kedify dmp -A --archive ... collects debug info from all namespaces as tar.gz kubectl kedify dump -o /tmp/debug -n myapp ... collects debug info from specific namespace -Other env vars that can be passed: - API ... defaults to https://api.kedify.io - EOF } From b80492dbc98a8b2da5240bbfa63b07d7d466fdc5 Mon Sep 17 00:00:00 2001 From: Josef Karasek Date: Fri, 4 Sep 2026 09:20:00 +0200 Subject: [PATCH 2/5] fix Signed-off-by: Josef Karasek --- kubectl-kedify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubectl-kedify b/kubectl-kedify index 71542b7..8a6c796 100755 --- a/kubectl-kedify +++ b/kubectl-kedify @@ -275,7 +275,7 @@ delete() { print_usage() { cat << EOF -Usage: kubectl kedify (d)elete | (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | (h)elp +Usage: kubectl kedify (d)elete | (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | -h|--help Available commands: delete, d Uninstalls the Kedify agent From ef695c3bb21052bd7a07b83e1aedea0ecf001d53 Mon Sep 17 00:00:00 2001 From: Josef Karasek Date: Tue, 8 Sep 2026 13:54:16 +0200 Subject: [PATCH 3/5] fix Signed-off-by: Josef Karasek --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3db62cc..ab4a105 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # kubectl-kedify plugin -Simple TUI based shell script for installing and interfacing with Kedify. +Simple TUI based shell script for working with Kedify. [![Watch the full asciicast](./demo.gif)](https://asciinema.org/a/668253) From 5a941e4118b08f612efdb79deb5c560b35f106cf Mon Sep 17 00:00:00 2001 From: Josef Karasek Date: Tue, 8 Sep 2026 16:13:53 +0200 Subject: [PATCH 4/5] deprecate delete cmd Signed-off-by: Josef Karasek --- README.md | 1 - kubectl-kedify | 33 +-------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/README.md b/README.md index ab4a105..4a993e4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Simple TUI based shell script for working with Kedify. ### Core Commands -- **delete, d** - Uninstalls the Kedify agent - **status, s** - Prints the status of Kedify agent - **logs, l** - Prints the logs of Kedify agent - **autoscale, a** - Runs the interactive mode for creating HTTPScaledObject diff --git a/kubectl-kedify b/kubectl-kedify index 8a6c796..dab0c42 100755 --- a/kubectl-kedify +++ b/kubectl-kedify @@ -50,16 +50,6 @@ MC_SCRIPT="${DIR}/multicluster.sh" VERSION_FILE="${DIR}/VERSION" README_FILE="${DIR}/README.md" -kedify::__has_yes_flag() { - local arg="" - for arg in "$@"; do - if [[ "$arg" == "-y" || "$arg" == "--yes" ]]; then - return 0 - fi - done - return 1 -} - kedify::__read_single_char() { if [[ -n "${ZSH_VERSION:-}" ]]; then IFS= read -r -k 1 REPLY @@ -122,9 +112,6 @@ main() { export KUBECTL case "${1}" in - delete|d) - delete "$@" - ;; status|s) status ;; @@ -256,29 +243,12 @@ insights() { insights::cmd "$@" } -delete() { - if [[ $- == *i* ]] || kedify::__has_yes_flag "$@"; then - _resp="y" - else # ask only if shell is interactive or -y was passed - printf "Do you want to uninstall Kedify on cluster %s'%s'%s\n" \ - "$COL" "$(kubectl config current-context)" "$RES" - echo "[y/N]?" - kedify::__read_single_char - _resp="${REPLY}" - fi - [[ $_resp =~ [yY] ]] && { - echo -e "\nDeleting Kedify.." - "${KUBECTL}" delete kedifyconfigurations kedify -nkeda - } -} - print_usage() { cat << EOF -Usage: kubectl kedify (d)elete | (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | -h|--help +Usage: kubectl kedify (s)tatus | (a)utoscale | (mc)multicluster | (dbg)debug | (ins)ights | (dmp)dump | -h|--help Available commands: - delete, d Uninstalls the Kedify agent logs, l Prints the logs of Kedify agent status, s Prints the status of Kedify agent autoscale, a Runs the interactive mode for creating HTTPScaledObject @@ -291,7 +261,6 @@ Available commands: --help, -h Shows this help message Examples: - kubectl kedify d -y ... deletes the Kedify agent w/o asking kubectl kedify autoscale ... will ask questions kubectl kedify autoscale ingress ... will ask questions about what ingress to autoscale kubectl kedify l -f ... prints the logs of Kedify agent and follows them From 1d8742496f8d84cb4a4553e207e1ea244661e21b Mon Sep 17 00:00:00 2001 From: Josef Karasek Date: Tue, 8 Sep 2026 17:02:30 +0200 Subject: [PATCH 5/5] fix description Signed-off-by: Josef Karasek --- .krew.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.krew.yaml b/.krew.yaml index 4154d58..14818eb 100644 --- a/.krew.yaml +++ b/.krew.yaml @@ -5,9 +5,11 @@ metadata: spec: version: "v0.0.12" homepage: https://github.com/kedify/kubectl-kedify - shortDescription: "Simple TUI based shell script for installing and interfacing with Kedify." + shortDescription: "Inspect, troubleshoot, and configure autoscaling with Kedify." description: | - It asks couple of questions and fill the answers to the proper places for K8s manifests. + Provides commands for inspecting Kedify status and logs, configuring HTTP + autoscaling, managing multicluster configuration, analyzing scaling + configurations, and collecting diagnostic data. platforms: - selector: matchExpressions: