datadog-operator: policy/v1beta1 no longer available in K8S 1.25

Output of the info page (if this is a bug)

{"level":"ERROR","ts":"2022-09-28T19:38:58Z","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 happened: The operator is failing due to a deprecated API version.

Describe what you expected: The operator to start

Steps to reproduce the issue: Helm install operator on a 1.25.x cluster

Additional environment details (Operating System, Cloud provider, etc): KOPS deployed cluster on AWS

This appears to be the only non v1 used in the code base. The v1 has been available since 1.21, and that version of K8S is already marked as EOL. It does mean limiting the backward support of the operator to some extent.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 21 (9 by maintainers)

Most upvoted comments

Great to hear @celenechang

Is there a rough ETA or potential workaround until then?

@levan-m The workaround throws new errors and the operator still cannot start:

{“level”:“ERROR”,“ts”:“2023-03-19T07:35:53Z”,“logger”:“klog”,“msg”:“Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)\ngoroutine 666 [running]:\nk8s.io/apimachinery/pkg/util/runtime.logPanic({0x195e040?, 0x2ce1c60})\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/runtime/runtime.go:74 +0x86\nk8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x73?})\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/runtime/runtime.go:48 +0x75\npanic({0x195e040, 0x2ce1c60})\n\t/usr/local/go/src/runtime/panic.go:838 +0x207\ngithub.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).getCredentialsV2(0xc0003acc30?, 0xc0003acb00)\n\t/workspace/pkg/controller/utils/datadog/metrics_forwarder.go:611 +0x69\ngithub.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).setupV2(0xc000437dc0)\n\t/workspace/pkg/controller/utils/datadog/metrics_forwarder.go:261 +0x24f\ngithub.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).connectToDatadogAPI(0xc000437dc0)\n\t/workspace/pkg/controller/utils/datadog/metrics_forwarder.go:303 +0x58\nk8s.io/apimachinery/pkg/util/wait.ConditionFunc.WithContext.func1({0x18, 0xc000680800})\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:220 +0x1b\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext({0x1e887b0?, 0xc000838680?}, 0xc0001d5dd0?)\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:233 +0x57\nk8s.io/apimachinery/pkg/util/wait.poll({0x1e887b0, 0xc000838680}, 0x10?, 0xf4a905?, 0xc0009fe570?)\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:580 +0x38\nk8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext({0x1e887b0, 0xc000838680}, 0x10?, 0xc000680800?)\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:545 +0x49\nk8s.io/apimachinery/pkg/util/wait.PollImmediateUntil(0xc000437dc0?, 0xc000a42480?, 0x0?)\n\t/go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:536 +0x7c\ngithub.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).start(0xc000437dc0, 0x0?)\n\t/workspace/pkg/controller/utils/datadog/metrics_forwarder.go:165 +0x10c\ncreated by github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*ForwardersManager).Register\n\t/workspace/pkg/controller/utils/datadog/forwarders_manager.go:69 +0x365\n”} 29 panic: runtime error: invalid memory address or nil pointer dereference [recovered] 28 panic: runtime error: invalid memory address or nil pointer dereference 27 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13e5029] 26 25 goroutine 666 [running]: 24 k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x73?}) 23 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/runtime/runtime.go:55 +0xd8 22 panic({0x195e040, 0x2ce1c60}) 21 /usr/local/go/src/runtime/panic.go:838 +0x207 20 github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).getCredentialsV2(0xc0003acc30?, 0xc0003acb00) 19 /workspace/pkg/controller/utils/datadog/metrics_forwarder.go:611 +0x69 18 github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).setupV2(0xc000437dc0) 17 /workspace/pkg/controller/utils/datadog/metrics_forwarder.go:261 +0x24f 16 github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).connectToDatadogAPI(0xc000437dc0) 15 /workspace/pkg/controller/utils/datadog/metrics_forwarder.go:303 +0x58 14 k8s.io/apimachinery/pkg/util/wait.ConditionFunc.WithContext.func1({0x18, 0xc000680800}) 13 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:220 +0x1b 12 k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext({0x1e887b0?, 0xc000838680?}, 0xc0001d5dd0?) 11 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:233 +0x57 10 k8s.io/apimachinery/pkg/util/wait.poll({0x1e887b0, 0xc000838680}, 0x10?, 0xf4a905?, 0xc0009fe570?) 9 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:580 +0x38 8 k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext({0x1e887b0, 0xc000838680}, 0x10?, 0xc000680800?) 7 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:545 +0x49 6 k8s.io/apimachinery/pkg/util/wait.PollImmediateUntil(0xc000437dc0?, 0xc000a42480?, 0x0?) 5 /go/pkg/mod/k8s.io/apimachinery@v0.23.5/pkg/util/wait/wait.go:536 +0x7c 4 github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*metricsForwarder).start(0xc000437dc0, 0x0?) 3 /workspace/pkg/controller/utils/datadog/metrics_forwarder.go:165 +0x10c 2 created by github.com/DataDog/datadog-operator/pkg/controller/utils/datadog.(*ForwardersManager).Register 1 /workspace/pkg/controller/utils/datadog/forwarders_manager.go:69 +0x365

Any update on this topic?