Fabric8 it part 8 (#1475)
This commit is contained in:
@@ -48,9 +48,13 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>spring-cloud-kubernetes-fabric8-istio-it</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-client-catalog-watcher</module>
|
||||
<module>spring-cloud-kubernetes-k8s-client-catalog-watcher</module>
|
||||
|
||||
<module>spring-cloud-kubernetes-fabric8-client-discovery</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-client-reload</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-client-discovery-with-bootstrap</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-istio-it</module>
|
||||
|
||||
<module>spring-cloud-kubernetes-discoveryclient-it</module>
|
||||
<module>spring-cloud-kubernetes-client-loadbalancer-it</module>
|
||||
@@ -58,9 +62,6 @@
|
||||
<module>spring-cloud-kubernetes-client-event-and-polling-reload</module>
|
||||
<module>spring-cloud-kubernetes-client-configmap-event-reload-multiple-apps</module>
|
||||
<module>spring-cloud-kubernetes-client-secrets-event-reload-multiple-apps</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-client-catalog-watcher</module>
|
||||
<module>spring-cloud-kubernetes-client-catalog-watcher</module>
|
||||
<module>spring-cloud-kubernetes-client-discovery-it</module>
|
||||
<module>spring-cloud-kubernetes-fabric8-client-discovery-with-bootstrap</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-client-catalog-watcher-service
|
||||
name: spring-cloud-kubernetes-client-catalog-watcher-service
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: spring-cloud-kubernetes-client-catalog-watcher
|
||||
type: ClusterIP
|
||||
@@ -9,7 +9,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-cloud-kubernetes-client-catalog-watcher</artifactId>
|
||||
<artifactId>spring-cloud-kubernetes-k8s-client-catalog-watcher</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
@@ -48,10 +48,10 @@ import org.springframework.http.client.reactive.ReactorClientHttpConnector;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.springframework.cloud.kubernetes.client.catalog.KubernetesClientCatalogWatchUtils.patchForEndpointSlices;
|
||||
import static org.springframework.cloud.kubernetes.client.catalog.KubernetesClientCatalogWatchUtils.patchForEndpointSlicesNamespaces;
|
||||
import static org.springframework.cloud.kubernetes.client.catalog.KubernetesClientCatalogWatchUtils.patchForEndpointsNamespaces;
|
||||
import static org.springframework.cloud.kubernetes.integration.tests.commons.Commons.waitForLogStatement;
|
||||
import static org.springframework.cloud.kubernetes.k8s.client.catalog.watcher.KubernetesClientCatalogWatchUtils.patchForEndpointSlices;
|
||||
import static org.springframework.cloud.kubernetes.k8s.client.catalog.watcher.KubernetesClientCatalogWatchUtils.patchForEndpointSlicesNamespaces;
|
||||
import static org.springframework.cloud.kubernetes.k8s.client.catalog.watcher.KubernetesClientCatalogWatchUtils.patchForEndpointsNamespaces;
|
||||
|
||||
/**
|
||||
* @author wind57
|
||||
@@ -59,7 +59,7 @@ import static org.springframework.cloud.kubernetes.integration.tests.commons.Com
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class KubernetesClientCatalogWatchIT {
|
||||
|
||||
private static final String APP_NAME = "spring-cloud-kubernetes-client-catalog-watcher";
|
||||
private static final String APP_NAME = "spring-cloud-kubernetes-k8s-client-catalog-watcher";
|
||||
|
||||
private static final String NAMESPACE = "default";
|
||||
|
||||
@@ -129,12 +129,12 @@ class KubernetesClientCatalogWatchIT {
|
||||
util.busybox(NAMESPACE_A, Phase.CREATE);
|
||||
util.busybox(NAMESPACE_B, Phase.CREATE);
|
||||
patchForEndpointsNamespaces(APP_NAME, NAMESPACE, DOCKER_IMAGE);
|
||||
KubernetesClientCatalogWatchNamespacesDelegate.testCatalogWatchWithEndpointsNamespaces();
|
||||
KubernetesClientCatalogWatchNamespacesDelegate.testCatalogWatchWithEndpointsNamespaces(APP_NAME);
|
||||
|
||||
util.busybox(NAMESPACE_A, Phase.CREATE);
|
||||
util.busybox(NAMESPACE_B, Phase.CREATE);
|
||||
patchForEndpointSlicesNamespaces(APP_NAME, NAMESPACE, DOCKER_IMAGE);
|
||||
KubernetesClientCatalogWatchNamespacesDelegate.testCatalogWatchWithEndpointSlicesNamespaces();
|
||||
KubernetesClientCatalogWatchNamespacesDelegate.testCatalogWatchWithEndpointSlicesNamespaces(APP_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Arrays;
|
||||
@@ -47,8 +47,6 @@ final class KubernetesClientCatalogWatchNamespacesDelegate {
|
||||
|
||||
}
|
||||
|
||||
private static final String APP_NAME = "spring-cloud-kubernetes-client-catalog-watcher";
|
||||
|
||||
private static final String NAMESPACE_A = "namespacea";
|
||||
|
||||
private static final String NAMESPACE_B = "namespaceb";
|
||||
@@ -67,13 +65,13 @@ final class KubernetesClientCatalogWatchNamespacesDelegate {
|
||||
* - assert that we receive only spring-cloud-kubernetes-client-catalog-watcher pod
|
||||
* </pre>
|
||||
*/
|
||||
static void testCatalogWatchWithEndpointsNamespaces() {
|
||||
waitForLogStatement("stateGenerator is of type: KubernetesEndpointsCatalogWatch", K3S, APP_NAME);
|
||||
static void testCatalogWatchWithEndpointsNamespaces(String deploymentName) {
|
||||
waitForLogStatement("stateGenerator is of type: KubernetesEndpointsCatalogWatch", K3S, deploymentName);
|
||||
testForNamespacesFilter();
|
||||
}
|
||||
|
||||
static void testCatalogWatchWithEndpointSlicesNamespaces() {
|
||||
waitForLogStatement("stateGenerator is of type: KubernetesEndpointSlicesCatalogWatch", K3S, APP_NAME);
|
||||
static void testCatalogWatchWithEndpointSlicesNamespaces(String deploymentName) {
|
||||
waitForLogStatement("stateGenerator is of type: KubernetesEndpointSlicesCatalogWatch", K3S, deploymentName);
|
||||
testForNamespacesFilter();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.kubernetes.client.catalog;
|
||||
package org.springframework.cloud.kubernetes.k8s.client.catalog.watcher;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -26,7 +26,7 @@ import static org.springframework.cloud.kubernetes.integration.tests.commons.nat
|
||||
final class KubernetesClientCatalogWatchUtils {
|
||||
|
||||
private static final Map<String, String> POD_LABELS = Map.of("app",
|
||||
"spring-cloud-kubernetes-client-catalog-watcher");
|
||||
"spring-cloud-kubernetes-k8s-client-catalog-watcher");
|
||||
|
||||
private KubernetesClientCatalogWatchUtils() {
|
||||
|
||||
@@ -38,7 +38,7 @@ final class KubernetesClientCatalogWatchUtils {
|
||||
"template": {
|
||||
"spec": {
|
||||
"containers": [{
|
||||
"name": "spring-cloud-kubernetes-client-catalog-watcher",
|
||||
"name": "spring-cloud-kubernetes-k8s-client-catalog-watcher",
|
||||
"image": "image_name_here",
|
||||
"env": [
|
||||
{
|
||||
@@ -63,7 +63,7 @@ final class KubernetesClientCatalogWatchUtils {
|
||||
"template": {
|
||||
"spec": {
|
||||
"containers": [{
|
||||
"name": "spring-cloud-kubernetes-client-catalog-watcher",
|
||||
"name": "spring-cloud-kubernetes-k8s-client-catalog-watcher",
|
||||
"image": "image_name_here",
|
||||
"env": [
|
||||
{
|
||||
@@ -96,7 +96,7 @@ final class KubernetesClientCatalogWatchUtils {
|
||||
"template": {
|
||||
"spec": {
|
||||
"containers": [{
|
||||
"name": "spring-cloud-kubernetes-client-catalog-watcher",
|
||||
"name": "spring-cloud-kubernetes-k8s-client-catalog-watcher",
|
||||
"image": "image_name_here",
|
||||
"env": [
|
||||
{
|
||||
@@ -1,20 +1,20 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spring-cloud-kubernetes-client-catalog-watcher
|
||||
name: spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spring-cloud-kubernetes-client-catalog-watcher
|
||||
app: spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-client-catalog-watcher
|
||||
app: spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
spec:
|
||||
serviceAccountName: spring-cloud-kubernetes-serviceaccount
|
||||
containers:
|
||||
- name: spring-cloud-kubernetes-client-catalog-watcher
|
||||
image: docker.io/springcloud/spring-cloud-kubernetes-client-catalog-watcher
|
||||
- name: spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
image: docker.io/springcloud/spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
imagePullPolicy: IfNotPresent
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: spring-cloud-kubernetes-client-catalog-watcher-ingress
|
||||
name: spring-cloud-kubernetes-k8s-client-catalog-watcher-ingress
|
||||
namespace: default
|
||||
spec:
|
||||
rules:
|
||||
@@ -11,6 +11,6 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: spring-cloud-kubernetes-client-catalog-watcher-service
|
||||
name: spring-cloud-kubernetes-k8s-client-catalog-watcher-service
|
||||
port:
|
||||
number: 8080
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-cloud-kubernetes-k8s-client-catalog-watcher-service
|
||||
name: spring-cloud-kubernetes-k8s-client-catalog-watcher-service
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: spring-cloud-kubernetes-k8s-client-catalog-watcher
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user