Merge branch '3.0.x'
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import io.fabric8.istio.client.DefaultIstioClient;
|
||||
import io.fabric8.istio.client.IstioClient;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.kubernetes.fabric8.istio.utils.MeshUtils;
|
||||
import org.springframework.cloud.kubernetes.fabric8.client.istio.utils.MeshUtils;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
@@ -69,7 +69,7 @@ public class IstioBootstrapConfiguration {
|
||||
}
|
||||
|
||||
void addIstioProfile(ConfigurableEnvironment environment) {
|
||||
if (this.utils.isIstioEnabled()) {
|
||||
if (utils.isIstioEnabled()) {
|
||||
if (hasIstioProfile(environment)) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("'istio' already in list of active profiles");
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio.utils;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio.utils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.cloud.kubernetes.fabric8.istio.IstioClientProperties;
|
||||
import org.springframework.cloud.kubernetes.fabric8.client.istio.IstioClientProperties;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class MeshUtils {
|
||||
|
||||
private final IstioClientProperties istioClientProperties;
|
||||
|
||||
private RestTemplate restTemplate = new RestTemplateBuilder().build();
|
||||
private final RestTemplate restTemplate = new RestTemplateBuilder().build();
|
||||
|
||||
public MeshUtils(IstioClientProperties istioClientProperties) {
|
||||
this.istioClientProperties = istioClientProperties;
|
||||
@@ -1,2 +1,2 @@
|
||||
org.springframework.cloud.bootstrap.BootstrapConfiguration=\
|
||||
org.springframework.cloud.kubernetes.fabric8.istio.IstioBootstrapConfiguration
|
||||
org.springframework.cloud.kubernetes.fabric8.client.istio.IstioBootstrapConfiguration
|
||||
|
||||
@@ -1 +1 @@
|
||||
org.springframework.cloud.kubernetes.fabric8.istio.IstioAutoConfiguration
|
||||
org.springframework.cloud.kubernetes.fabric8.client.istio.IstioAutoConfiguration
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import io.fabric8.istio.client.IstioClient;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import io.fabric8.istio.client.IstioClient;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import io.fabric8.istio.client.IstioClient;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import io.fabric8.istio.client.IstioClient;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -61,6 +61,9 @@
|
||||
<module>spring-cloud-kubernetes-fabric8-client-reload</module>
|
||||
<module>spring-cloud-kubernetes-k8s-client-reload</module>
|
||||
|
||||
<!-- at the moment there is no k8s native client support for istio -->
|
||||
<module>spring-cloud-kubernetes-fabric8-client-istio</module>
|
||||
|
||||
<!-- discovery using discovery server -->
|
||||
<!-- since discovery controller is based on k8s-client, we do not have a fabric8 module -->
|
||||
<module>spring-cloud-kubernetes-k8s-client-discovery-server</module>
|
||||
@@ -68,8 +71,6 @@
|
||||
<!-- configuration watcher is based on k8s-client, there's no fabric8 counterpart -->
|
||||
<module>spring-cloud-kubernetes-k8s-client-configuration-watcher</module>
|
||||
|
||||
<module>spring-cloud-kubernetes-fabric8-istio-it</module>
|
||||
|
||||
<module>spring-cloud-kubernetes-client-loadbalancer-it</module>
|
||||
<module>spring-cloud-kubernetes-client-configmap-event-reload-multiple-apps</module>
|
||||
<module>spring-cloud-kubernetes-client-secrets-event-reload-multiple-apps</module>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-cloud-kubernetes-fabric8-istio-it</artifactId>
|
||||
<artifactId>spring-cloud-kubernetes-fabric8-client-istio</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -44,6 +44,7 @@
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
|
||||
<!-- build image in the 'package' phase, and ignore plain tests -->
|
||||
<!-- via maven-surefire-plugin::skipTests -->
|
||||
<plugin>
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.fabric8.istio;
|
||||
package org.springframework.cloud.kubernetes.fabric8.client.istio;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.time.Duration;
|
||||
@@ -24,7 +24,6 @@ import java.util.Objects;
|
||||
import io.fabric8.kubernetes.api.model.Service;
|
||||
import io.fabric8.kubernetes.api.model.apps.Deployment;
|
||||
import io.fabric8.kubernetes.api.model.networking.v1.Ingress;
|
||||
import io.fabric8.kubernetes.client.KubernetesClient;
|
||||
import io.fabric8.kubernetes.client.utils.Serialization;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -51,14 +50,12 @@ class Fabric8IstioIT {
|
||||
|
||||
private static final String NAMESPACE = "istio-test";
|
||||
|
||||
private static final String IMAGE_NAME = "spring-cloud-kubernetes-fabric8-istio-it";
|
||||
private static final String IMAGE_NAME = "spring-cloud-kubernetes-fabric8-client-istio";
|
||||
|
||||
private static final String ISTIO_PROXY = "istio/proxyv2";
|
||||
|
||||
private static final String ISTIO_PILOT = "istio/pilot";
|
||||
|
||||
private static KubernetesClient client;
|
||||
|
||||
private static Util util;
|
||||
|
||||
private static K3sContainer K3S;
|
||||
@@ -68,7 +65,6 @@ class Fabric8IstioIT {
|
||||
K3S = Commons.container();
|
||||
K3S.start();
|
||||
util = new Util(K3S);
|
||||
client = util.client();
|
||||
Commons.validateImage(IMAGE_NAME, K3S);
|
||||
Commons.loadSpringCloudKubernetesImage(IMAGE_NAME, K3S);
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spring-cloud-kubernetes-fabric8-istio-it-deployment
|
||||
name: spring-cloud-kubernetes-fabric8-client-istio
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spring-cloud-kubernetes-fabric8-istio-it
|
||||
app: spring-cloud-kubernetes-fabric8-client-istio
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-fabric8-istio-it
|
||||
app: spring-cloud-kubernetes-fabric8-client-istio
|
||||
spec:
|
||||
serviceAccountName: spring-cloud-kubernetes-istio-serviceaccount
|
||||
containers:
|
||||
- name: spring-cloud-kubernetes-fabric8-istio-it
|
||||
image: docker.io/springcloud/spring-cloud-kubernetes-fabric8-istio-it
|
||||
- name: spring-cloud-kubernetes-fabric8-client-istio
|
||||
image: docker.io/springcloud/spring-cloud-kubernetes-fabric8-client-istio
|
||||
imagePullPolicy: IfNotPresent
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
@@ -26,3 +26,6 @@ spec:
|
||||
path: /actuator/health/liveness
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_KUBERNETES_FABRIC8_CLIENT_ISTIO
|
||||
value: "DEBUG"
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
name: spring-cloud-kubernetes-fabric8-client-istio
|
||||
namespace: istio-test
|
||||
spec:
|
||||
rules:
|
||||
@@ -11,6 +11,6 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: spring-cloud-kubernetes-fabric8-istio-it
|
||||
name: spring-cloud-kubernetes-fabric8-client-istio
|
||||
port:
|
||||
number: 8080
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-fabric8-client-istio
|
||||
name: spring-cloud-kubernetes-fabric8-client-istio
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: spring-cloud-kubernetes-fabric8-client-istio
|
||||
type: ClusterIP
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-fabric8-istio-it
|
||||
name: spring-cloud-kubernetes-fabric8-istio-it
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: spring-cloud-kubernetes-fabric8-istio-it
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user