Merge branch '2.0.x' into main
This commit is contained in:
@@ -10,7 +10,7 @@ containerdConfigPatches:
|
||||
# 1 control plane node and 3 workers
|
||||
nodes:
|
||||
- role: control-plane
|
||||
image: kindest/node:v1.14.10@sha256:6cd43ff41ae9f02bb46c8f455d5323819aec858b99534a290517ebc181b443c6
|
||||
image: kindest/node:v1.22.1
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
@@ -25,4 +25,4 @@ nodes:
|
||||
hostPort: 443
|
||||
protocol: TCP
|
||||
- role: worker
|
||||
image: kindest/node:v1.14.10@sha256:6cd43ff41ae9f02bb46c8f455d5323819aec858b99534a290517ebc181b443c6
|
||||
image: kindest/node:v1.22.1
|
||||
|
||||
@@ -73,7 +73,7 @@ install_kind_release() {
|
||||
elif [[ "$OSTYPE" == "win32" ]]; then
|
||||
KIND_BINARY_URL="https://github.com/kubernetes-sigs/kind/releases/download/${VERSION}/kind-windows-amd64"
|
||||
else
|
||||
echo "Uknown OS, using linux binary"
|
||||
echo "Unknown OS, using linux binary"
|
||||
fi
|
||||
wget -O "${KIND}" "${KIND_BINARY_URL}"
|
||||
chmod +x "${KIND}"
|
||||
@@ -87,7 +87,7 @@ main() {
|
||||
cd $CURRENT_DIR
|
||||
|
||||
#TODO what happens if cluster is already there????
|
||||
"${KIND}" create cluster --config=kind-config.yaml --loglevel=debug
|
||||
"${KIND}" create cluster --config=kind-config.yaml -v 2147483647
|
||||
|
||||
# set KUBECONFIG to point to the cluster
|
||||
kubectl cluster-info --context kind-kind
|
||||
@@ -102,8 +102,7 @@ main() {
|
||||
echo "Loading images into Kind: $i"
|
||||
"${KIND}" load docker-image $i
|
||||
done
|
||||
# kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
|
||||
kubectl apply -fhttps://raw.githubusercontent.com/kubernetes/ingress-nginx/12150e318b972a03fb49d827e6cabb8ef62247ef/deploy/static/provider/kind/deploy.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
|
||||
sleep 5 # hold 5 sec so that the pods can be created
|
||||
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=420s
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ import java.util.Map;
|
||||
import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMap;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Secret;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -73,7 +73,7 @@ public class ConfigMapAndSecretIT {
|
||||
|
||||
private static AppsV1Api appsApi;
|
||||
|
||||
private static NetworkingV1beta1Api networkingApi;
|
||||
private static NetworkingV1Api networkingApi;
|
||||
|
||||
private static K8SUtils k8SUtils;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ConfigMapAndSecretIT {
|
||||
client = createApiClient();
|
||||
api = new CoreV1Api();
|
||||
appsApi = new AppsV1Api();
|
||||
networkingApi = new NetworkingV1beta1Api();
|
||||
networkingApi = new NetworkingV1Api();
|
||||
k8SUtils = new K8SUtils(api, appsApi);
|
||||
}
|
||||
|
||||
@@ -207,8 +207,8 @@ public class ConfigMapAndSecretIT {
|
||||
return service;
|
||||
}
|
||||
|
||||
private static NetworkingV1beta1Ingress getConfigK8sClientItIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private static V1Ingress getConfigK8sClientItIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("spring-cloud-kubernetes-client-config-it-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,9 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /client-config-it(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: spring-cloud-kubernetes-client-config-it
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: spring-cloud-kubernetes-client-config-it
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
@@ -24,9 +24,9 @@ import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.ApiException;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -60,12 +60,6 @@ public class LoadBalancerIT {
|
||||
|
||||
private static final String SPRING_CLOUD_K8S_LOADBALANCER_APP_NAME = "spring-cloud-kubernetes-client-loadbalancer-it";
|
||||
|
||||
private static final String WIREMOCK_HOST = "localhost";
|
||||
|
||||
private static final String WIREMOCK_PATH = "/wiremock";
|
||||
|
||||
private static final int WIREMOCK_PORT = 80;
|
||||
|
||||
private static final String NAMESPACE = "default";
|
||||
|
||||
private ApiClient client;
|
||||
@@ -74,7 +68,7 @@ public class LoadBalancerIT {
|
||||
|
||||
private AppsV1Api appsApi;
|
||||
|
||||
private NetworkingV1beta1Api networkingApi;
|
||||
private NetworkingV1Api networkingApi;
|
||||
|
||||
private K8SUtils k8SUtils;
|
||||
|
||||
@@ -83,7 +77,7 @@ public class LoadBalancerIT {
|
||||
this.client = createApiClient();
|
||||
this.api = new CoreV1Api();
|
||||
this.appsApi = new AppsV1Api();
|
||||
this.networkingApi = new NetworkingV1beta1Api();
|
||||
this.networkingApi = new NetworkingV1Api();
|
||||
this.k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployWiremock();
|
||||
@@ -203,8 +197,8 @@ public class LoadBalancerIT {
|
||||
return deployment;
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getLoadbalancerItIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private V1Ingress getLoadbalancerItIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("spring-cloud-kubernetes-client-loadbalancer-it-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
@@ -215,8 +209,8 @@ public class LoadBalancerIT {
|
||||
networkingApi.createNamespacedIngress(NAMESPACE, getWiremockIngress(), null, null, null);
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getWiremockIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private V1Ingress getWiremockIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("wiremock-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,12 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /loadbalancer-it(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: spring-cloud-kubernetes-client-loadbalancer-it
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: spring-cloud-kubernetes-client-loadbalancer-it
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: wiremock-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,10 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /wiremock(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: servicea-wiremock
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: servicea-wiremock
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.ApiException;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -69,7 +69,7 @@ public class ReactiveDiscoveryClientIT {
|
||||
|
||||
private AppsV1Api appsApi;
|
||||
|
||||
private NetworkingV1beta1Api networkingApi;
|
||||
private NetworkingV1Api networkingApi;
|
||||
|
||||
private K8SUtils k8SUtils;
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ReactiveDiscoveryClientIT {
|
||||
this.client = createApiClient();
|
||||
this.api = new CoreV1Api();
|
||||
this.appsApi = new AppsV1Api();
|
||||
this.networkingApi = new NetworkingV1beta1Api();
|
||||
this.networkingApi = new NetworkingV1Api();
|
||||
this.k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployWiremock();
|
||||
@@ -200,8 +200,8 @@ public class ReactiveDiscoveryClientIT {
|
||||
return deployment;
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getReactiveDiscoveryItIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private V1Ingress getReactiveDiscoveryItIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("spring-cloud-kubernetes-client-reactive-discovery-it-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
@@ -212,8 +212,8 @@ public class ReactiveDiscoveryClientIT {
|
||||
networkingApi.createNamespacedIngress(NAMESPACE, getWiremockIngress(), null, null, null);
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getWiremockIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private V1Ingress getWiremockIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("wiremock-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,9 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /reactive-discovery-it(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: spring-cloud-kubernetes-client-reactive-discovery-it
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: spring-cloud-kubernetes-client-reactive-discovery-it
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: wiremock-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,11 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /wiremock(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: servicea-wiremock
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: servicea-wiremock
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ import com.github.tomakehurst.wiremock.client.WireMock;
|
||||
import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMap;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMapBuilder;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -54,22 +54,6 @@ import static org.springframework.cloud.kubernetes.integration.tests.commons.K8S
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class ActuatorRefreshIT {
|
||||
|
||||
private static final String KIND_REPO_HOST_PORT = "localhost:5000";
|
||||
|
||||
private static final String KIND_REPO_URL = "http://" + KIND_REPO_HOST_PORT;
|
||||
|
||||
private static final String IMAGE = "spring-cloud-kubernetes-configuration-watcher";
|
||||
|
||||
private static final String IMAGE_TAG = "2.0.1-SNAPSHOT";
|
||||
|
||||
private static final String LOCAL_REPO = "docker.io/springcloud";
|
||||
|
||||
private static final String LOCAL_IMAGE = LOCAL_REPO + "/" + IMAGE + ":" + IMAGE_TAG;
|
||||
|
||||
private static final String KIND_IMAGE = KIND_REPO_HOST_PORT + "/" + IMAGE;
|
||||
|
||||
private static final String KIND_IMAGE_WITH_TAG = KIND_IMAGE + ":" + IMAGE_TAG;
|
||||
|
||||
private static final String CONFIG_WATCHER_WIREMOCK_DEPLOYMENT_NAME = "config-watcher-wiremock-deployment";
|
||||
|
||||
private static final String CONFIG_WATCHER_WIREMOCK_APP_NAME = "config-watcher-wiremock";
|
||||
@@ -92,7 +76,7 @@ public class ActuatorRefreshIT {
|
||||
|
||||
private AppsV1Api appsApi;
|
||||
|
||||
private NetworkingV1beta1Api networkingApi;
|
||||
private NetworkingV1Api networkingApi;
|
||||
|
||||
private K8SUtils k8SUtils;
|
||||
|
||||
@@ -101,7 +85,7 @@ public class ActuatorRefreshIT {
|
||||
this.client = createApiClient();
|
||||
this.api = new CoreV1Api();
|
||||
this.appsApi = new AppsV1Api();
|
||||
this.networkingApi = new NetworkingV1beta1Api();
|
||||
this.networkingApi = new NetworkingV1Api();
|
||||
this.k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployWiremock();
|
||||
@@ -192,8 +176,8 @@ public class ActuatorRefreshIT {
|
||||
networkingApi.createNamespacedIngress(NAMESPACE, getWiremockIngress(), null, null, null);
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getWiremockIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private V1Ingress getWiremockIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("wiremock-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ import java.time.Duration;
|
||||
import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMap;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMapBuilder;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -79,7 +79,7 @@ public class ActuatorRefreshKafkaIT {
|
||||
|
||||
private AppsV1Api appsApi;
|
||||
|
||||
private NetworkingV1beta1Api networkingApi;
|
||||
private NetworkingV1Api networkingApi;
|
||||
|
||||
private K8SUtils k8SUtils;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ActuatorRefreshKafkaIT {
|
||||
this.client = createApiClient();
|
||||
this.api = new CoreV1Api();
|
||||
this.appsApi = new AppsV1Api();
|
||||
this.networkingApi = new NetworkingV1beta1Api();
|
||||
this.networkingApi = new NetworkingV1Api();
|
||||
this.k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployZookeeper();
|
||||
@@ -234,9 +234,9 @@ public class ActuatorRefreshKafkaIT {
|
||||
return deployment;
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getItIngress() throws Exception {
|
||||
private V1Ingress getItIngress() throws Exception {
|
||||
String urlString = "spring-cloud-kubernetes-configuration-watcher-it-ingress.yaml";
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils.readYamlFromClasspath(urlString);
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils.readYamlFromClasspath(urlString);
|
||||
return ingress;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ import java.time.Duration;
|
||||
import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMap;
|
||||
import io.kubernetes.client.openapi.models.V1ConfigMapBuilder;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1ReplicationController;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -76,7 +76,7 @@ public class ActuatorRefreshRabbitMQIT {
|
||||
|
||||
private AppsV1Api appsApi;
|
||||
|
||||
private NetworkingV1beta1Api networkingApi;
|
||||
private NetworkingV1Api networkingApi;
|
||||
|
||||
private K8SUtils k8SUtils;
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ActuatorRefreshRabbitMQIT {
|
||||
this.client = createApiClient();
|
||||
this.api = new CoreV1Api();
|
||||
this.appsApi = new AppsV1Api();
|
||||
this.networkingApi = new NetworkingV1beta1Api();
|
||||
this.networkingApi = new NetworkingV1Api();
|
||||
this.k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployRabbitMQ();
|
||||
@@ -226,9 +226,9 @@ public class ActuatorRefreshRabbitMQIT {
|
||||
return deployment;
|
||||
}
|
||||
|
||||
private NetworkingV1beta1Ingress getItIngress() throws Exception {
|
||||
private V1Ingress getItIngress() throws Exception {
|
||||
String urlString = "spring-cloud-kubernetes-configuration-watcher-it-ingress.yaml";
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils.readYamlFromClasspath(urlString);
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils.readYamlFromClasspath(urlString);
|
||||
return ingress;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,9 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /it(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: spring-cloud-kubernetes-configuration-watcher-it
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: spring-cloud-kubernetes-configuration-watcher-it
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: nginx-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,9 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /wiremock(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: config-watcher-wiremock
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: config-watcher-wiremock
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.Map;
|
||||
import io.kubernetes.client.openapi.ApiClient;
|
||||
import io.kubernetes.client.openapi.apis.AppsV1Api;
|
||||
import io.kubernetes.client.openapi.apis.CoreV1Api;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1beta1Api;
|
||||
import io.kubernetes.client.openapi.models.NetworkingV1beta1Ingress;
|
||||
import io.kubernetes.client.openapi.apis.NetworkingV1Api;
|
||||
import io.kubernetes.client.openapi.models.V1Deployment;
|
||||
import io.kubernetes.client.openapi.models.V1Ingress;
|
||||
import io.kubernetes.client.openapi.models.V1Service;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -68,7 +68,7 @@ public class ActuatorEndpointIT {
|
||||
|
||||
private static AppsV1Api appsApi;
|
||||
|
||||
private static NetworkingV1beta1Api networkingApi;
|
||||
private static NetworkingV1Api networkingApi;
|
||||
|
||||
private static K8SUtils k8SUtils;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ActuatorEndpointIT {
|
||||
client = createApiClient();
|
||||
api = new CoreV1Api();
|
||||
appsApi = new AppsV1Api();
|
||||
networkingApi = new NetworkingV1beta1Api();
|
||||
networkingApi = new NetworkingV1Api();
|
||||
k8SUtils = new K8SUtils(api, appsApi);
|
||||
|
||||
deployCoreK8sClientIt();
|
||||
@@ -107,8 +107,8 @@ public class ActuatorEndpointIT {
|
||||
return service;
|
||||
}
|
||||
|
||||
private static NetworkingV1beta1Ingress getCoreK8sClientItIngress() throws Exception {
|
||||
NetworkingV1beta1Ingress ingress = (NetworkingV1beta1Ingress) k8SUtils
|
||||
private static V1Ingress getCoreK8sClientItIngress() throws Exception {
|
||||
V1Ingress ingress = (V1Ingress) k8SUtils
|
||||
.readYamlFromClasspath("spring-cloud-kubernetes-core-k8s-client-it-ingress.yaml");
|
||||
return ingress;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: it-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
@@ -9,6 +10,9 @@ spec:
|
||||
- http:
|
||||
paths:
|
||||
- path: /core-k8s-client-it(/|$)(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
serviceName: spring-cloud-kubernetes-core-k8s-client-it
|
||||
servicePort: 8080
|
||||
service:
|
||||
name: spring-cloud-kubernetes-core-k8s-client-it
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
Reference in New Issue
Block a user