From a686824ab80e7939fdfde9df6b158fe5eeeb5e12 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Mon, 24 Jan 2022 17:19:07 +0100 Subject: [PATCH] move FES to v1 --- docs/reference/cluster_manifest.md | 2 +- hack/update-codegen.sh | 2 +- .../acid.zalan.do/v1/zz_generated.deepcopy.go | 2 +- .../{v1alpha1 => v1}/fabriceventstream.go | 2 +- .../zalando.org/{v1alpha1 => v1}/register.go | 4 +- .../{v1alpha1 => v1}/zz_generated.deepcopy.go | 2 +- pkg/cluster/streams.go | 42 +++++++-------- pkg/cluster/streams_test.go | 28 +++++----- .../clientset/versioned/clientset.go | 22 ++++---- pkg/generated/clientset/versioned/doc.go | 2 +- .../versioned/fake/clientset_generated.go | 12 ++--- pkg/generated/clientset/versioned/fake/doc.go | 2 +- .../clientset/versioned/fake/register.go | 6 +-- .../clientset/versioned/scheme/doc.go | 2 +- .../clientset/versioned/scheme/register.go | 6 +-- .../acid.zalan.do/v1/acid.zalan.do_client.go | 2 +- .../versioned/typed/acid.zalan.do/v1/doc.go | 2 +- .../typed/acid.zalan.do/v1/fake/doc.go | 2 +- .../v1/fake/fake_acid.zalan.do_client.go | 2 +- .../v1/fake/fake_operatorconfiguration.go | 2 +- .../acid.zalan.do/v1/fake/fake_postgresql.go | 2 +- .../v1/fake/fake_postgresteam.go | 2 +- .../acid.zalan.do/v1/generated_expansion.go | 2 +- .../acid.zalan.do/v1/operatorconfiguration.go | 2 +- .../typed/acid.zalan.do/v1/postgresql.go | 2 +- .../typed/acid.zalan.do/v1/postgresteam.go | 2 +- .../typed/zalando.org/{v1alpha1 => v1}/doc.go | 4 +- .../{v1alpha1 => v1}/fabriceventstream.go | 52 +++++++++---------- .../zalando.org/{v1alpha1 => v1}/fake/doc.go | 2 +- .../fake/fake_fabriceventstream.go | 46 ++++++++-------- .../fake/fake_zalando.org_client.go | 10 ++-- .../{v1alpha1 => v1}/generated_expansion.go | 4 +- .../{v1alpha1 => v1}/zalando.org_client.go | 34 ++++++------ .../acid.zalan.do/interface.go | 2 +- .../acid.zalan.do/v1/interface.go | 2 +- .../acid.zalan.do/v1/postgresql.go | 2 +- .../acid.zalan.do/v1/postgresteam.go | 2 +- .../informers/externalversions/factory.go | 2 +- .../informers/externalversions/generic.go | 10 ++-- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/zalando.org/interface.go | 14 ++--- .../{v1alpha1 => v1}/fabriceventstream.go | 28 +++++----- .../zalando.org/{v1alpha1 => v1}/interface.go | 4 +- .../acid.zalan.do/v1/expansion_generated.go | 2 +- .../listers/acid.zalan.do/v1/postgresql.go | 2 +- .../listers/acid.zalan.do/v1/postgresteam.go | 2 +- .../{v1alpha1 => v1}/expansion_generated.go | 4 +- .../{v1alpha1 => v1}/fabriceventstream.go | 26 +++++----- pkg/util/k8sutil/k8sutil.go | 14 ++--- pkg/util/patroni/patroni_test.go | 6 +-- 50 files changed, 217 insertions(+), 217 deletions(-) rename pkg/apis/zalando.org/{v1alpha1 => v1}/fabriceventstream.go (99%) rename pkg/apis/zalando.org/{v1alpha1 => v1}/register.go (96%) rename pkg/apis/zalando.org/{v1alpha1 => v1}/zz_generated.deepcopy.go (99%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/doc.go (95%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/fabriceventstream.go (71%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/fake/doc.go (97%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/fake/fake_fabriceventstream.go (73%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/fake/fake_zalando.org_client.go (80%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/generated_expansion.go (95%) rename pkg/generated/clientset/versioned/typed/zalando.org/{v1alpha1 => v1}/zalando.org_client.go (67%) rename pkg/generated/informers/externalversions/zalando.org/{v1alpha1 => v1}/fabriceventstream.go (78%) rename pkg/generated/informers/externalversions/zalando.org/{v1alpha1 => v1}/interface.go (97%) rename pkg/generated/listers/zalando.org/{v1alpha1 => v1}/expansion_generated.go (96%) rename pkg/generated/listers/zalando.org/{v1alpha1 => v1}/fabriceventstream.go (82%) diff --git a/docs/reference/cluster_manifest.md b/docs/reference/cluster_manifest.md index 0079d76d6..07b03ec9f 100644 --- a/docs/reference/cluster_manifest.md +++ b/docs/reference/cluster_manifest.md @@ -538,7 +538,7 @@ have the following properties: Name of the database from where events will be published via Postgres' logical decoding feature. The operator will take care of updating the database configuration (setting `wal_level: logical`, creating logical - replication slots, using output plugin `wal2json` and creating a dedicated + replication slots, using output plugin `pgoutput` and creating a dedicated replication user). Required. * **tables** diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index eb7da7ced..d34db9c45 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -17,7 +17,7 @@ trap "cleanup" EXIT SIGINT bash "${CODEGEN_PKG}/generate-groups.sh" all \ "${OPERATOR_PACKAGE_ROOT}/pkg/generated" "${OPERATOR_PACKAGE_ROOT}/pkg/apis" \ - "acid.zalan.do:v1 zalando.org:v1alpha1" \ + "acid.zalan.do:v1 zalando.org:v1" \ --go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt cp -r "${OPERATOR_PACKAGE_ROOT}"/pkg/* "${TARGET_CODE_DIR}" diff --git a/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go b/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go index f5c669d9e..42a701fd0 100644 --- a/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go +++ b/pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/apis/zalando.org/v1alpha1/fabriceventstream.go b/pkg/apis/zalando.org/v1/fabriceventstream.go similarity index 99% rename from pkg/apis/zalando.org/v1alpha1/fabriceventstream.go rename to pkg/apis/zalando.org/v1/fabriceventstream.go index 2ef0b6405..7990d7700 100644 --- a/pkg/apis/zalando.org/v1alpha1/fabriceventstream.go +++ b/pkg/apis/zalando.org/v1/fabriceventstream.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/apis/zalando.org/v1alpha1/register.go b/pkg/apis/zalando.org/v1/register.go similarity index 96% rename from pkg/apis/zalando.org/v1alpha1/register.go rename to pkg/apis/zalando.org/v1/register.go index 0136a82ec..33a2c718b 100644 --- a/pkg/apis/zalando.org/v1alpha1/register.go +++ b/pkg/apis/zalando.org/v1/register.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "github.com/zalando/postgres-operator/pkg/apis/zalando.org" @@ -10,7 +10,7 @@ import ( // APIVersion of the `fabriceventstream` CRD const ( - APIVersion = "v1alpha1" + APIVersion = "v1" ) var ( diff --git a/pkg/apis/zalando.org/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/zalando.org/v1/zz_generated.deepcopy.go similarity index 99% rename from pkg/apis/zalando.org/v1alpha1/zz_generated.deepcopy.go rename to pkg/apis/zalando.org/v1/zz_generated.deepcopy.go index 0327279e5..a44439a94 100644 --- a/pkg/apis/zalando.org/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/zalando.org/v1/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ SOFTWARE. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/cluster/streams.go b/pkg/cluster/streams.go index 101d350db..7053aeb20 100644 --- a/pkg/cluster/streams.go +++ b/pkg/cluster/streams.go @@ -7,7 +7,7 @@ import ( "strings" acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandov1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" "github.com/zalando/postgres-operator/pkg/util" "github.com/zalando/postgres-operator/pkg/util/constants" "github.com/zalando/postgres-operator/pkg/util/k8sutil" @@ -18,7 +18,7 @@ func (c *Cluster) createStreams(appId string) { c.setProcessName("creating streams") var ( - fes *zalandov1alpha1.FabricEventStream + fes *zalandov1.FabricEventStream err error ) @@ -34,7 +34,7 @@ func (c *Cluster) createStreams(appId string) { } } -func (c *Cluster) updateStreams(newEventStreams *zalandov1alpha1.FabricEventStream) error { +func (c *Cluster) updateStreams(newEventStreams *zalandov1.FabricEventStream) error { c.setProcessName("updating event streams") _, err := c.KubeClient.FabricEventStreams(newEventStreams.Namespace).Update(context.TODO(), newEventStreams, metav1.UpdateOptions{}) @@ -84,7 +84,7 @@ func (c *Cluster) syncPostgresConfig() error { for _, stream := range c.Spec.Streams { slot := map[string]string{ "database": stream.Database, - "plugin": "wal2json", + "plugin": "pgoutput", "type": "logical", } slotName := constants.EventStreamSourceSlotPrefix + "_" + stream.Database + "_" + stream.ApplicationId @@ -128,8 +128,8 @@ func (c *Cluster) syncPostgresConfig() error { return nil } -func (c *Cluster) generateFabricEventStream(appId string) *zalandov1alpha1.FabricEventStream { - eventStreams := make([]zalandov1alpha1.EventStream, 0) +func (c *Cluster) generateFabricEventStream(appId string) *zalandov1.FabricEventStream { + eventStreams := make([]zalandov1.EventStream, 0) for _, stream := range c.Spec.Streams { if stream.ApplicationId != appId { @@ -140,17 +140,17 @@ func (c *Cluster) generateFabricEventStream(appId string) *zalandov1alpha1.Fabri streamFlow := getEventStreamFlow(stream, table.PayloadColumn) streamSink := getEventStreamSink(stream, table.EventType) - eventStreams = append(eventStreams, zalandov1alpha1.EventStream{ + eventStreams = append(eventStreams, zalandov1.EventStream{ EventStreamFlow: streamFlow, EventStreamSink: streamSink, EventStreamSource: streamSource}) } } - return &zalandov1alpha1.FabricEventStream{ + return &zalandov1.FabricEventStream{ TypeMeta: metav1.TypeMeta{ Kind: constants.EventStreamSourceCRDKind, - APIVersion: "zalando.org/v1alpha1", + APIVersion: "zalando.org/v1", }, ObjectMeta: metav1.ObjectMeta{ Name: c.Name + "-" + appId, @@ -159,17 +159,17 @@ func (c *Cluster) generateFabricEventStream(appId string) *zalandov1alpha1.Fabri // make cluster StatefulSet the owner (like with connection pooler objects) OwnerReferences: c.ownerReferences(), }, - Spec: zalandov1alpha1.FabricEventStreamSpec{ + Spec: zalandov1.FabricEventStreamSpec{ ApplicationId: appId, EventStreams: eventStreams, }, } } -func (c *Cluster) getEventStreamSource(stream acidv1.Stream, tableName, idColumn string) zalandov1alpha1.EventStreamSource { +func (c *Cluster) getEventStreamSource(stream acidv1.Stream, tableName, idColumn string) zalandov1.EventStreamSource { table, schema := getTableSchema(tableName) streamFilter := stream.Filter[tableName] - return zalandov1alpha1.EventStreamSource{ + return zalandov1.EventStreamSource{ Type: constants.EventStreamSourcePGType, Schema: schema, EventStreamTable: getOutboxTable(table, idColumn), @@ -181,15 +181,15 @@ func (c *Cluster) getEventStreamSource(stream acidv1.Stream, tableName, idColumn } } -func getEventStreamFlow(stream acidv1.Stream, payloadColumn string) zalandov1alpha1.EventStreamFlow { - return zalandov1alpha1.EventStreamFlow{ +func getEventStreamFlow(stream acidv1.Stream, payloadColumn string) zalandov1.EventStreamFlow { + return zalandov1.EventStreamFlow{ Type: constants.EventStreamFlowPgGenericType, PayloadColumn: payloadColumn, } } -func getEventStreamSink(stream acidv1.Stream, eventType string) zalandov1alpha1.EventStreamSink { - return zalandov1alpha1.EventStreamSink{ +func getEventStreamSink(stream acidv1.Stream, eventType string) zalandov1.EventStreamSink { + return zalandov1.EventStreamSink{ Type: constants.EventStreamSinkNakadiType, EventType: eventType, MaxBatchSize: stream.BatchSize, @@ -207,18 +207,18 @@ func getTableSchema(fullTableName string) (tableName, schemaName string) { return tableName, schemaName } -func getOutboxTable(tableName, idColumn string) zalandov1alpha1.EventStreamTable { - return zalandov1alpha1.EventStreamTable{ +func getOutboxTable(tableName, idColumn string) zalandov1.EventStreamTable { + return zalandov1.EventStreamTable{ Name: tableName, IDColumn: idColumn, } } -func (c *Cluster) getStreamConnection(database, user, appId string) zalandov1alpha1.Connection { - return zalandov1alpha1.Connection{ +func (c *Cluster) getStreamConnection(database, user, appId string) zalandov1.Connection { + return zalandov1.Connection{ Url: fmt.Sprintf("jdbc:postgresql://%s.%s/%s?user=%s&ssl=true&sslmode=require", c.Name, c.Namespace, database, user), SlotName: constants.EventStreamSourceSlotPrefix + "_" + database + "_" + strings.Replace(appId, "-", "_", -1), - DBAuth: zalandov1alpha1.DBAuth{ + DBAuth: zalandov1.DBAuth{ Type: constants.EventStreamSourceAuthType, Name: c.credentialSecretNameForCluster(user, c.Name), UserKey: "username", diff --git a/pkg/cluster/streams_test.go b/pkg/cluster/streams_test.go index 99bf333a4..27d3e91f3 100644 --- a/pkg/cluster/streams_test.go +++ b/pkg/cluster/streams_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" - "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" - fakezalandov1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/fake" + v1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" + fakezalandov1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/fake" "github.com/zalando/postgres-operator/pkg/util" "github.com/zalando/postgres-operator/pkg/util/config" "github.com/zalando/postgres-operator/pkg/util/constants" @@ -24,11 +24,11 @@ import ( ) func newFakeK8sStreamClient() (k8sutil.KubernetesClient, *fake.Clientset) { - zalandoClientSet := fakezalandov1alpha1.NewSimpleClientset() + zalandoClientSet := fakezalandov1.NewSimpleClientset() clientSet := fake.NewSimpleClientset() return k8sutil.KubernetesClient{ - FabricEventStreamsGetter: zalandoClientSet.ZalandoV1alpha1(), + FabricEventStreamsGetter: zalandoClientSet.ZalandoV1(), PostgresqlsGetter: zalandoClientSet.AcidV1(), PodsGetter: clientSet.CoreV1(), StatefulSetsGetter: clientSet.AppsV1(), @@ -79,10 +79,10 @@ var ( }, } - fes = &v1alpha1.FabricEventStream{ + fes = &v1.FabricEventStream{ TypeMeta: metav1.TypeMeta{ Kind: "FabricEventStream", - APIVersion: "zalando.org/v1alpha1", + APIVersion: "zalando.org/v1", }, ObjectMeta: metav1.ObjectMeta{ Name: fesName, @@ -96,23 +96,23 @@ var ( }, }, }, - Spec: v1alpha1.FabricEventStreamSpec{ + Spec: v1.FabricEventStreamSpec{ ApplicationId: appId, - EventStreams: []v1alpha1.EventStream{ + EventStreams: []v1.EventStream{ { - EventStreamFlow: v1alpha1.EventStreamFlow{ + EventStreamFlow: v1.EventStreamFlow{ PayloadColumn: "b_payload", Type: constants.EventStreamFlowPgGenericType, }, - EventStreamSink: v1alpha1.EventStreamSink{ + EventStreamSink: v1.EventStreamSink{ EventType: "stream_type_a", MaxBatchSize: uint32(100), Type: constants.EventStreamSinkNakadiType, }, - EventStreamSource: v1alpha1.EventStreamSource{ + EventStreamSource: v1.EventStreamSource{ Filter: "[?(@.source.txId > 500 && @.source.lsn > 123456)]", - Connection: v1alpha1.Connection{ - DBAuth: v1alpha1.DBAuth{ + Connection: v1.Connection{ + DBAuth: v1.DBAuth{ Name: fmt.Sprintf("fes-user.%s.credentials.postgresql.acid.zalan.do", clusterName), PasswordKey: "password", Type: constants.EventStreamSourceAuthType, @@ -122,7 +122,7 @@ var ( SlotName: fmt.Sprintf("%s_%s_%s", constants.EventStreamSourceSlotPrefix, dbName, strings.Replace(appId, "-", "_", -1)), }, Schema: "data", - EventStreamTable: v1alpha1.EventStreamTable{ + EventStreamTable: v1.EventStreamTable{ IDColumn: "b_id", Name: "bar", }, diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go index 3d6282a0a..50f0ac841 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/pkg/generated/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28,7 +28,7 @@ import ( "fmt" acidv1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1" + zalandov1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -37,15 +37,15 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface AcidV1() acidv1.AcidV1Interface - ZalandoV1alpha1() zalandov1alpha1.ZalandoV1alpha1Interface + ZalandoV1() zalandov1.ZalandoV1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - acidV1 *acidv1.AcidV1Client - zalandoV1alpha1 *zalandov1alpha1.ZalandoV1alpha1Client + acidV1 *acidv1.AcidV1Client + zalandoV1 *zalandov1.ZalandoV1Client } // AcidV1 retrieves the AcidV1Client @@ -53,9 +53,9 @@ func (c *Clientset) AcidV1() acidv1.AcidV1Interface { return c.acidV1 } -// ZalandoV1alpha1 retrieves the ZalandoV1alpha1Client -func (c *Clientset) ZalandoV1alpha1() zalandov1alpha1.ZalandoV1alpha1Interface { - return c.zalandoV1alpha1 +// ZalandoV1 retrieves the ZalandoV1Client +func (c *Clientset) ZalandoV1() zalandov1.ZalandoV1Interface { + return c.zalandoV1 } // Discovery retrieves the DiscoveryClient @@ -83,7 +83,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.zalandoV1alpha1, err = zalandov1alpha1.NewForConfig(&configShallowCopy) + cs.zalandoV1, err = zalandov1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -100,7 +100,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.acidV1 = acidv1.NewForConfigOrDie(c) - cs.zalandoV1alpha1 = zalandov1alpha1.NewForConfigOrDie(c) + cs.zalandoV1 = zalandov1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -110,7 +110,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.acidV1 = acidv1.New(c) - cs.zalandoV1alpha1 = zalandov1alpha1.New(c) + cs.zalandoV1 = zalandov1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/generated/clientset/versioned/doc.go b/pkg/generated/clientset/versioned/doc.go index ae87609f6..ebb4ab535 100644 --- a/pkg/generated/clientset/versioned/doc.go +++ b/pkg/generated/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go index 49e891b58..4c94d23a6 100644 --- a/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28,8 +28,8 @@ import ( clientset "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" acidv1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1" fakeacidv1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1" - fakezalandov1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake" + zalandov1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1" + fakezalandov1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -92,7 +92,7 @@ func (c *Clientset) AcidV1() acidv1.AcidV1Interface { return &fakeacidv1.FakeAcidV1{Fake: &c.Fake} } -// ZalandoV1alpha1 retrieves the ZalandoV1alpha1Client -func (c *Clientset) ZalandoV1alpha1() zalandov1alpha1.ZalandoV1alpha1Interface { - return &fakezalandov1alpha1.FakeZalandoV1alpha1{Fake: &c.Fake} +// ZalandoV1 retrieves the ZalandoV1Client +func (c *Clientset) ZalandoV1() zalandov1.ZalandoV1Interface { + return &fakezalandov1.FakeZalandoV1{Fake: &c.Fake} } diff --git a/pkg/generated/clientset/versioned/fake/doc.go b/pkg/generated/clientset/versioned/fake/doc.go index bc1c91a11..b9e99ecf2 100644 --- a/pkg/generated/clientset/versioned/fake/doc.go +++ b/pkg/generated/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go index b022f3e76..313eeacc2 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26,7 +26,7 @@ package fake import ( acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandov1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +39,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ acidv1.AddToScheme, - zalandov1alpha1.AddToScheme, + zalandov1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/generated/clientset/versioned/scheme/doc.go b/pkg/generated/clientset/versioned/scheme/doc.go index cd594164b..387784624 100644 --- a/pkg/generated/clientset/versioned/scheme/doc.go +++ b/pkg/generated/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/scheme/register.go b/pkg/generated/clientset/versioned/scheme/register.go index 5fc5886ea..823909bcb 100644 --- a/pkg/generated/clientset/versioned/scheme/register.go +++ b/pkg/generated/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26,7 +26,7 @@ package scheme import ( acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandov1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +39,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ acidv1.AddToScheme, - zalandov1alpha1.AddToScheme, + zalandov1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/acid.zalan.do_client.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/acid.zalan.do_client.go index 5666201d4..d36078922 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/acid.zalan.do_client.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/acid.zalan.do_client.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/doc.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/doc.go index eb8fcf1f4..ba729b8ca 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/doc.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/doc.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/doc.go index c5fd1c04b..380725443 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_acid.zalan.do_client.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_acid.zalan.do_client.go index 03e7dda94..c235b2761 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_acid.zalan.do_client.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_acid.zalan.do_client.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_operatorconfiguration.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_operatorconfiguration.go index c03ea7d94..fbea4930c 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_operatorconfiguration.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_operatorconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresql.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresql.go index 01a0ed7a4..cb39ea290 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresql.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresql.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresteam.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresteam.go index b333ae046..59cf600aa 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresteam.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/fake/fake_postgresteam.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/generated_expansion.go index b4e99cbc8..a40f2bdb0 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/operatorconfiguration.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/operatorconfiguration.go index be22e075d..a73fb0df6 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/operatorconfiguration.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/operatorconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresql.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresql.go index 5241cfb54..c58ed03ed 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresql.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresql.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresteam.go b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresteam.go index 96fbb882a..002254ef1 100644 --- a/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresteam.go +++ b/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1/postgresteam.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/doc.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/doc.go similarity index 95% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/doc.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/doc.go index a9896a348..ba729b8ca 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/doc.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,4 +23,4 @@ SOFTWARE. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1 diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fabriceventstream.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fabriceventstream.go similarity index 71% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fabriceventstream.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/fabriceventstream.go index ec93fe65a..26c3431f2 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fabriceventstream.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fabriceventstream.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,15 +22,15 @@ SOFTWARE. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" "time" - v1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + v1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" scheme "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -44,14 +44,14 @@ type FabricEventStreamsGetter interface { // FabricEventStreamInterface has methods to work with FabricEventStream resources. type FabricEventStreamInterface interface { - Create(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.CreateOptions) (*v1alpha1.FabricEventStream, error) - Update(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.UpdateOptions) (*v1alpha1.FabricEventStream, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.FabricEventStream, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FabricEventStreamList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricEventStream, err error) + Create(ctx context.Context, fabricEventStream *v1.FabricEventStream, opts metav1.CreateOptions) (*v1.FabricEventStream, error) + Update(ctx context.Context, fabricEventStream *v1.FabricEventStream, opts metav1.UpdateOptions) (*v1.FabricEventStream, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.FabricEventStream, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.FabricEventStreamList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FabricEventStream, err error) FabricEventStreamExpansion } @@ -62,7 +62,7 @@ type fabricEventStreams struct { } // newFabricEventStreams returns a FabricEventStreams -func newFabricEventStreams(c *ZalandoV1alpha1Client, namespace string) *fabricEventStreams { +func newFabricEventStreams(c *ZalandoV1Client, namespace string) *fabricEventStreams { return &fabricEventStreams{ client: c.RESTClient(), ns: namespace, @@ -70,8 +70,8 @@ func newFabricEventStreams(c *ZalandoV1alpha1Client, namespace string) *fabricEv } // Get takes name of the fabricEventStream, and returns the corresponding fabricEventStream object, and an error if there is any. -func (c *fabricEventStreams) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FabricEventStream, err error) { - result = &v1alpha1.FabricEventStream{} +func (c *fabricEventStreams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.FabricEventStream, err error) { + result = &v1.FabricEventStream{} err = c.client.Get(). Namespace(c.ns). Resource("fabriceventstreams"). @@ -83,12 +83,12 @@ func (c *fabricEventStreams) Get(ctx context.Context, name string, options v1.Ge } // List takes label and field selectors, and returns the list of FabricEventStreams that match those selectors. -func (c *fabricEventStreams) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FabricEventStreamList, err error) { +func (c *fabricEventStreams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FabricEventStreamList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.FabricEventStreamList{} + result = &v1.FabricEventStreamList{} err = c.client.Get(). Namespace(c.ns). Resource("fabriceventstreams"). @@ -100,7 +100,7 @@ func (c *fabricEventStreams) List(ctx context.Context, opts v1.ListOptions) (res } // Watch returns a watch.Interface that watches the requested fabricEventStreams. -func (c *fabricEventStreams) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *fabricEventStreams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -115,8 +115,8 @@ func (c *fabricEventStreams) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a fabricEventStream and creates it. Returns the server's representation of the fabricEventStream, and an error, if there is any. -func (c *fabricEventStreams) Create(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.CreateOptions) (result *v1alpha1.FabricEventStream, err error) { - result = &v1alpha1.FabricEventStream{} +func (c *fabricEventStreams) Create(ctx context.Context, fabricEventStream *v1.FabricEventStream, opts metav1.CreateOptions) (result *v1.FabricEventStream, err error) { + result = &v1.FabricEventStream{} err = c.client.Post(). Namespace(c.ns). Resource("fabriceventstreams"). @@ -128,8 +128,8 @@ func (c *fabricEventStreams) Create(ctx context.Context, fabricEventStream *v1al } // Update takes the representation of a fabricEventStream and updates it. Returns the server's representation of the fabricEventStream, and an error, if there is any. -func (c *fabricEventStreams) Update(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.UpdateOptions) (result *v1alpha1.FabricEventStream, err error) { - result = &v1alpha1.FabricEventStream{} +func (c *fabricEventStreams) Update(ctx context.Context, fabricEventStream *v1.FabricEventStream, opts metav1.UpdateOptions) (result *v1.FabricEventStream, err error) { + result = &v1.FabricEventStream{} err = c.client.Put(). Namespace(c.ns). Resource("fabriceventstreams"). @@ -142,7 +142,7 @@ func (c *fabricEventStreams) Update(ctx context.Context, fabricEventStream *v1al } // Delete takes name of the fabricEventStream and deletes it. Returns an error if one occurs. -func (c *fabricEventStreams) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *fabricEventStreams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("fabriceventstreams"). @@ -153,7 +153,7 @@ func (c *fabricEventStreams) Delete(ctx context.Context, name string, opts v1.De } // DeleteCollection deletes a collection of objects. -func (c *fabricEventStreams) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *fabricEventStreams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration if listOpts.TimeoutSeconds != nil { timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second @@ -169,8 +169,8 @@ func (c *fabricEventStreams) DeleteCollection(ctx context.Context, opts v1.Delet } // Patch applies the patch and returns the patched fabricEventStream. -func (c *fabricEventStreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricEventStream, err error) { - result = &v1alpha1.FabricEventStream{} +func (c *fabricEventStreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FabricEventStream, err error) { + result = &v1.FabricEventStream{} err = c.client.Patch(pt). Namespace(c.ns). Resource("fabriceventstreams"). diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/doc.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/doc.go similarity index 97% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/doc.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/doc.go index c5fd1c04b..380725443 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_fabriceventstream.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_fabriceventstream.go similarity index 73% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_fabriceventstream.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_fabriceventstream.go index 9fd2485de..8d76e06de 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_fabriceventstream.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_fabriceventstream.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27,7 +27,7 @@ package fake import ( "context" - v1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandoorgv1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -38,29 +38,29 @@ import ( // FakeFabricEventStreams implements FabricEventStreamInterface type FakeFabricEventStreams struct { - Fake *FakeZalandoV1alpha1 + Fake *FakeZalandoV1 ns string } -var fabriceventstreamsResource = schema.GroupVersionResource{Group: "zalando.org", Version: "v1alpha1", Resource: "fabriceventstreams"} +var fabriceventstreamsResource = schema.GroupVersionResource{Group: "zalando.org", Version: "v1", Resource: "fabriceventstreams"} -var fabriceventstreamsKind = schema.GroupVersionKind{Group: "zalando.org", Version: "v1alpha1", Kind: "FabricEventStream"} +var fabriceventstreamsKind = schema.GroupVersionKind{Group: "zalando.org", Version: "v1", Kind: "FabricEventStream"} // Get takes name of the fabricEventStream, and returns the corresponding fabricEventStream object, and an error if there is any. -func (c *FakeFabricEventStreams) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FabricEventStream, err error) { +func (c *FakeFabricEventStreams) Get(ctx context.Context, name string, options v1.GetOptions) (result *zalandoorgv1.FabricEventStream, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(fabriceventstreamsResource, c.ns, name), &v1alpha1.FabricEventStream{}) + Invokes(testing.NewGetAction(fabriceventstreamsResource, c.ns, name), &zalandoorgv1.FabricEventStream{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.FabricEventStream), err + return obj.(*zalandoorgv1.FabricEventStream), err } // List takes label and field selectors, and returns the list of FabricEventStreams that match those selectors. -func (c *FakeFabricEventStreams) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FabricEventStreamList, err error) { +func (c *FakeFabricEventStreams) List(ctx context.Context, opts v1.ListOptions) (result *zalandoorgv1.FabricEventStreamList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(fabriceventstreamsResource, fabriceventstreamsKind, c.ns, opts), &v1alpha1.FabricEventStreamList{}) + Invokes(testing.NewListAction(fabriceventstreamsResource, fabriceventstreamsKind, c.ns, opts), &zalandoorgv1.FabricEventStreamList{}) if obj == nil { return nil, err @@ -70,8 +70,8 @@ func (c *FakeFabricEventStreams) List(ctx context.Context, opts v1.ListOptions) if label == nil { label = labels.Everything() } - list := &v1alpha1.FabricEventStreamList{ListMeta: obj.(*v1alpha1.FabricEventStreamList).ListMeta} - for _, item := range obj.(*v1alpha1.FabricEventStreamList).Items { + list := &zalandoorgv1.FabricEventStreamList{ListMeta: obj.(*zalandoorgv1.FabricEventStreamList).ListMeta} + for _, item := range obj.(*zalandoorgv1.FabricEventStreamList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -87,31 +87,31 @@ func (c *FakeFabricEventStreams) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a fabricEventStream and creates it. Returns the server's representation of the fabricEventStream, and an error, if there is any. -func (c *FakeFabricEventStreams) Create(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.CreateOptions) (result *v1alpha1.FabricEventStream, err error) { +func (c *FakeFabricEventStreams) Create(ctx context.Context, fabricEventStream *zalandoorgv1.FabricEventStream, opts v1.CreateOptions) (result *zalandoorgv1.FabricEventStream, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(fabriceventstreamsResource, c.ns, fabricEventStream), &v1alpha1.FabricEventStream{}) + Invokes(testing.NewCreateAction(fabriceventstreamsResource, c.ns, fabricEventStream), &zalandoorgv1.FabricEventStream{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.FabricEventStream), err + return obj.(*zalandoorgv1.FabricEventStream), err } // Update takes the representation of a fabricEventStream and updates it. Returns the server's representation of the fabricEventStream, and an error, if there is any. -func (c *FakeFabricEventStreams) Update(ctx context.Context, fabricEventStream *v1alpha1.FabricEventStream, opts v1.UpdateOptions) (result *v1alpha1.FabricEventStream, err error) { +func (c *FakeFabricEventStreams) Update(ctx context.Context, fabricEventStream *zalandoorgv1.FabricEventStream, opts v1.UpdateOptions) (result *zalandoorgv1.FabricEventStream, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(fabriceventstreamsResource, c.ns, fabricEventStream), &v1alpha1.FabricEventStream{}) + Invokes(testing.NewUpdateAction(fabriceventstreamsResource, c.ns, fabricEventStream), &zalandoorgv1.FabricEventStream{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.FabricEventStream), err + return obj.(*zalandoorgv1.FabricEventStream), err } // Delete takes name of the fabricEventStream and deletes it. Returns an error if one occurs. func (c *FakeFabricEventStreams) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(fabriceventstreamsResource, c.ns, name), &v1alpha1.FabricEventStream{}) + Invokes(testing.NewDeleteAction(fabriceventstreamsResource, c.ns, name), &zalandoorgv1.FabricEventStream{}) return err } @@ -120,17 +120,17 @@ func (c *FakeFabricEventStreams) Delete(ctx context.Context, name string, opts v func (c *FakeFabricEventStreams) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(fabriceventstreamsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.FabricEventStreamList{}) + _, err := c.Fake.Invokes(action, &zalandoorgv1.FabricEventStreamList{}) return err } // Patch applies the patch and returns the patched fabricEventStream. -func (c *FakeFabricEventStreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricEventStream, err error) { +func (c *FakeFabricEventStreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *zalandoorgv1.FabricEventStream, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(fabriceventstreamsResource, c.ns, name, pt, data, subresources...), &v1alpha1.FabricEventStream{}) + Invokes(testing.NewPatchSubresourceAction(fabriceventstreamsResource, c.ns, name, pt, data, subresources...), &zalandoorgv1.FabricEventStream{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.FabricEventStream), err + return obj.(*zalandoorgv1.FabricEventStream), err } diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_zalando.org_client.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go similarity index 80% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_zalando.org_client.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go index f8583cae9..17786c9a7 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/fake/fake_zalando.org_client.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,22 +25,22 @@ SOFTWARE. package fake import ( - v1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1" + v1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeZalandoV1alpha1 struct { +type FakeZalandoV1 struct { *testing.Fake } -func (c *FakeZalandoV1alpha1) FabricEventStreams(namespace string) v1alpha1.FabricEventStreamInterface { +func (c *FakeZalandoV1) FabricEventStreams(namespace string) v1.FabricEventStreamInterface { return &FakeFabricEventStreams{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeZalandoV1alpha1) RESTClient() rest.Interface { +func (c *FakeZalandoV1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/generated_expansion.go similarity index 95% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/generated_expansion.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/generated_expansion.go index 89c4f1d5d..6a776af84 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,6 +22,6 @@ SOFTWARE. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 type FabricEventStreamExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/zalando.org_client.go b/pkg/generated/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go similarity index 67% rename from pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/zalando.org_client.go rename to pkg/generated/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go index 56436b2f4..937fd6b7e 100644 --- a/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1/zalando.org_client.go +++ b/pkg/generated/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,30 +22,30 @@ SOFTWARE. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + v1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type ZalandoV1alpha1Interface interface { +type ZalandoV1Interface interface { RESTClient() rest.Interface FabricEventStreamsGetter } -// ZalandoV1alpha1Client is used to interact with features provided by the zalando.org group. -type ZalandoV1alpha1Client struct { +// ZalandoV1Client is used to interact with features provided by the zalando.org group. +type ZalandoV1Client struct { restClient rest.Interface } -func (c *ZalandoV1alpha1Client) FabricEventStreams(namespace string) FabricEventStreamInterface { +func (c *ZalandoV1Client) FabricEventStreams(namespace string) FabricEventStreamInterface { return newFabricEventStreams(c, namespace) } -// NewForConfig creates a new ZalandoV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*ZalandoV1alpha1Client, error) { +// NewForConfig creates a new ZalandoV1Client for the given config. +func NewForConfig(c *rest.Config) (*ZalandoV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -54,12 +54,12 @@ func NewForConfig(c *rest.Config) (*ZalandoV1alpha1Client, error) { if err != nil { return nil, err } - return &ZalandoV1alpha1Client{client}, nil + return &ZalandoV1Client{client}, nil } -// NewForConfigOrDie creates a new ZalandoV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ZalandoV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ZalandoV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ZalandoV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -67,13 +67,13 @@ func NewForConfigOrDie(c *rest.Config) *ZalandoV1alpha1Client { return client } -// New creates a new ZalandoV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *ZalandoV1alpha1Client { - return &ZalandoV1alpha1Client{c} +// New creates a new ZalandoV1Client for the given RESTClient. +func New(c rest.Interface) *ZalandoV1Client { + return &ZalandoV1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -87,7 +87,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ZalandoV1alpha1Client) RESTClient() rest.Interface { +func (c *ZalandoV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/generated/informers/externalversions/acid.zalan.do/interface.go b/pkg/generated/informers/externalversions/acid.zalan.do/interface.go index 6f77564fa..b2b85d87d 100644 --- a/pkg/generated/informers/externalversions/acid.zalan.do/interface.go +++ b/pkg/generated/informers/externalversions/acid.zalan.do/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/acid.zalan.do/v1/interface.go b/pkg/generated/informers/externalversions/acid.zalan.do/v1/interface.go index 5c05e6d68..347c53f99 100644 --- a/pkg/generated/informers/externalversions/acid.zalan.do/v1/interface.go +++ b/pkg/generated/informers/externalversions/acid.zalan.do/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresql.go b/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresql.go index 1453af276..61d88fb22 100644 --- a/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresql.go +++ b/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresql.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresteam.go b/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresteam.go index a19e4726f..eb15e4fad 100644 --- a/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresteam.go +++ b/pkg/generated/informers/externalversions/acid.zalan.do/v1/postgresteam.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go index b3938ec74..0842aa5ae 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/pkg/generated/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index a58a2ec24..afa4c6ac2 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28,7 +28,7 @@ import ( "fmt" v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" - v1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandoorgv1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -65,9 +65,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1.SchemeGroupVersion.WithResource("postgresqls"): return &genericInformer{resource: resource.GroupResource(), informer: f.Acid().V1().Postgresqls().Informer()}, nil - // Group=zalando.org, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("fabriceventstreams"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Zalando().V1alpha1().FabricEventStreams().Informer()}, nil + // Group=zalando.org, Version=v1 + case zalandoorgv1.SchemeGroupVersion.WithResource("fabriceventstreams"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Zalando().V1().FabricEventStreams().Informer()}, nil } diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go index 6d1b334bf..1046f8f48 100644 --- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/informers/externalversions/zalando.org/interface.go b/pkg/generated/informers/externalversions/zalando.org/interface.go index c8cb52a09..afece8ac3 100644 --- a/pkg/generated/informers/externalversions/zalando.org/interface.go +++ b/pkg/generated/informers/externalversions/zalando.org/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26,13 +26,13 @@ package zalando import ( internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/zalando.org/v1alpha1" + v1 "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/zalando.org/v1" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface } type group struct { @@ -46,7 +46,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/pkg/generated/informers/externalversions/zalando.org/v1alpha1/fabriceventstream.go b/pkg/generated/informers/externalversions/zalando.org/v1/fabriceventstream.go similarity index 78% rename from pkg/generated/informers/externalversions/zalando.org/v1alpha1/fabriceventstream.go rename to pkg/generated/informers/externalversions/zalando.org/v1/fabriceventstream.go index 7d29d716d..13733e1d1 100644 --- a/pkg/generated/informers/externalversions/zalando.org/v1alpha1/fabriceventstream.go +++ b/pkg/generated/informers/externalversions/zalando.org/v1/fabriceventstream.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,17 +22,17 @@ SOFTWARE. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" time "time" - zalandoorgv1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + zalandoorgv1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" versioned "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/zalando/postgres-operator/pkg/generated/listers/zalando.org/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/zalando/postgres-operator/pkg/generated/listers/zalando.org/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" @@ -42,7 +42,7 @@ import ( // FabricEventStreams. type FabricEventStreamInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.FabricEventStreamLister + Lister() v1.FabricEventStreamLister } type fabricEventStreamInformer struct { @@ -64,20 +64,20 @@ func NewFabricEventStreamInformer(client versioned.Interface, namespace string, func NewFilteredFabricEventStreamInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1alpha1().FabricEventStreams(namespace).List(context.TODO(), options) + return client.ZalandoV1().FabricEventStreams(namespace).List(context.TODO(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ZalandoV1alpha1().FabricEventStreams(namespace).Watch(context.TODO(), options) + return client.ZalandoV1().FabricEventStreams(namespace).Watch(context.TODO(), options) }, }, - &zalandoorgv1alpha1.FabricEventStream{}, + &zalandoorgv1.FabricEventStream{}, resyncPeriod, indexers, ) @@ -88,9 +88,9 @@ func (f *fabricEventStreamInformer) defaultInformer(client versioned.Interface, } func (f *fabricEventStreamInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&zalandoorgv1alpha1.FabricEventStream{}, f.defaultInformer) + return f.factory.InformerFor(&zalandoorgv1.FabricEventStream{}, f.defaultInformer) } -func (f *fabricEventStreamInformer) Lister() v1alpha1.FabricEventStreamLister { - return v1alpha1.NewFabricEventStreamLister(f.Informer().GetIndexer()) +func (f *fabricEventStreamInformer) Lister() v1.FabricEventStreamLister { + return v1.NewFabricEventStreamLister(f.Informer().GetIndexer()) } diff --git a/pkg/generated/informers/externalversions/zalando.org/v1alpha1/interface.go b/pkg/generated/informers/externalversions/zalando.org/v1/interface.go similarity index 97% rename from pkg/generated/informers/externalversions/zalando.org/v1alpha1/interface.go rename to pkg/generated/informers/externalversions/zalando.org/v1/interface.go index 7815569a2..329f15503 100644 --- a/pkg/generated/informers/externalversions/zalando.org/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/zalando.org/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ SOFTWARE. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( internalinterfaces "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/internalinterfaces" diff --git a/pkg/generated/listers/acid.zalan.do/v1/expansion_generated.go b/pkg/generated/listers/acid.zalan.do/v1/expansion_generated.go index cc3e578b2..3189f5948 100644 --- a/pkg/generated/listers/acid.zalan.do/v1/expansion_generated.go +++ b/pkg/generated/listers/acid.zalan.do/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/listers/acid.zalan.do/v1/postgresql.go b/pkg/generated/listers/acid.zalan.do/v1/postgresql.go index d2258bd01..650f8d579 100644 --- a/pkg/generated/listers/acid.zalan.do/v1/postgresql.go +++ b/pkg/generated/listers/acid.zalan.do/v1/postgresql.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/listers/acid.zalan.do/v1/postgresteam.go b/pkg/generated/listers/acid.zalan.do/v1/postgresteam.go index 38073e92d..c63b8da58 100644 --- a/pkg/generated/listers/acid.zalan.do/v1/postgresteam.go +++ b/pkg/generated/listers/acid.zalan.do/v1/postgresteam.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pkg/generated/listers/zalando.org/v1alpha1/expansion_generated.go b/pkg/generated/listers/zalando.org/v1/expansion_generated.go similarity index 96% rename from pkg/generated/listers/zalando.org/v1alpha1/expansion_generated.go rename to pkg/generated/listers/zalando.org/v1/expansion_generated.go index 16438da8b..5a90e7828 100644 --- a/pkg/generated/listers/zalando.org/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/zalando.org/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ SOFTWARE. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1 // FabricEventStreamListerExpansion allows custom methods to be added to // FabricEventStreamLister. diff --git a/pkg/generated/listers/zalando.org/v1alpha1/fabriceventstream.go b/pkg/generated/listers/zalando.org/v1/fabriceventstream.go similarity index 82% rename from pkg/generated/listers/zalando.org/v1alpha1/fabriceventstream.go rename to pkg/generated/listers/zalando.org/v1/fabriceventstream.go index 244d11bbf..b4c895c74 100644 --- a/pkg/generated/listers/zalando.org/v1alpha1/fabriceventstream.go +++ b/pkg/generated/listers/zalando.org/v1/fabriceventstream.go @@ -1,5 +1,5 @@ /* -Copyright 2021 Compose, Zalando SE +Copyright 2022 Compose, Zalando SE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,10 +22,10 @@ SOFTWARE. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1alpha1" + v1 "github.com/zalando/postgres-operator/pkg/apis/zalando.org/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -36,7 +36,7 @@ import ( type FabricEventStreamLister interface { // List lists all FabricEventStreams in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.FabricEventStream, err error) + List(selector labels.Selector) (ret []*v1.FabricEventStream, err error) // FabricEventStreams returns an object that can list and get FabricEventStreams. FabricEventStreams(namespace string) FabricEventStreamNamespaceLister FabricEventStreamListerExpansion @@ -53,9 +53,9 @@ func NewFabricEventStreamLister(indexer cache.Indexer) FabricEventStreamLister { } // List lists all FabricEventStreams in the indexer. -func (s *fabricEventStreamLister) List(selector labels.Selector) (ret []*v1alpha1.FabricEventStream, err error) { +func (s *fabricEventStreamLister) List(selector labels.Selector) (ret []*v1.FabricEventStream, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.FabricEventStream)) + ret = append(ret, m.(*v1.FabricEventStream)) }) return ret, err } @@ -70,10 +70,10 @@ func (s *fabricEventStreamLister) FabricEventStreams(namespace string) FabricEve type FabricEventStreamNamespaceLister interface { // List lists all FabricEventStreams in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.FabricEventStream, err error) + List(selector labels.Selector) (ret []*v1.FabricEventStream, err error) // Get retrieves the FabricEventStream from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.FabricEventStream, error) + Get(name string) (*v1.FabricEventStream, error) FabricEventStreamNamespaceListerExpansion } @@ -85,21 +85,21 @@ type fabricEventStreamNamespaceLister struct { } // List lists all FabricEventStreams in the indexer for a given namespace. -func (s fabricEventStreamNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.FabricEventStream, err error) { +func (s fabricEventStreamNamespaceLister) List(selector labels.Selector) (ret []*v1.FabricEventStream, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.FabricEventStream)) + ret = append(ret, m.(*v1.FabricEventStream)) }) return ret, err } // Get retrieves the FabricEventStream from the indexer for a given namespace and name. -func (s fabricEventStreamNamespaceLister) Get(name string) (*v1alpha1.FabricEventStream, error) { +func (s fabricEventStreamNamespaceLister) Get(name string) (*v1.FabricEventStream, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("fabriceventstream"), name) + return nil, errors.NewNotFound(v1.Resource("fabriceventstream"), name) } - return obj.(*v1alpha1.FabricEventStream), nil + return obj.(*v1.FabricEventStream), nil } diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index 67192dd21..0897777ee 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -14,7 +14,7 @@ import ( apiacidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" zalandoclient "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" acidv1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/acid.zalan.do/v1" - zalandov1alpha1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1alpha1" + zalandov1 "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned/typed/zalando.org/v1" "github.com/zalando/postgres-operator/pkg/spec" apiappsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" @@ -59,11 +59,11 @@ type KubernetesClient struct { acidv1.OperatorConfigurationsGetter acidv1.PostgresTeamsGetter acidv1.PostgresqlsGetter - zalandov1alpha1.FabricEventStreamsGetter + zalandov1.FabricEventStreamsGetter - RESTClient rest.Interface - AcidV1ClientSet *zalandoclient.Clientset - ZalandoV1Alpha1ClientSet *zalandoclient.Clientset + RESTClient rest.Interface + AcidV1ClientSet *zalandoclient.Clientset + Zalandov1ClientSet *zalandoclient.Clientset } type mockSecret struct { @@ -165,7 +165,7 @@ func NewFromConfig(cfg *rest.Config) (KubernetesClient, error) { if err != nil { return kubeClient, fmt.Errorf("could not create acid.zalan.do clientset: %v", err) } - kubeClient.ZalandoV1Alpha1ClientSet = zalandoclient.NewForConfigOrDie(cfg) + kubeClient.Zalandov1ClientSet = zalandoclient.NewForConfigOrDie(cfg) if err != nil { return kubeClient, fmt.Errorf("could not create zalando.org clientset: %v", err) } @@ -173,7 +173,7 @@ func NewFromConfig(cfg *rest.Config) (KubernetesClient, error) { kubeClient.OperatorConfigurationsGetter = kubeClient.AcidV1ClientSet.AcidV1() kubeClient.PostgresTeamsGetter = kubeClient.AcidV1ClientSet.AcidV1() kubeClient.PostgresqlsGetter = kubeClient.AcidV1ClientSet.AcidV1() - kubeClient.FabricEventStreamsGetter = kubeClient.ZalandoV1Alpha1ClientSet.ZalandoV1alpha1() + kubeClient.FabricEventStreamsGetter = kubeClient.Zalandov1ClientSet.ZalandoV1() return kubeClient, nil } diff --git a/pkg/util/patroni/patroni_test.go b/pkg/util/patroni/patroni_test.go index 5a6b2657c..aa9d1e732 100644 --- a/pkg/util/patroni/patroni_test.go +++ b/pkg/util/patroni/patroni_test.go @@ -136,7 +136,7 @@ func TestGetConfig(t *testing.T) { Slots: map[string]map[string]string{ "cdc": { "database": "foo", - "plugin": "wal2json", + "plugin": "pgoutput", "type": "logical", }, }, @@ -169,7 +169,7 @@ func TestGetConfig(t *testing.T) { "wal_log_hints": "on", } - configJson := `{"loop_wait": 10, "maximum_lag_on_failover": 33554432, "postgresql": {"parameters": {"archive_mode": "on", "archive_timeout": "1800s", "autovacuum_analyze_scale_factor": 0.02, "autovacuum_max_workers": 5, "autovacuum_vacuum_scale_factor": 0.05, "checkpoint_completion_target": 0.9, "hot_standby": "on", "log_autovacuum_min_duration": 0, "log_checkpoints": "on", "log_connections": "on", "log_disconnections": "on", "log_line_prefix": "%t [%p]: [%l-1] %c %x %d %u %a %h ", "log_lock_waits": "on", "log_min_duration_statement": 500, "log_statement": "ddl", "log_temp_files": 0, "max_connections": 100, "max_replication_slots": 10, "max_wal_senders": 10, "tcp_keepalives_idle": 900, "tcp_keepalives_interval": 100, "track_functions": "all", "wal_level": "hot_standby", "wal_log_hints": "on"}, "use_pg_rewind": true, "use_slots": true}, "retry_timeout": 10, "slots": {"cdc": {"database": "foo", "plugin": "wal2json", "type": "logical"}}, "ttl": 30}` + configJson := `{"loop_wait": 10, "maximum_lag_on_failover": 33554432, "postgresql": {"parameters": {"archive_mode": "on", "archive_timeout": "1800s", "autovacuum_analyze_scale_factor": 0.02, "autovacuum_max_workers": 5, "autovacuum_vacuum_scale_factor": 0.05, "checkpoint_completion_target": 0.9, "hot_standby": "on", "log_autovacuum_min_duration": 0, "log_checkpoints": "on", "log_connections": "on", "log_disconnections": "on", "log_line_prefix": "%t [%p]: [%l-1] %c %x %d %u %a %h ", "log_lock_waits": "on", "log_min_duration_statement": 500, "log_statement": "ddl", "log_temp_files": 0, "max_connections": 100, "max_replication_slots": 10, "max_wal_senders": 10, "tcp_keepalives_idle": 900, "tcp_keepalives_interval": 100, "track_functions": "all", "wal_level": "hot_standby", "wal_log_hints": "on"}, "use_pg_rewind": true, "use_slots": true}, "retry_timeout": 10, "slots": {"cdc": {"database": "foo", "plugin": "pgoutput", "type": "logical"}}, "ttl": 30}` r := ioutil.NopCloser(bytes.NewReader([]byte(configJson))) response := http.Response{ @@ -204,7 +204,7 @@ func TestSetPostgresParameters(t *testing.T) { "wal_level": "logical", } - configJson := `{"loop_wait": 10, "maximum_lag_on_failover": 33554432, "postgresql": {"parameters": {"archive_mode": "on", "archive_timeout": "1800s", "autovacuum_analyze_scale_factor": 0.02, "autovacuum_max_workers": 5, "autovacuum_vacuum_scale_factor": 0.05, "checkpoint_completion_target": 0.9, "hot_standby": "on", "log_autovacuum_min_duration": 0, "log_checkpoints": "on", "log_connections": "on", "log_disconnections": "on", "log_line_prefix": "%t [%p]: [%l-1] %c %x %d %u %a %h ", "log_lock_waits": "on", "log_min_duration_statement": 500, "log_statement": "ddl", "log_temp_files": 0, "max_connections": 50, "max_replication_slots": 10, "max_wal_senders": 10, "tcp_keepalives_idle": 900, "tcp_keepalives_interval": 100, "track_functions": "all", "wal_level": "logical", "wal_log_hints": "on"}, "use_pg_rewind": true, "use_slots": true}, "retry_timeout": 10, "slots": {"cdc": {"database": "foo", "plugin": "wal2json", "type": "logical"}}, "ttl": 30}` + configJson := `{"loop_wait": 10, "maximum_lag_on_failover": 33554432, "postgresql": {"parameters": {"archive_mode": "on", "archive_timeout": "1800s", "autovacuum_analyze_scale_factor": 0.02, "autovacuum_max_workers": 5, "autovacuum_vacuum_scale_factor": 0.05, "checkpoint_completion_target": 0.9, "hot_standby": "on", "log_autovacuum_min_duration": 0, "log_checkpoints": "on", "log_connections": "on", "log_disconnections": "on", "log_line_prefix": "%t [%p]: [%l-1] %c %x %d %u %a %h ", "log_lock_waits": "on", "log_min_duration_statement": 500, "log_statement": "ddl", "log_temp_files": 0, "max_connections": 50, "max_replication_slots": 10, "max_wal_senders": 10, "tcp_keepalives_idle": 900, "tcp_keepalives_interval": 100, "track_functions": "all", "wal_level": "logical", "wal_log_hints": "on"}, "use_pg_rewind": true, "use_slots": true}, "retry_timeout": 10, "slots": {"cdc": {"database": "foo", "plugin": "pgoutput", "type": "logical"}}, "ttl": 30}` r := ioutil.NopCloser(bytes.NewReader([]byte(configJson))) response := http.Response{