Skip to content

Feature Request: Allow and replace macros in annotations #795

@joewreschnig

Description

@joewreschnig

In some cases my services need to connect to specific shards to modify/retrieve data. I usually control externally-visible names via the external-dns.alpha.kubernetes.io/hostname annotation; I'd like to be able to do the same here using the shard and replica template macros within the annotation to expose e.g. each replica under a unique name:

      - name: replica
        generateName: db-{clusterID}-{shard}-{replica}
        metadata:
          annotations:
            external-dns.alpha.kubernetes.io/hostname: clickhouse-{clusterID}-{shard}-{replica}.example.com
        spec:
          type: LoadBalancer
          ....

But this currently results in the annotation clickhouse-{clusterID}-{shard}-{replica}.example.com.

If this needs to be done under e.g. a new generateAnnotations option for backwards-compatibility, that's also fine with me, as long as I have some way to attach them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions