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(replicationGroup): Add readerEndpoint to status #2077

Conversation

amotolani
Copy link
Contributor

@amotolani amotolani commented Jul 12, 2024

Description of your changes

  • Adds the readerEndpoint for the NodeGroups
  • Populates the data for the primaryEndpoint for the NodeGroups

Managed Resource

apiVersion: cache.aws.crossplane.io/v1beta1
kind: ReplicationGroup
metadata:
  annotations:
    crossplane.io/composition-resource-name: ReplicationGroup
    crossplane.io/external-create-pending: "2024-07-11T20:00:51-06:00"
    crossplane.io/external-create-succeeded: "2024-07-11T20:00:53-06:00"
    crossplane.io/external-name: redis-test-redis-default
  creationTimestamp: "2024-07-12T01:44:22Z"
  finalizers:
  - finalizer.managedresource.crossplane.io
  generateName: redis-test-qjnwv-
  generation: 3
  labels:
    crossplane.io/claim-name: redis-test
    crossplane.io/claim-namespace: default
    crossplane.io/composite: redis-test-qjnwv
  name: redis-test-qjnwv-thbts
  ownerReferences:
  - apiVersion: bitso.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: XRedisCluster
    name: redis-test-qjnwv
    uid: 90cd89da-8ccf-4836-a083-4dc255e3efdb
  resourceVersion: "12735"
  uid: 954c50f2-65c8-41bc-95e1-eac26caee680
spec:
  deletionPolicy: Delete
  forProvider:
    applyModificationsImmediately: true
    atRestEncryptionEnabled: true
    authEnabled: true
    automaticFailoverEnabled: true
    cacheNodeType: cache.t4g.small
    cacheParameterGroupName: default.redis7
    cacheSubnetGroupName: redis-test-qjnwv-z8tjv
    cacheSubnetGroupNameRef:
      name: redis-test-qjnwv-z8tjv
    cacheSubnetGroupNameSelector:
      matchControllerRef: true
    engine: redis
    engineVersion: "7.0"
    numCacheClusters: 2
    port: 6379
    preferredMaintenanceWindow: fri:08:30-fri:09:30
    region: us-east-1
    replicationGroupDescription: redis-test RedisCluster
    securityGroupIdRefs:
    - name: redis-test-qjnwv-xxtz2
    securityGroupIdSelector:
      matchControllerRef: true
    securityGroupIds:
    - sg-0db0011339c92bbd7
    snapshotRetentionLimit: 0
    snapshotWindow: 03:30-04:30
    tags:
    - key: environment
      value: e2e-tests
    - key: application
      value: bitso
    - key: created-with
      value: crossplane
    transitEncryptionEnabled: true
  managementPolicies:
  - '*'
  providerConfigRef:
    name: default
status:
  atProvider:
    automaticFailoverStatus: enabled
    configurationEndpoint:
      address: master.redis-test-redis-default.bqrg2f.use1.cache.amazonaws.com
      port: 6379
    memberClusters:
    - redis-test-redis-default-001
    - redis-test-redis-default-002
    nodeGroups:
    - nodeGroupID: "0001"
      nodeGroupMembers:
      - cacheClusterId: redis-test-redis-default-001
        cacheNodeId: "0001"
        currentRole: primary
        preferredAvailabilityZone: us-east-1c
        readEndpoint:
          address: redis-test-redis-default-001.redis-test-redis-default.bqrg2f.use1.cache.amazonaws.com
          port: 6379
      - cacheClusterId: redis-test-redis-default-002
        cacheNodeId: "0001"
        currentRole: replica
        preferredAvailabilityZone: us-east-1b
        readEndpoint:
          address: redis-test-redis-default-002.redis-test-redis-default.bqrg2f.use1.cache.amazonaws.com
          port: 6379
      primaryEndpoint:
        address: master.redis-test-redis-default.bqrg2f.use1.cache.amazonaws.com
        port: 6379
      readerEndpoint:
        address: replica.redis-test-redis-default.bqrg2f.use1.cache.amazonaws.com
        port: 6379
      status: available
    pendingModifiedValues:
      resharding:
        slotMigration:
          progressPercentage: 0
    status: available
  conditions:
  - lastTransitionTime: "2024-07-12T02:00:53Z"
    reason: ReconcileSuccess
    status: "True"
    type: Synced
  - lastTransitionTime: "2024-07-12T02:12:01Z"
    reason: Available
    status: "True"
    type: Ready

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

@MisterMX MisterMX changed the title add readerEndpoint to replicationGroup status feat(replicationGroup): Add readerEndpoint to status Jul 24, 2024
@MisterMX MisterMX force-pushed the feat(cache)-add-readerEndpoint-to-status branch from 84f1b88 to b468683 Compare July 24, 2024 11:59
Signed-off-by: David Adelowo <david.adelowo@bitso.com>
@MisterMX MisterMX force-pushed the feat(cache)-add-readerEndpoint-to-status branch from b468683 to 9cfe9ee Compare July 24, 2024 12:30
Copy link
Collaborator

@MisterMX MisterMX left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you very much @amotolani!

@MisterMX MisterMX merged commit 24abbe4 into crossplane-contrib:master Jul 24, 2024
9 checks passed
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.

4 participants