default ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { KubernetesSharedServiceSettings kubernetesSharedServiceSettings = new KubernetesSharedServiceSettings(deploymentConfiguration); ServiceSettings settings = defaultServiceSettings(deploymentConfiguration); String location = kubernetesSharedServiceSettings.getDeployLocation(); settings.setAddress(buildAddress(location)) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setLocation(location) .setEnabled(isEnabled(deploymentConfiguration)); if (runsOnJvm()) { // Use half the available memory allocated to the container for the JVM heap settings.getEnv().put("JAVA_OPTS", "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2"); } return settings; }
default ServiceSettings buildServiceSettings(DeploymentConfiguration deploymentConfiguration) { KubernetesSharedServiceSettings kubernetesSharedServiceSettings = new KubernetesSharedServiceSettings(deploymentConfiguration); ServiceSettings settings = defaultServiceSettings(deploymentConfiguration); String location = kubernetesSharedServiceSettings.getDeployLocation(); settings.setAddress(buildAddress(location)) .setArtifactId(getArtifactId(deploymentConfiguration.getName())) .setLocation(location) .setEnabled(isEnabled(deploymentConfiguration)); if (runsOnJvm()) { // Use half the available memory allocated to the container for the JVM heap settings.getEnv().put("JAVA_OPTS", "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2"); } return settings; }