Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Backport Add cross-region replication support to AlloyDB #1421

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ spec:
- startTimes
type: object
type: object
clusterType:
description: 'Immutable. The type of cluster. If not set, defaults
to PRIMARY. Default value: "PRIMARY" Possible values: ["PRIMARY",
"SECONDARY"].'
type: string
continuousBackupConfig:
description: |-
The continuous backup config for this cluster.
Expand Down Expand Up @@ -505,6 +510,19 @@ spec:
- clusterRef
- pointInTime
type: object
secondaryConfig:
description: Configuration of the secondary cluster for Cross Region
Replication. This should be set if and only if the cluster is of
type SECONDARY.
properties:
primaryClusterName:
description: |-
Immutable. Name of the primary cluster must be in the format
'projects/{project}/locations/{location}/clusters/{cluster_id}'.
type: string
required:
- primaryClusterName
type: object
required:
- location
- projectRef
Expand Down Expand Up @@ -796,6 +814,11 @@ spec:
- startTimes
type: object
type: object
clusterType:
description: 'Immutable. The type of cluster. If not set, defaults
to PRIMARY. Default value: "PRIMARY" Possible values: ["PRIMARY",
"SECONDARY"].'
type: string
continuousBackupConfig:
description: |-
The continuous backup config for this cluster.
Expand Down Expand Up @@ -1123,6 +1146,19 @@ spec:
- clusterRef
- pointInTime
type: object
secondaryConfig:
description: Configuration of the secondary cluster for Cross Region
Replication. This should be set if and only if the cluster is of
type SECONDARY.
properties:
primaryClusterName:
description: |-
Immutable. Name of the primary cluster must be in the format
'projects/{project}/locations/{location}/clusters/{cluster_id}'.
type: string
required:
- primaryClusterName
type: object
required:
- location
- projectRef
Expand Down
3 changes: 1 addition & 2 deletions config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ import (
"testing"
"time"

"gopkg.in/dnaeon/go-vcr.v3/recorder"

"github.com/go-logr/logr"
transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
cloudresourcemanagerv1 "google.golang.org/api/cloudresourcemanager/v1"
"google.golang.org/api/option"
"gopkg.in/dnaeon/go-vcr.v3/recorder"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
Expand Down
14 changes: 14 additions & 0 deletions pkg/clients/generated/apis/alloydb/v1beta1/alloydbcluster_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pkg/controller/registration/registration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/client"
crcontroller "sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/handler"
Expand Down Expand Up @@ -183,7 +182,7 @@ func registerDefaultController(r *ReconcileRegistration, config *controller.Conf
}
return schemaUpdater, nil
default:
klog.Warningf("requested direct reconciler for %v, but it is not supported", gvk.GroupKind())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what/why this changed.

return nil, fmt.Errorf("requested direct reconciler for %v, but it is not supported", gvk.GroupKind())
}
}

Expand Down
Loading
Loading