elastic/elasticsearch

Support YAML anchors in elasticsearch.yml

Open

#51,652 opened on Jan 29, 2020

View on GitHub
 (4 comments) (3 reactions) (0 assignees)Java (76,700 stars) (25,882 forks)batch import
:Core/Infra/Settings>enhancementTeam:Core/Infrahelp wantedtriaged

Description

I wonder whether we should support YAML anchors.

Here is an example which I believe is not supported:

xpack:
  security:
    enabled: true
  http:
    ssl:
      enabled: true
      keystore: &keystore
      path: /usr/share/elasticsearch/config/keystore.p12
      type: PKCS12
      password: ${ES_SECRET}
      key_password: ${ES_SECRET}
  transport:
    ssl:
      enabled: true
      verification_mode: certificate
      keystore: *keystore
      truststore:
        path: /usr/share/elasticsearch/config/truststore.p12
        type: PKCS12
        password: ${ES_SECRET}

The example defines the &keystore "anchor" which is then referred to by the *keystore alias.

Contributor guide