postgres-operator-examples icon indicating copy to clipboard operation
postgres-operator-examples copied to clipboard

panic: no matches for kind "CronJob" in version "batch/v1beta1"

Open wedobetter opened this issue 2 years ago • 1 comments

Helm install, the pgo deployment is crashing as follows:

time="2022-08-29T12:09:36Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.3-0
time="2022-08-29T12:09:36Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.3-0
time="2022-08-29T12:09:38Z" level=error msg="if kind is a CRD, it should be installed before calling Start" error="no matches for kind \"CronJob\" in version \"batch/v1beta1\"" file="sigs.k8s.io/[email protected]/pkg/log/deleg.go:144" func="log.(*DelegatingLogger).Error" kind=CronJob.batch version=5.1.3-0
panic: no matches for kind "CronJob" in version "batch/v1beta1"

goroutine 1 [running]:
main.assertNoError(...)
	github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:40
main.main()
	github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:100 +0x550

Kubernetes version

Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:38:15Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}

$ kc api-versions | grep batch
batch/v1

wedobetter avatar Aug 29 '22 12:08 wedobetter

My question was more about when/if K8S v1.25 will be supported

wedobetter avatar Aug 30 '22 20:08 wedobetter

i have a similar problem with my minikube kubelet v1.25 with the pgo operator v5.1.1-0

Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:38:15Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}

time="2022-09-23T11:45:05Z" level=info msg="upgrade checking enabled" file="cmd/postgres-operator/main.go:89" func=main.main version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="starting metrics server" file="sigs.k8s.io/[email protected]/pkg/manager/internal.go:385" func="manager.(*controllerManager).serveMetrics.func2" path=/metrics version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:05Z" level=info msg="{\"pgo_versions\":[{\"tag\":\"v5.1.0\"},{\"tag\":\"v5.0.5\"},{\"tag\":\"v5.0.4\"},{\"tag\":\"v5.0.3\"},{\"tag\":\"v5.0.2\"},{\"tag\":\"v5.0.1\"},{\"tag\":\"v5.0.0\"}]}" X-Crunchy-Client-Metadata="{\"deployment_id\":\"0e80c2af-f156-4a4a-8b24-7fd762e2912d\",\"kubernetes_env\":\"v1.25.0\",\"pgo_clusters_total\":1,\"pgo_version\":\"5.1.1-0\",\"is_open_shift\":false}" file="internal/upgradecheck/http.go:181" func=upgradecheck.CheckForUpgradesScheduler version=5.1.1-0
time="2022-09-23T11:45:06Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:06Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.1.1-0
time="2022-09-23T11:45:08Z" level=error msg="if kind is a CRD, it should be installed before calling Start" error="no matches for kind \"CronJob\" in version \"batch/v1beta1\"" file="sigs.k8s.io/[email protected]/pkg/log/deleg.go:144" func="log.(*DelegatingLogger).Error" kind=CronJob.batch version=5.1.1-0
panic: no matches for kind "CronJob" in version "batch/v1beta1"

goroutine 1 [running]:
main.assertNoError(...)
	github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:40
main. Main()
	github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:100 +0x550

alokhom avatar Sep 23 '22 11:09 alokhom

Same issue here with microk8s 1.25.0:

Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-09-09T07:58:52Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-09-09T07:59:32Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}

PadenZach avatar Sep 25 '22 01:09 PadenZach

Looks like this will be fixed in https://github.com/CrunchyData/postgres-operator/issues/3365

superflav avatar Sep 26 '22 22:09 superflav

@wedobetter PR https://github.com/CrunchyData/postgres-operator/pull/3370 should resolve these issues and is planned to be available in the next release.

tjmoore4 avatar Oct 03 '22 17:10 tjmoore4

@tjmoore4 How do I deploy this "next" release? I just tried to to follow the quickstart and it still fails with panic: no matches for kind "CronJob" in version "batch/v1beta1.

Could this repo also need some updates?

maaft avatar Oct 10 '22 09:10 maaft

@maaft The best option to get information on the next release is to sign up for the mailing list: https://www.crunchydata.com/developers/download-postgres/containers Once signed up, you will get emails for all new releases. Hope that helps!

tjmoore4 avatar Oct 11 '22 15:10 tjmoore4

Sounds good, but makes me wonder why you guys don't have public release branches/tags?

Any estimate when the next release will be available? Do you have any release schedule at all?

I'm just asking because I need to commit this week to an operator for postgres. And kubernetes 1.25 support would be a huge plus because I don't habe to worry about any major upgrade in the near future.

maaft avatar Oct 11 '22 17:10 maaft

5.3.0 is out, with support for 1.25

benjaminjb avatar Dec 29 '22 22:12 benjaminjb