Skip to content

Commit c78d522

Browse files
authored
Revert "move to apiextensions from v1beta1 to v1 (zalando#746)"
This reverts commit c4d5363.
1 parent 2cc44bb commit c78d522

File tree

11 files changed

+1879
-2423
lines changed

11 files changed

+1879
-2423
lines changed

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 385 additions & 550 deletions
Large diffs are not rendered by default.

charts/postgres-operator/crds/postgresqls.yaml

Lines changed: 411 additions & 524 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1
1+
apiVersion: apiextensions.k8s.io/v1beta1
22
kind: CustomResourceDefinition
33
metadata:
44
name: postgresteams.acid.zalan.do
@@ -16,55 +16,52 @@ spec:
1616
shortNames:
1717
- pgteam
1818
scope: Namespaced
19-
versions:
20-
- name: v1
21-
served: true
22-
storage: true
23-
subresources:
24-
status: {}
25-
schema:
26-
openAPIV3Schema:
27-
type: object
28-
required:
29-
- kind
30-
- apiVersion
31-
- spec
32-
properties:
33-
kind:
34-
type: string
35-
enum:
36-
- PostgresTeam
37-
apiVersion:
38-
type: string
39-
enum:
40-
- acid.zalan.do/v1
41-
spec:
42-
type: object
43-
properties:
44-
additionalSuperuserTeams:
45-
type: object
46-
description: "Map for teamId and associated additional superuser teams"
47-
additionalProperties:
48-
type: array
49-
nullable: true
50-
description: "List of teams to become Postgres superusers"
51-
items:
52-
type: string
53-
additionalTeams:
54-
type: object
55-
description: "Map for teamId and associated additional teams"
56-
additionalProperties:
57-
type: array
58-
nullable: true
59-
description: "List of teams whose members will also be added to the Postgres cluster"
60-
items:
61-
type: string
62-
additionalMembers:
63-
type: object
64-
description: "Map for teamId and associated additional users"
65-
additionalProperties:
66-
type: array
67-
nullable: true
68-
description: "List of users who will also be added to the Postgres cluster"
69-
items:
70-
type: string
19+
subresources:
20+
status: {}
21+
version: v1
22+
validation:
23+
openAPIV3Schema:
24+
type: object
25+
required:
26+
- kind
27+
- apiVersion
28+
- spec
29+
properties:
30+
kind:
31+
type: string
32+
enum:
33+
- PostgresTeam
34+
apiVersion:
35+
type: string
36+
enum:
37+
- acid.zalan.do/v1
38+
spec:
39+
type: object
40+
properties:
41+
additionalSuperuserTeams:
42+
type: object
43+
description: "Map for teamId and associated additional superuser teams"
44+
additionalProperties:
45+
type: array
46+
nullable: true
47+
description: "List of teams to become Postgres superusers"
48+
items:
49+
type: string
50+
additionalTeams:
51+
type: object
52+
description: "Map for teamId and associated additional teams"
53+
additionalProperties:
54+
type: array
55+
nullable: true
56+
description: "List of teams whose members will also be added to the Postgres cluster"
57+
items:
58+
type: string
59+
additionalMembers:
60+
type: object
61+
description: "Map for teamId and associated additional users"
62+
additionalProperties:
63+
type: array
64+
nullable: true
65+
description: "List of users who will also be added to the Postgres cluster"
66+
items:
67+
type: string

kubectl-pg/cmd/check.go

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

2525
import (
2626
"fmt"
27-
"log"
28-
2927
"github.com/spf13/cobra"
3028
postgresConstants "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
31-
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
32-
apiextv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
29+
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
30+
apiextbeta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1"
3331
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
32+
"log"
3433
)
3534

3635
// checkCmd represent kubectl pg check.
3736
var checkCmd = &cobra.Command{
3837
Use: "check",
3938
Short: "Checks the Postgres operator is installed in the k8s cluster",
40-
Long: `Checks that the Postgres CRD is registered in a k8s cluster.
39+
Long: `Checks that the Postgres CRD is registered in a k8s cluster.
4140
This means that the operator pod was able to start normally.`,
4241
Run: func(cmd *cobra.Command, args []string) {
4342
check()
@@ -48,9 +47,9 @@ kubectl pg check
4847
}
4948

5049
// check validates postgresql CRD registered or not.
51-
func check() *v1.CustomResourceDefinition {
50+
func check() *v1beta1.CustomResourceDefinition {
5251
config := getConfig()
53-
apiExtClient, err := apiextv1.NewForConfig(config)
52+
apiExtClient, err := apiextbeta1.NewForConfig(config)
5453
if err != nil {
5554
log.Fatal(err)
5655
}

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: apps/v1
1+
apiVersion: extensions/v1beta1
22
kind: Deployment
33
metadata:
44
name: fake-teams-api

0 commit comments

Comments
 (0)