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

Update Sample Test for SpannerInstance #4270

Merged
Merged
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 @@ -16,6 +16,8 @@ apiVersion: spanner.cnrm.cloud.google.com/v1beta1
kind: SpannerInstance
metadata:
name: bigqueryconnection-dep
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
config: regional-us-west1
displayName: BigQueryConnection Dependency
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ apiVersion: spanner.cnrm.cloud.google.com/v1beta1
kind: SpannerInstance
metadata:
name: spannerdatabase-dep
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
config: regional-us-west1
displayName: Spanner Database Dependency
2 changes: 1 addition & 1 deletion pkg/controller/direct/spanner/instance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (r *InstanceReconcileGate) ShouldReconcile(o *unstructured.Unstructured) bo
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(o.Object, &obj); err != nil {
return false
}
return obj.Spec.DefaultBackupScheduleType != nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh...

return obj.Spec.DefaultBackupScheduleType != nil || obj.Spec.Labels != nil
}

func NewSpannerInstanceModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@ apiVersion: spanner.cnrm.cloud.google.com/v1beta1
kind: SpannerInstance
metadata:
name: bigqueryconnection-dep
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
config: regional-us-west1
displayName: BigQueryConnection Dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ apiVersion: spanner.cnrm.cloud.google.com/v1beta1
kind: SpannerInstance
metadata:
name: spannerdatabase-dep
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
config: regional-us-west1
displayName: Spanner Database Dependency
Expand Down
Loading