@@ -24,19 +24,20 @@ package cmd
2424
2525import (
2626 "fmt"
27+ "log"
28+
2729 "github.com/spf13/cobra"
2830 postgresConstants "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
29- "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 "
30- apiextbeta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 "
31+ v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 "
32+ apiextv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 "
3133 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
32- "log"
3334)
3435
3536// checkCmd represent kubectl pg check.
3637var checkCmd = & cobra.Command {
3738 Use : "check" ,
3839 Short : "Checks the Postgres operator is installed in the k8s cluster" ,
39- Long : `Checks that the Postgres CRD is registered in a k8s cluster.
40+ Long : `Checks that the Postgres CRD is registered in a k8s cluster.
4041This means that the operator pod was able to start normally.` ,
4142 Run : func (cmd * cobra.Command , args []string ) {
4243 check ()
@@ -47,9 +48,9 @@ kubectl pg check
4748}
4849
4950// check validates postgresql CRD registered or not.
50- func check () * v1beta1 .CustomResourceDefinition {
51+ func check () * v1 .CustomResourceDefinition {
5152 config := getConfig ()
52- apiExtClient , err := apiextbeta1 .NewForConfig (config )
53+ apiExtClient , err := apiextv1 .NewForConfig (config )
5354 if err != nil {
5455 log .Fatal (err )
5556 }
0 commit comments