kind: ConfigMap
apiVersion: v1
metadata:
  name: pet-clinic-config
  namespace: cf-workloads
data:
  application.yaml: |-
    server:
      port: 8080
      compression:
        enabled: true
        mime-types: application/json,text/css,application/javascript
        min-response-size: 2048

    wavefront:
      application:
        name: pet-clinic-k8s
      freemium-account: false

    # Logging
    logging.level.org.springframework: INFO

    # Metrics
    management:
      endpoint:
        metrics:
          enabled: true
        prometheus:
          enabled: true
      endpoints:
        web:
          exposure:
            include: '*'
      metrics:
        export:
          prometheus:
            enabled: true
          wavefront:
            enabled: true

    customers-service-id: https://customers-service.apps.sys.run.haas-243.pez.pivotal.io
    vists-service-id: https://vists-service.apps.sys.run.haas-243.pez.pivotal.io

    spring:
      datasource:
        schema: classpath*:db/mysql/schema.sql
        data: classpath*:db/mysql/data.sql
        platform: mysql
        initialization-mode: embedded

      jpa:
        show-sql: true
        hibernate:
          ddl-auto: none
          generate-ddl: false
      sleuth:
        sampler:
          probability: 1.0
        config:
          # Allow the microservices to override the remote properties with their own System properties or config file
          allow-override: true
          # Override configuration with any local property source
          override-none: true
      messages:
        basename: messages/messages
      cloud:
        kubernetes:
          discovery:
            enabled: true
        loadbalancer:
          ribbon:
            enabled: false
        gateway:
          x-forwarded:  
            enabled: true 
            for-enabled: true 
            proto-enabled: true 
            host-append: false  
            port-append: false  
            proto-append: false
          routes:
            - id: vets-service
              uri: https://vets-service.apps.sys.run.haas-243.pez.pivotal.io
              predicates:
                - Path=/api/vet/**
              filters:
                - StripPrefix=2
            - id: visits-service
              uri: https://visits-service.apps.sys.run.haas-243.pez.pivotal.io
              predicates:
                - Path=/api/visit/**
              filters:
                - StripPrefix=2
            - id: customers-service
              uri: https://customers-service.apps.sys.run.haas-243.pez.pivotal.io
              predicates:
                - Path=/api/customer/**
              filters:
                - StripPrefix=2
    vets:
      cache:
        ttl: 60
        heap-size: 101

