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

READY AND ACTIVE fields of ScaledJob are empty when we run "kubectl get sj" #1849

Closed
Shubham82 opened this issue Jun 1, 2021 · 4 comments · Fixed by #1855
Closed

READY AND ACTIVE fields of ScaledJob are empty when we run "kubectl get sj" #1849

Shubham82 opened this issue Jun 1, 2021 · 4 comments · Fixed by #1855
Labels
bug Something isn't working

Comments

@Shubham82
Copy link
Contributor

Report

When worked with ScaledJob i have noticed that it doesn't show the **READY** and **ACTIVE** status when we run kubectl get sj In both before and after the scaling. It always blank.

Before scaling

$ kubectl get sj
NAME          MAX   TRIGGERS   AUTHENTICATION    READY   ACTIVE   AGE
mongodb-job   100   mongodb    mongodb-trigger                    7s

After scaling

$ kubectl get sj
NAME          MAX   TRIGGERS   AUTHENTICATION    READY   ACTIVE   AGE
mongodb-job   100   mongodb    mongodb-trigger                    112s

Here is the Secrets, TriggerAuthentication and ScaledJob yamls which i have used to test it:

Secrets:

apiVersion: v1
kind: Secret
metadata:
  name: mongodb-secret
type: Opaque
data:
  connect: bW9uZ29kYjovL3Rlc3RfdXNlcjp0ZXN0X3Bhc3N3b3JkQG1vbmdvZGItc3ZjLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWw6MjcwMTcvdGVzdA==

TriggerAuthentication:

apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: mongodb-trigger
spec:
  secretTargetRef:
  - parameter: connectionString
    name: mongodb-secret
    key: connect

ScaledJob:

apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
  name: mongodb-job
spec:
  jobTargetRef:
    template:
      spec:
       containers:
       - name: pi
         image: perl
         command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
  pollingInterval: 20
  maxReplicaCount: 100
  successfulJobsHistoryLimit: 0
  failedJobsHistoryLimit: 10
  triggers:
    - type: mongodb
      metadata:
        dbName: test
        collection: test_collection
        query: '{"region":"eu-1","state":"running","plan":"planA"}'
        queryValue: "1"
        metricName: "global-metric"
      authenticationRef:
        name: mongodb-trigger

Expected Behavior

When we run kubectl get sj then it should show **READY** and **ACTIVE** status in both before and after scaling.
There status value would be: True, False, Unknown depending upon the scaling just like we have in ScaledObject.

Actual Behavior

When we run kubectl get sj then it doesn't show **READY** and **ACTIVE** status in both before and after scaling.

Steps to Reproduce the Problem

  1. Set-up minikube v1.18.1
  2. Deploy mongodb.
  3. Create secrets and TA with above yaml and apply it.
  4. Create ScaledJob with above yaml's and apply it.
  5. Check READY and ACTIVE Status before and after scaling by running kubectl get sj

Logs from KEDA operator

No error

KEDA Version

2.3.0

Kubernetes Version

1.20

Platform

Other

Scaler Details

No response

Anything else?

No response

@Shubham82 Shubham82 added the bug Something isn't working label Jun 1, 2021
@Shubham82
Copy link
Contributor Author

Shubham82 commented Jun 1, 2021

@zroubalik @tomkerkhove
could you please take a look!

If my observation is correct then I am up for it.

Thanks

@tomkerkhove
Copy link
Member

That would be great, thank you!

Are you up for also doing #1826?

@Shubham82
Copy link
Contributor Author

Thanks, @tomkerkhove for your response.
Sure I will try #1826 after this issue.

@Shubham82
Copy link
Contributor Author

Fixed it here #1855

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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants