Skip to content

Commit ce80e5b

Browse files
committed
move to apiextensions from v1beta1 to v1
1 parent d09e418 commit ce80e5b

File tree

9 files changed

+2302
-1735
lines changed

9 files changed

+2302
-1735
lines changed

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 542 additions & 377 deletions
Large diffs are not rendered by default.

charts/postgres-operator/crds/postgresqls.yaml

Lines changed: 525 additions & 403 deletions
Large diffs are not rendered by default.

kubectl-pg/cmd/check.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ package cmd
2424

2525
import (
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.
3637
var 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.
4041
This 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
}

manifests/fake-teams-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: fake-teams-api

0 commit comments

Comments
 (0)