Eureka never unregisters a service

I realized that self preservation mode was never actually being disabled. It turns out the actual property is

eureka.server.enableSelfPreservation=false

(See DefaultEurekaServerConfig Code), which I haven't found documented anywhere. This resolved my issue.


I made service de-registration work by setting the below values

Eureka server application.yml

eureka:
  server:
    enableSelfPreservation: false

Service application.yml

eureka:
  instance:
    leaseRenewalIntervalInSeconds: 1
    leaseExpirationDurationInSeconds: 2

The full example is here https://github.com/ExampleDriven/spring-cloud-eureka-example