Skip to content

Commit f5c0f73

Browse files
committed
Switch v1beta2 to v1
1 parent 2694efe commit f5c0f73

17 files changed

+18657
-29
lines changed

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 18628 additions & 0 deletions
Large diffs are not rendered by default.

pkg/apis/postgres-operator.crunchydata.com/v1beta2/config_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/config_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import (
88
corev1 "k8s.io/api/core/v1"

pkg/apis/postgres-operator.crunchydata.com/v1beta2/config_types_test.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/config_types_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2_test
5+
package v1_test
66

77
import (
88
"strings"
99
"testing"
1010

11-
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta2"
11+
v1 "github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1"
1212
"gotest.tools/v3/assert"
1313
"sigs.k8s.io/yaml"
1414
)
1515

1616
func TestOptionalConfigMapKeyRefAsProjection(t *testing.T) {
1717
t.Run("Null", func(t *testing.T) {
18-
in := v1beta2.OptionalConfigMapKeyRef{}
18+
in := v1.OptionalConfigMapKeyRef{}
1919
in.Name, in.Key = "one", "two"
2020

2121
out := in.AsProjection("three")
@@ -31,7 +31,7 @@ name: one
3131

3232
t.Run("True", func(t *testing.T) {
3333
True := true
34-
in := v1beta2.OptionalConfigMapKeyRef{Optional: &True}
34+
in := v1.OptionalConfigMapKeyRef{Optional: &True}
3535
in.Name, in.Key = "one", "two"
3636

3737
out := in.AsProjection("three")
@@ -48,7 +48,7 @@ optional: true
4848

4949
t.Run("False", func(t *testing.T) {
5050
False := false
51-
in := v1beta2.OptionalConfigMapKeyRef{Optional: &False}
51+
in := v1.OptionalConfigMapKeyRef{Optional: &False}
5252
in.Name, in.Key = "one", "two"
5353

5454
out := in.AsProjection("three")
@@ -65,7 +65,7 @@ optional: false
6565
}
6666

6767
func TestConfigMapKeyRefAsProjection(t *testing.T) {
68-
in := v1beta2.ConfigMapKeyRef{Name: "asdf", Key: "foobar"}
68+
in := v1.ConfigMapKeyRef{Name: "asdf", Key: "foobar"}
6969
out := in.AsProjection("some-path")
7070

7171
b, err := yaml.Marshal(out)
@@ -80,7 +80,7 @@ name: asdf
8080

8181
func TestOptionalSecretKeyRefAsProjection(t *testing.T) {
8282
t.Run("Null", func(t *testing.T) {
83-
in := v1beta2.OptionalSecretKeyRef{}
83+
in := v1.OptionalSecretKeyRef{}
8484
in.Name, in.Key = "one", "two"
8585

8686
out := in.AsProjection("three")
@@ -96,7 +96,7 @@ name: one
9696

9797
t.Run("True", func(t *testing.T) {
9898
True := true
99-
in := v1beta2.OptionalSecretKeyRef{Optional: &True}
99+
in := v1.OptionalSecretKeyRef{Optional: &True}
100100
in.Name, in.Key = "one", "two"
101101

102102
out := in.AsProjection("three")
@@ -113,7 +113,7 @@ optional: true
113113

114114
t.Run("False", func(t *testing.T) {
115115
False := false
116-
in := v1beta2.OptionalSecretKeyRef{Optional: &False}
116+
in := v1.OptionalSecretKeyRef{Optional: &False}
117117
in.Name, in.Key = "one", "two"
118118

119119
out := in.AsProjection("three")
@@ -130,7 +130,7 @@ optional: false
130130
}
131131

132132
func TestSecretKeyRefAsProjection(t *testing.T) {
133-
in := v1beta2.SecretKeyRef{Name: "asdf", Key: "foobar"}
133+
in := v1.SecretKeyRef{Name: "asdf", Key: "foobar"}
134134
out := in.AsProjection("some-path")
135135

136136
b, err := yaml.Marshal(out)

pkg/apis/postgres-operator.crunchydata.com/v1beta2/groupversion_info.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/groupversion_info.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
// package v1beta2 contains API Schema definitions for the postgres-operator v1beta1 API group
5+
// package v1 contains API Schema definitions for the postgres-operator v1beta1 API group
66
// +kubebuilder:object:generate=true
77
// +groupName=postgres-operator.crunchydata.com
8-
package v1beta2
8+
package v1
99

1010
import (
1111
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -14,7 +14,7 @@ import (
1414

1515
var (
1616
// GroupVersion is group version used to register these objects
17-
GroupVersion = schema.GroupVersion{Group: "postgres-operator.crunchydata.com", Version: "v1beta2"}
17+
GroupVersion = schema.GroupVersion{Group: "postgres-operator.crunchydata.com", Version: "v1"}
1818

1919
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
2020
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

pkg/apis/postgres-operator.crunchydata.com/v1beta2/instrumentation_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/instrumentation_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import corev1 "k8s.io/api/core/v1"
88

pkg/apis/postgres-operator.crunchydata.com/v1beta2/patroni_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/patroni_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import "k8s.io/apimachinery/pkg/api/resource"
88

pkg/apis/postgres-operator.crunchydata.com/v1beta2/pgadmin_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/pgadmin_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import (
88
corev1 "k8s.io/api/core/v1"

pkg/apis/postgres-operator.crunchydata.com/v1beta2/pgbackrest_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/pgbackrest_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import (
88
corev1 "k8s.io/api/core/v1"

pkg/apis/postgres-operator.crunchydata.com/v1beta2/pgbouncer_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/pgbouncer_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import (
88
corev1 "k8s.io/api/core/v1"

pkg/apis/postgres-operator.crunchydata.com/v1beta2/pgmonitor_types.go renamed to pkg/apis/postgres-operator.crunchydata.com/v1/pgmonitor_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
package v1beta2
5+
package v1
66

77
import corev1 "k8s.io/api/core/v1"
88

0 commit comments

Comments
 (0)