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

test suites for Redis cluster #2464

Merged

Conversation

himanikh
Copy link
Contributor

@himanikh himanikh commented Aug 9, 2024

Change description

Basic and full test suites for Redis cluster

Tests you have done

make fmt

khimani@khimani:~/KCC/k8s-config-connector$ kubectl apply -f pkg/test/resourcefixture/testdata/basic/redis/v1beta1/basicrediscluster/create.yaml
rediscluster.redis.cnrm.cloud.google.com/rediscluster configured

khimani@khimani:~/KCC/k8s-config-connector$ kubectl apply -f pkg/test/resourcefixture/testdata/basic/redis/v1beta1/fullrediscluster/create.yaml
rediscluster.redis.cnrm.cloud.google.com/rediscluster configured

kubectl apply -f crds/compute_v1beta1_computenetwork.yaml
kubectl apply -f crds/compute_v1beta1_computesubnetwork.yaml
kubectl apply -f crds/networkconnectivity_v1alpha1_networkconnectivityserviceconnectionpolicy.yaml
kubectl apply -f pkg/test/resourcefixture/testdata/basic/redis/v1beta1/basicrediscluster/dependencies.yaml

computenetwork.compute.cnrm.cloud.google.com/computenetwork unchanged
computesubnetwork.compute.cnrm.cloud.google.com/computesubnetwork unchanged
networkconnectivityserviceconnectionpolicy.networkconnectivity.cnrm.cloud.google.com/scp created

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: redis.cnrm.cloud.google.com/v1
Copy link
Collaborator

Choose a reason for hiding this comment

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

The version should be v1alpha1.
So we fully control the release of the ConfigConnector versions and it has to start from Alpha. Right now, v1beta1 means stable to ConfigConnector users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the rediscluster version to v1alpha1 and left the dependencies version as is considering those are already stable. Is that the correct way?

@himanikh himanikh changed the title Basic test suite for Redis cluster test suites for Redis cluster Aug 13, 2024
shardCount: 3
pscConfigs:
- networkRef:
external: projects/${projectId}/global/networks/computenetwork-${uniqueId}
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's good to mix external and name references for the sake of coverage, though personally I do think the name form is much easier :-)

projectRef:
external: ${projectId}
replicaCount: 2
nodeType: REDIS_STANDARD_SMALL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome - great to see the "full" test here 👍

@justinsb
Copy link
Collaborator

LGTM - and we should be getting more mockgcp coverage with #2445 , though I have no objection to this merging first!

location: us-central1
projectRef:
external: ${projectId}
pscConfigs:
Copy link
Collaborator

Choose a reason for hiding this comment

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

qq: Is the network an required or an optional field?
If it is optional (default to network "default"), suggest not providing this field here and remove the dependencies.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's required.

Comment on lines +34 to +35
networkRef:
external: projects/${projectId}/global/networks/computenetwork-${uniqueId}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a blocker (but just a marker)
We want to flatten the *Ref.external style in status. The CRD shall be changed (since it's alpha) to network: projects/${projectId}/global/networks/computenetwork-${uniqueId}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, do we want to add the status.observedState? @justinsb

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Aug 14, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 8b3ef24 into GoogleCloudPlatform:master Aug 14, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants