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

AC-1707 Add support for optional annotations to headless and pod services #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshbench
Copy link

@joshbench joshbench commented Jan 9, 2025

This PR will allow users to add custom annotations to the headless and pod services created by AKO.

The specific functionality we are looking for is to use external-dns to create DNS records that map to these pod addresses, and we need to add annotations to these services to do so.

These annotations can be added by adding the following to the AerospikeCluster spec:

  seedsFinderServices:
    headless:
      annotations:
        foo: bar
    pod:
      annotations:
        foo: bar

And validated by checking the generated services:

  • pod:
    ❯ kubectl describe service aerospike-0-0 -n aerospike
    Name:                     aerospike-0-0
    Namespace:                aerospike
    Labels:                   <none>
    Annotations:              foo: bar
    Selector:                 statefulset.kubernetes.io/pod-name=aerospike-0-0
    Type:                     NodePort
    
  • headless:
    ❯ kubectl describe service aerospike -n aerospike
    Name:                     aerospike
    Namespace:                aerospike
    Labels:                   aerospike.com/cr=aerospike
                              app=aerospike-cluster
    Annotations:              foo: bar
                              service.alpha.kubernetes.io/tolerate-unready-endpoints: true
    Selector:                 aerospike.com/cr=aerospike,app=aerospike-cluster
    Type:                     ClusterIP
    

I have tested this by creating AerospikeClusters, both specifying these annotations and excluding them.

@joshbench joshbench marked this pull request as ready for review January 9, 2025 19:00
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.

1 participant