apiVersion: v1
kind: ConfigMap
metadata:
  name: jhipster-registry-configmap
data:
  application.yml: |-
    configserver:
      name:  JHipster Registry
      status: Connected to the JHipster Registry running in Kubernetes
    eureka:
      client:
        initial-instance-info-replication-interval-seconds: 15
        instance-info-replication-interval-seconds: 15
        registry-fetch-interval-seconds: 15
        fetch-registry: true
        register-with-eureka: true
        eureka-service-url-poll-interval-seconds: 15
      instance:
        lease-renewal-interval-in-seconds: 10
        registry-default-open-for-traffic-count: 0
    jhipster:
      security:
        authentication:
          jwt:
            # This is bad practice, but this value cannot be handed to the registry via the environment. Needs further investigation 
            base64-secret: {{ required "Registry  JWT is required" .Values.application.registry.jwt | b64enc | quote }} 
  # app specific configuration
  jhipster-registry.yml: |-
    eureka:
      client:
        service-url:
          defaultZone: http://admin:${spring.security.user.password}@{{ .Values.registry.service.name }}:{{ .Values.registry.service.port }}/eureka/
