Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaled Job doesn't work when the min replica count set to 0 #6371

Open
NareshArava opened this issue Nov 28, 2024 · 0 comments
Open

Scaled Job doesn't work when the min replica count set to 0 #6371

NareshArava opened this issue Nov 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@NareshArava
Copy link

NareshArava commented Nov 28, 2024

Report

Scaled Job doesn't work when the min replica count set to 0 while using azure devops.
If we keep minimum replicas as 0 for Scaledjob when there is pipeline triggered and it will failed with no agent issues as KEDA not able to trigger the pod(agent), but as per document even if we keep minimum as 0 it will work.

Expected Behavior

KEDA Scaledjob should scale agent pod to run the pipeline.

Actual Behavior

The pipeline failed due to no active agent pods run by KEDA.

Steps to Reproduce the Problem

1.Use the below scaledjob yaml

apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
labels:
spotinst.io/restrict-scale-down: "true"
name: azdevops-selfagent-deploy
namespace: self-agent
spec:
jobTargetRef:
template:
metadata:
labels:
spotinst.io/restrict-scale-down: "true"
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: app
operator: In
values:
- self-agent
containers:
- name: azdevops-agent-job
image: selfagent:aks-m
imagePullPolicy: Always
resources:
requests:
cpu: "5"
memory: 15Gi
ephemeral-storage: 5Gi
env:
- name: AZP_URL
valueFrom:
secretKeyRef:
key: AZP_URL
name: azdevops
- name: AZP_TOKEN
valueFrom:
secretKeyRef:
key: AZP_TOKEN
name: azdevops
- name: AZP_POOL
valueFrom:
secretKeyRef:
key: AZP_POOL
name: azdevops
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-volume
volumes:
- name: docker-volume
hostPath:
path: /var/run/docker.sock
pollingInterval: 30
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
minReplicaCount: 0
maxReplicaCount: 14
rollout:
strategy: gradual
propagationPolicy: foreground
scalingStrategy:
strategy: "default"
triggers:

  • type: azure-pipelines
    metadata:
    poolName: "AKS_DEVOPS_POOL"
    organizationURLFromEnv: "AZP_URL"
    personalAccessTokenFromEnv: "AZP_TOKEN"

Logs from KEDA operator

example

KEDA Version

2.14.1

Kubernetes Version

1.29

Platform

Other

Scaler Details

Azure pipeline

Anything else?

No response

@NareshArava NareshArava added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

1 participant