DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
347 stars 1.02k forks source link

Datadog-operator Throwing PodDisruptionBudget policy Error #941

Closed rohit-dimagi closed 1 year ago

rohit-dimagi commented 1 year ago

Describe what happened: Datadog-Operator is throwing error after upgrade to kubernetes V1.25. policy/v1beta1 for PodDisruptionBudget has been replaced in new version. and i'm running with replicacout: 1 Installed CRDs are

datadogagents.datadoghq.com                             
datadogmetrics.datadoghq.com                                     
datadogmonitors.datadoghq.com
│ {"level":"ERROR","ts":"2023-03-09T06:05:59Z","logger":"controller-runtime.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"PodDisruptionBudget.policy","error":"no matches for kind \"PodDisruptionBudget\" in versio │
│ n \"policy/v1beta1\""}                                                                                                                                                                                                                                     │
│ {"level":"INFO","ts":"2023-03-09T06:05:59Z","logger":"controller-runtime.manager.controller.datadogmonitor","msg":"Starting workers","reconciler group":"datadoghq.com","reconciler kind":"DatadogMonitor","worker count":1}                               │
│ {"level":"ERROR","ts":"2023-03-09T06:05:59Z","logger":"controller-runtime.manager.controller.datadogagent","msg":"Could not wait for Cache to sync","reconciler group":"datadoghq.com","reconciler kind":"DatadogAgent","error":"failed to wait for datado │
│ gagent caches to sync: no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}                                                                                                                                                         │
│ {"level":"INFO","ts":"2023-03-09T06:05:59Z","logger":"controller-runtime.manager.controller.datadogmonitor","msg":"Shutdown signal received, waiting for all workers to finish","reconciler group":"datadoghq.com","reconciler kind":"DatadogMonitor"}     │
│ {"level":"INFO","ts":"2023-03-09T06:05:59Z","logger":"controller-runtime.manager.controller.datadogmonitor","msg":"All workers finished","reconciler group":"datadoghq.com","reconciler kind":"DatadogMonitor"}                                            │
│ {"level":"ERROR","ts":"2023-03-09T06:05:59Z","logger":"setup","msg":"Problem running manager","error":"failed to wait for datadogagent caches to sync: no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}

Describe what you expected: Operator pods should start normally

Additional environment details (Operating System, Cloud provider, etc): EKS: 1.25 Helm Chart Version Datadog-operator: 0.9.2 Datadog: 3.10.6

ij3net commented 1 year ago

We have same issue. EKS: 1.25 Helm Chart Version Datadog-operator: 0.9.2

{"level":"ERROR","ts":"2023-03-10T17:33:35Z","logger":"setup","msg":"Problem running manager","error":"failed to wait for datadogagent caches to sync: no matches for kind \"PodDisruptionBudget\" in version \"
policy/v1beta1\""}
rohit-dimagi commented 1 year ago

can we get some update on this or some workaround?

ij3net commented 1 year ago

can we get some update on this or some workaround?

https://github.com/DataDog/datadog-operator/issues/734#issuecomment-1466571948 works for me with image 1.0.0-rc.10 and 1.0.0-rc.12 for a two weeks stable enough. We're waiting for GA of 1.0

rohit-dimagi commented 1 year ago

Closing https://github.com/DataDog/datadog-operator/issues/619

walter-heestermans-toyota commented 1 year ago

When I try to use the fixed images

docker pull gcr.io/datadoghq/operator:1.0-pre-10 Error response from daemon: manifest for gcr.io/datadoghq/operator:1.0-pre-10 not found: manifest unknown: Failed to fetch "1.0-pre-10" from request "/v2/datadoghq/operator/manifests/1.0-pre-10".

docker pull gcr.io/datadoghq/operator:1.0-pre-12 Error response from daemon: manifest for gcr.io/datadoghq/operator:1.0-pre-12 not found: manifest unknown: Failed to fetch "1.0-pre-12" from request "/v2/datadoghq/operator/manifests/1.0-pre-12".

ij3net commented 1 year ago

docker pull gcr.io/datadoghq/operator:1.0-pre-12 Error response from daemon: manifest for gcr.io/datadoghq/operator:1.0-pre-12 not found: manifest unknown: Failed to fetch "1.0-pre-12" from request "/v2/datadoghq/operator/manifests/1.0-pre-12".

I'm very sorry for mistake :( correct image tag is 1.0.0-rc.12

walter-heestermans-toyota commented 1 year ago

Thanks, we also need --set datadogCRDs.migration.datadogAgents.version=v2alpha1 ?

ij3net commented 1 year ago

yes

CharlyF commented 1 year ago

hi all - I see this is closed but I want to make sure everyone is all set. 1.0 was released a few weeks ago, did you get a chance to try it @ij3net? @walter-heestermans-toyota, are you all set with the flag?

We tried to document this migration in the chart and in the main repo, I hope this will suffice but if you have any feedback please let us know.

ij3net commented 1 year ago

hi all - I see this is closed but I want to make sure everyone is all set. 1.0 was released a few weeks ago, did you get a chance to try it @ij3net? @walter-heestermans-toyota, are you all set with the flag?

Thank you very much for notice. I've upgraded our configuration up to 1.0.2 chart version and it's works like a charm.