-
Notifications
You must be signed in to change notification settings - Fork 215
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
test suites for Redis cluster #2464
Conversation
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/create.yaml
Outdated
Show resolved
Hide resolved
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/create.yaml
Outdated
Show resolved
Hide resolved
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/dependencies.yaml
Outdated
Show resolved
Hide resolved
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/update.yaml
Outdated
Show resolved
Hide resolved
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: redis.cnrm.cloud.google.com/v1 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/dependencies.yaml
Outdated
Show resolved
Hide resolved
pkg/test/resourcefixture/testdata/basic/redis/v1beta1/redisCluster/create.yaml
Outdated
Show resolved
Hide resolved
shardCount: 3 | ||
pscConfigs: | ||
- networkRef: | ||
external: projects/${projectId}/global/networks/computenetwork-${uniqueId} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 👍
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required.
networkRef: | ||
external: projects/${projectId}/global/networks/computenetwork-${uniqueId} |
There was a problem hiding this comment.
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}
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[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 |
8b3ef24
into
GoogleCloudPlatform:master
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
make ready-pr
to ensure this PR is ready for review.