mirror of
https://github.com/derailed/k9s.git
synced 2026-10-12 02:12:51 +00:00
Add context flag to keda-toggle condition (#3371)
Without having the context explicitly set, for me the condition is never met, no matter if the annotation is present or not.
This commit is contained in:
@@ -15,7 +15,7 @@ plugins:
|
||||
- |
|
||||
ANNOTATION="autoscaling.keda.sh/paused-replicas"
|
||||
|
||||
if kubectl get scaledobject $NAME -n $NAMESPACE -o yaml | grep -q "$ANNOTATION: \"0\""; then
|
||||
if kubectl get scaledobject $NAME -n $NAMESPACE --context $CONTEXT -o yaml | grep -q "$ANNOTATION: \"0\""; then
|
||||
# If annotation found, remove it
|
||||
kubectl annotate scaledobject $NAME "$ANNOTATION"- -n $NAMESPACE --context $CONTEXT >/dev/null && echo "Keda autoscaling for $NAME enabled"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user