giantswarm / roadmap

Giant Swarm Product Roadmap
https://github.com/orgs/giantswarm/projects/273
Apache License 2.0
3 stars 0 forks source link

Scheduler went crazy, schedules team on-call on p32 days #1967

Closed gianfranco-l closed 1 year ago

gianfranco-l commented 1 year ago

check and fix config

kubasobon commented 1 year ago
gorilla-rfjh2:thinkbook:~ k logs -n honeybadger-oncall-scheduler kuba-test-crl95 -f
INFO[2023-02-08T12:43:19.324822991Z] Client is configured with ApiUrl: api.opsgenie.com, RetryMaxCount: 4 
ERROR: logging before flag.Parse: I0208 12:43:19.531564       1 runner.go:68] Opsgenie client set up successful
ERROR: logging before flag.Parse: I0208 12:43:19.531832       1 unavailability.go:30] Google calendar client set up successful
ERROR: logging before flag.Parse: F0208 12:43:19.531898       1 main.go:16] Error: open personio-credentials.json: no such file or directory
kubasobon commented 1 year ago
gorilla-rfjh2:thinkbook:~ k get cronjob -n honeybadger-oncall-scheduler honeybadger-oncall-scheduler-0 -o yaml | grep 'image:'
            image: quay.io/giantswarm/area-oncall-scheduler:latest
kubasobon commented 1 year ago

https://github.com/giantswarm/area-oncall-scheduler/commit/22966cbf050d6bd7d7adf75e9843202afe01d7e9

kubasobon commented 1 year ago
gorilla-rfjh2:thinkbook:~ k create secret generic -n honeybadger-oncall-scheduler personio-credentials --from-file=pers/
secret/personio-credentials created
gorilla-rfjh2:thinkbook:~ k get secret -n honeybadger-oncall-scheduler personio-credentials -o yaml
apiVersion: v1
data:
  personio-credentials.json: ewogICAgImNsaWVudElkIjogIiIsCiAgICAiY2xpZW50U2VjcmV0IjogIiIKfQo=
kind: Secret
metadata:
  creationTimestamp: "2023-02-08T12:51:43Z"
  name: personio-credentials
  namespace: honeybadger-oncall-scheduler
  resourceVersion: "681995671"
  uid: 098c49e8-180e-466d-ad30-606db8d7ec26
type: Opaque
gorilla-rfjh2:thinkbook:~ k get secret -n honeybadger-oncall-scheduler personio-credentials -o yaml | yq -r '.data."personio-credentials.json"' | base64 -d
{
    "clientId": "",
    "clientSecret": ""
}
kubasobon commented 1 year ago
gorilla-rfjh2:thinkbook:~ k get pods -n honeybadger-oncall-scheduler -w
NAME                READY   STATUS             RESTARTS      AGE
kuba-test-2-krb7l   0/1     CrashLoopBackOff   4 (48s ago)   2m27s
kuba-test-3-vff45   0/1     Pending            0             0s
kuba-test-3-vff45   0/1     Pending            0             0s
kuba-test-3-vff45   0/1     ContainerCreating   0             0s
kuba-test-3-vff45   1/1     Running             0             1s
kuba-test-3-vff45   0/1     Completed           0             24s
kuba-test-3-vff45   0/1     Completed           0             26s
kubasobon commented 1 year ago

I mounted an empty personio-credentials secret with correct structure. The CronJobs will not fail now.