diff --git a/.editorconfig b/.editorconfig index 0e33fa5c..7b6906c0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# EditorConfig is awesome: http://EditorConfig.org +# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true diff --git a/.gitignore b/.gitignore index 089eafbb..480f655d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ buildNumber.properties *.war *.ear -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +# virtual machine crash logs, see https://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* diff --git a/README.adoc b/README.adoc index dc3cae79..ecc8cb2e 100644 --- a/README.adoc +++ b/README.adoc @@ -794,7 +794,7 @@ credentials and you already have those. The projects that require middleware generally include a `docker-compose.yml`, so consider using -http://compose.docker.io/[Docker Compose] to run the middeware servers +https://compose.docker.io/[Docker Compose] to run the middeware servers in Docker containers. See the README in the https://github.com/spring-cloud-samples/scripts[scripts demo repository] for specific instructions about the common cases of mongo, @@ -816,13 +816,13 @@ a modified file in the correct place. Just commit it and push the change. === Working with the code If you don't have an IDE preference we would recommend that you use -http://www.springsource.com/developer/sts[Spring Tools Suite] or -http://eclipse.org[Eclipse] when working with the code. We use the -http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools +https://www.springsource.com/developer/sts[Spring Tools Suite] or +https://eclipse.org[Eclipse] when working with the code. We use the +https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools should also work without issue as long as they use Maven 3.3.3 or better. ==== Importing into eclipse with m2eclipse -We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with +We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with eclipse. If you don't already have m2eclipse installed it is available from the "eclipse marketplace". @@ -880,7 +880,7 @@ added after the original pull request but before a merge. `eclipse-code-formatter.xml` file from the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring Cloud Build] project. If using IntelliJ, you can use the - http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter + https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is @@ -893,7 +893,7 @@ added after the original pull request but before a merge. * A few unit tests would help a lot as well -- someone has to do it. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). -* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], +* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). @@ -964,7 +964,7 @@ If you need to suppress some rules (e.g. line length needs to be longer), then i + "https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> diff --git a/spring-cloud-kubernetes-discovery/src/test/java/org/springframework/cloud/kubernetes/discovery/KubernetesDiscoveryClientConfigClientBootstrapConfigurationTests.java b/spring-cloud-kubernetes-discovery/src/test/java/org/springframework/cloud/kubernetes/discovery/KubernetesDiscoveryClientConfigClientBootstrapConfigurationTests.java index eb18cc0f..57f5ede7 100644 --- a/spring-cloud-kubernetes-discovery/src/test/java/org/springframework/cloud/kubernetes/discovery/KubernetesDiscoveryClientConfigClientBootstrapConfigurationTests.java +++ b/spring-cloud-kubernetes-discovery/src/test/java/org/springframework/cloud/kubernetes/discovery/KubernetesDiscoveryClientConfigClientBootstrapConfigurationTests.java @@ -69,7 +69,7 @@ public class KubernetesDiscoveryClientConfigClientBootstrapConfigurationTests { verify(client, atLeast(2)).getInstances("configserver"); ConfigClientProperties locator = this.context .getBean(ConfigClientProperties.class); - assertEquals("http://fake:8888/", locator.getUri()[0]); + assertEquals("https://fake:8888/", locator.getUri()[0]); } private void setup(String... env) { diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java index 39590168..c322dac9 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java +++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/java/org/springframework/cloud/kubernetes/examples/NameService.java @@ -40,7 +40,7 @@ public class NameService { @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000") }) public String getName(int delay) { return this.restTemplate.getForObject( - String.format("http://name-service/name?delay=%d", delay), String.class); + String.format("https://name-service/name?delay=%d", delay), String.class); } private String getFallbackName(int delay) { diff --git a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md index a06c7501..4e7e2002 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md +++ b/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/readme.md @@ -1,6 +1,6 @@ ## Kubernetes Circuit Breaker & Load Balancer Example -This example demonstrates how to use [Hystrix circuit breaker](https://martinfowler.com/bliki/CircuitBreaker.html) and the [Ribbon Load Balancing](http://microservices.io/patterns/client-side-discovery.html). The circuit breaker which is backed with Ribbon will check regularly if the target service is still alive. If this is not loner the case, then a fall back process will be excuted. In our case, the REST `greeting service` which is calling the `name Service` responsible to generate the response message will reply a "fallback message" to the client if the `name service` is not longer replying. +This example demonstrates how to use [Hystrix circuit breaker](https://martinfowler.com/bliki/CircuitBreaker.html) and the [Ribbon Load Balancing](https://microservices.io/patterns/client-side-discovery.html). The circuit breaker which is backed with Ribbon will check regularly if the target service is still alive. If this is not loner the case, then a fall back process will be excuted. In our case, the REST `greeting service` which is calling the `name Service` responsible to generate the response message will reply a "fallback message" to the client if the `name service` is not longer replying. As the Ribbon Kubernetes client is configured within this example, it will fetch from the Kubernetes API Server, the list of the endpoints available for the name service and loadbalance the request between the IP addresses available ### Running the example @@ -39,7 +39,7 @@ minikube service --url greeting-service and then call the service using the curl client ``` -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting ``` to get a response as such @@ -84,9 +84,9 @@ name-service 172.17.0.5:8080,172.17.0.6:8080 40m Here is an example about what you will get ``` -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting Hello from name-service-1652024859-hf3xv! -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting Hello from name-service-1652024859-426kv! ... ``` @@ -150,7 +150,7 @@ oc get route/greeting-service and then call the service using the curl client ``` -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting ``` to get a response as such @@ -195,9 +195,9 @@ name-service 172.17.0.2:8080,172.17.0.3:8080 40m Here is an example about what you will get ``` -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting Hello from name-service-1-0ss0r! -curl http://IP_OR_HOSTNAME/greeting +curl https://IP_OR_HOSTNAME/greeting Hello from name-service-1-fblp1! ... ``` diff --git a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md index f8e8d246..6c93f4aa 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md +++ b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md @@ -44,13 +44,13 @@ minikube service kubernetes-hello-world --url And next you can curl the endpoint using the url returned by the previous command ``` -curl http://IP_OR_HOSTNAME/ +curl https://IP_OR_HOSTNAME/ ``` then ``` -curl http://IP_OR_HOSTNAME/services +curl https://IP_OR_HOSTNAME/services ``` Should return you the list of available services discovered by the DiscoveryClient diff --git a/spring-cloud-kubernetes-integration-tests/discovery/tests/src/test/java/org/springframework/cloud/kubernetes/it/ServicesIT.java b/spring-cloud-kubernetes-integration-tests/discovery/tests/src/test/java/org/springframework/cloud/kubernetes/it/ServicesIT.java index 3688b944..26267e2c 100644 --- a/spring-cloud-kubernetes-integration-tests/discovery/tests/src/test/java/org/springframework/cloud/kubernetes/it/ServicesIT.java +++ b/spring-cloud-kubernetes-integration-tests/discovery/tests/src/test/java/org/springframework/cloud/kubernetes/it/ServicesIT.java @@ -37,7 +37,7 @@ public class ServicesIT { @Test public void testServicesEndpoint() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)).get("services").then() + given().baseUri(String.format("https://%s:%d", HOST, PORT)).get("services").then() .statusCode(200).body(new StringContains("service-a") { @Override protected boolean evalSubstringOf(String s) { @@ -48,7 +48,7 @@ public class ServicesIT { @Test public void testInstancesEndpoint() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)) + given().baseUri(String.format("https://%s:%d", HOST, PORT)) .get("services/discovery-service-a/instances").then().statusCode(200) .body("instanceId", hasSize(1)) .body("serviceId", hasItems("discovery-service-a")); diff --git a/spring-cloud-kubernetes-integration-tests/istio/src/test/java/org/springframework/cloud/kubernetes/it/ProfilesIT.java b/spring-cloud-kubernetes-integration-tests/istio/src/test/java/org/springframework/cloud/kubernetes/it/ProfilesIT.java index e23062c6..766fb478 100644 --- a/spring-cloud-kubernetes-integration-tests/istio/src/test/java/org/springframework/cloud/kubernetes/it/ProfilesIT.java +++ b/spring-cloud-kubernetes-integration-tests/istio/src/test/java/org/springframework/cloud/kubernetes/it/ProfilesIT.java @@ -35,7 +35,7 @@ public class ProfilesIT { @Test public void testProfileEndpoint() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)).get("profiles").then() + given().baseUri(String.format("https://%s:%d", HOST, PORT)).get("profiles").then() .statusCode(200).body(new StringContains("istio")); } diff --git a/spring-cloud-kubernetes-integration-tests/simple-configmap/src/test/java/org/springframework/cloud/kubernetes/it/GreetingIT.java b/spring-cloud-kubernetes-integration-tests/simple-configmap/src/test/java/org/springframework/cloud/kubernetes/it/GreetingIT.java index 6e46eba8..d7aadf88 100644 --- a/spring-cloud-kubernetes-integration-tests/simple-configmap/src/test/java/org/springframework/cloud/kubernetes/it/GreetingIT.java +++ b/spring-cloud-kubernetes-integration-tests/simple-configmap/src/test/java/org/springframework/cloud/kubernetes/it/GreetingIT.java @@ -39,7 +39,7 @@ public class GreetingIT { @Test public void firstTestThatTheDefaultMessageIsReturned() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)).get("greeting").then() + given().baseUri(String.format("https://%s:%d", HOST, PORT)).get("greeting").then() .statusCode(200).body("message", is("This is a dummy message")); } @@ -48,7 +48,7 @@ public class GreetingIT { public void thenApplyAConfigMapAndEnsureThatTheMessageIsUpdated() { waitForApplicationToReload(); - given().baseUri(String.format("http://%s:%d", HOST, PORT)).get("greeting").then() + given().baseUri(String.format("https://%s:%d", HOST, PORT)).get("greeting").then() .statusCode(200) .body("message", is("Hello from Spring Cloud Kubernetes!")); } diff --git a/spring-cloud-kubernetes-integration-tests/simple-core/src/test/java/org/springframework/cloud/kubernetes/it/GreetingAndHealthIT.java b/spring-cloud-kubernetes-integration-tests/simple-core/src/test/java/org/springframework/cloud/kubernetes/it/GreetingAndHealthIT.java index 6028de62..7299207b 100644 --- a/spring-cloud-kubernetes-integration-tests/simple-core/src/test/java/org/springframework/cloud/kubernetes/it/GreetingAndHealthIT.java +++ b/spring-cloud-kubernetes-integration-tests/simple-core/src/test/java/org/springframework/cloud/kubernetes/it/GreetingAndHealthIT.java @@ -35,13 +35,13 @@ public class GreetingAndHealthIT { @Test public void testGreetingEndpoint() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)).get("greeting").then() + given().baseUri(String.format("https://%s:%d", HOST, PORT)).get("greeting").then() .statusCode(200).body("message", is("Hello from k8s")); } @Test public void testHealthEndpoint() { - given().baseUri(String.format("http://%s:%d", HOST, PORT)) + given().baseUri(String.format("https://%s:%d", HOST, PORT)) .contentType("application/json").get("actuator/health").then() .statusCode(200).body("details.kubernetes.details.inside", is(true)); }