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

feat(redis): add Redis Cluster support #623

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rickard-von-essen
Copy link

Description of your changes

This adds support for google_redis_cluster Terraform resource, see Terraform - Google - redis_cluster.

Replaces #513

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary. N/A

How has this code been tested

I have tested, create, import, update, and delete of a Memorystore Redis Cluster. And also verified that the AdditionalConnectionDetailsFn functions.

$ kubectl get clusters.redis.gcp.upbound.io
NAME              SYNCED   READY   EXTERNAL-NAME     AGE
crossplane-test   True     True    crossplane-test   9m45s

One odd thing is that examples-generated/redis/v1beta1/cluster.yaml contains:

 zoneDistributionConfig:
  - mode: MULTI_ZONE

But it has to be changed to:

  zoneDistributionConfig:
    mode: MULTI_ZONE

Otherwise the apply fails.

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/redis/v1beta1/cluster.yaml"

This adds support for google_redis_cluster Terraform resource, see
https://registry.terraform.io/providers/hashicorp/google/5.39.1/docs/resources/redis_cluster

Signed-off-by: Rickard von Essen <[email protected]>
@jeanduplessis
Copy link
Collaborator

/test-examples="examples/redis/v1beta1/cluster.yaml"

@rickard-von-essen rickard-von-essen force-pushed the feature/redis-cluster branch 2 times, most recently from 3bd57da to a8884e1 Compare September 26, 2024 07:33
Signed-off-by: Rickard von Essen <[email protected]>
@rickard-von-essen
Copy link
Author

@jeanduplessis Could I get a final (hopefully) /test-example... on this 🙏🏻

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/redis/v1beta1/cluster.yaml"

@rickard-von-essen
Copy link
Author

Fails because of missing prerequisite Service Connection Policy. Which I started on in #624 but Upjet fails to correctly generate a References 😢

 logger.go:42: 07:44:25 | case/0-apply |       message: 'async create failed: failed to create the resource: [***0 Error waiting
    logger.go:42: 07:44:25 | case/0-apply |         to create Cluster: Error waiting for Creating Cluster: Error code 9, message:
    logger.go:42: 07:44:25 | case/0-apply |         Invalid resource state for "projects/official-provider-testing/locations/us-central1/clusters/cluster-ha":
    logger.go:42: 07:44:25 | case/0-apply |         No service connection policy is associated with project: official-provider-testing,
    logger.go:42: 07:44:25 | case/0-apply |         network: projects/official-provider-testing/global/networks/producer-net,
    logger.go:42: 07:44:25 | case/0-apply |         region: us-central1. Create a service connection policy following https://cloud.google.com/vpc/docs/configure-service-connection-policies

@rickard-von-essen
Copy link
Author

Depends on #624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants