diff --git a/.github/workflows/composites/pre-test-actions/action.yaml b/.github/workflows/composites/pre-test-actions/action.yaml index 2b372d2737..8e48f4a1f6 100644 --- a/.github/workflows/composites/pre-test-actions/action.yaml +++ b/.github/workflows/composites/pre-test-actions/action.yaml @@ -24,7 +24,7 @@ runs: - name: build project shell: bash run: | - ./mvnw clean install -Dskip.build.image=true -DskipITs -DskipTests -T1C -U -B -q + ./mvnw clean install -P 'run-on-github-actions' -Dskip.build.image=true -DskipITs -DskipTests -T1C -U -B -q - name: build controllers project uses: ./.github/workflows/composites/build-controllers-project diff --git a/spring-cloud-kubernetes-client-autoconfig/src/main/java/org/springframework/cloud/kubernetes/client/KubernetesClientAutoConfiguration.java b/spring-cloud-kubernetes-client-autoconfig/src/main/java/org/springframework/cloud/kubernetes/client/KubernetesClientAutoConfiguration.java index e58107464d..bec49c7d00 100644 --- a/spring-cloud-kubernetes-client-autoconfig/src/main/java/org/springframework/cloud/kubernetes/client/KubernetesClientAutoConfiguration.java +++ b/spring-cloud-kubernetes-client-autoconfig/src/main/java/org/springframework/cloud/kubernetes/client/KubernetesClientAutoConfiguration.java @@ -40,20 +40,11 @@ @AutoConfigureAfter(KubernetesCommonsAutoConfiguration.class) public class KubernetesClientAutoConfiguration { - /** - * this bean will be based on - * {@link org.springframework.cloud.kubernetes.commons.discovery.KubernetesDiscoveryProperties} - * in the next major release. - */ - @Deprecated(forRemoval = true) @Bean @ConditionalOnMissingBean - public ApiClient apiClient(Environment environment) { + public ApiClient apiClient(KubernetesClientProperties clientProperties) { ApiClient apiClient = kubernetesApiClient(); - // it's too early to inject KubernetesClientProperties here, all its properties - // are missing. For the time being work-around with reading from the environment. - apiClient.setUserAgent(environment.getProperty("spring.cloud.kubernetes.client.user-agent", - KubernetesClientProperties.DEFAULT_USER_AGENT)); + apiClient.setUserAgent(clientProperties.userAgent()); return apiClient; } diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableConfigMapPropertySourceLocator.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableConfigMapPropertySourceLocator.java index 6bb155bca9..93215101d6 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableConfigMapPropertySourceLocator.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableConfigMapPropertySourceLocator.java @@ -35,22 +35,6 @@ public class ConfigDataRetryableConfigMapPropertySourceLocator extends ConfigMap private ConfigMapPropertySourceLocator configMapPropertySourceLocator; - /** - * This constructor is deprecated, and we do not use it anymore internally. It will be - * removed in the next major release. - */ - @Deprecated(forRemoval = true) - public ConfigDataRetryableConfigMapPropertySourceLocator( - ConfigMapPropertySourceLocator configMapPropertySourceLocator, ConfigMapConfigProperties properties) { - super(properties); - this.configMapPropertySourceLocator = configMapPropertySourceLocator; - this.retryTemplate = RetryTemplate.builder() - .maxAttempts(properties.retry().maxAttempts()) - .exponentialBackoff(properties.retry().initialInterval(), properties.retry().multiplier(), - properties.retry().maxInterval()) - .build(); - } - public ConfigDataRetryableConfigMapPropertySourceLocator( ConfigMapPropertySourceLocator configMapPropertySourceLocator, ConfigMapConfigProperties properties, ConfigMapCache cache) { diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableSecretsPropertySourceLocator.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableSecretsPropertySourceLocator.java index d0c70e72f3..32255e0f3a 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableSecretsPropertySourceLocator.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigDataRetryableSecretsPropertySourceLocator.java @@ -34,22 +34,6 @@ public class ConfigDataRetryableSecretsPropertySourceLocator extends SecretsProp private SecretsPropertySourceLocator secretsPropertySourceLocator; - /** - * This constructor is deprecated, and we do not use it anymore internally. It will be - * removed in the next major release. - */ - @Deprecated(forRemoval = true) - public ConfigDataRetryableSecretsPropertySourceLocator(SecretsPropertySourceLocator propertySourceLocator, - SecretsConfigProperties secretsConfigProperties) { - super(secretsConfigProperties); - this.secretsPropertySourceLocator = propertySourceLocator; - this.retryTemplate = RetryTemplate.builder() - .maxAttempts(properties.retry().maxAttempts()) - .exponentialBackoff(properties.retry().initialInterval(), properties.retry().multiplier(), - properties.retry().maxInterval()) - .build(); - } - public ConfigDataRetryableSecretsPropertySourceLocator(SecretsPropertySourceLocator propertySourceLocator, SecretsConfigProperties secretsConfigProperties, SecretsCache cache) { super(secretsConfigProperties, cache); diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigMapPropertySourceLocator.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigMapPropertySourceLocator.java index 4fe25ff676..2d4fc7ab36 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigMapPropertySourceLocator.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigMapPropertySourceLocator.java @@ -56,16 +56,6 @@ public abstract class ConfigMapPropertySourceLocator implements PropertySourceLo protected final ConfigMapConfigProperties properties; - /** - * This constructor is deprecated, and we do not use it anymore internally. It will be - * removed in the next major release. - */ - @Deprecated(forRemoval = true) - public ConfigMapPropertySourceLocator(ConfigMapConfigProperties properties) { - this.properties = properties; - this.cache = new ConfigMapCache.NOOPCache(); - } - public ConfigMapPropertySourceLocator(ConfigMapConfigProperties properties, ConfigMapCache cache) { this.properties = properties; this.cache = cache; diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/SecretsPropertySourceLocator.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/SecretsPropertySourceLocator.java index 07365b3fe5..158b3e318e 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/SecretsPropertySourceLocator.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/SecretsPropertySourceLocator.java @@ -61,16 +61,6 @@ public abstract class SecretsPropertySourceLocator implements PropertySourceLoca protected final SecretsConfigProperties properties; - /** - * This constructor is deprecated, and we do not use it anymore internally. It will be - * removed in the next major release. - */ - @Deprecated(forRemoval = true) - public SecretsPropertySourceLocator(SecretsConfigProperties properties) { - this.properties = properties; - this.cache = new SecretsCache.NOOPCache(); - } - public SecretsPropertySourceLocator(SecretsConfigProperties properties, SecretsCache cache) { this.properties = properties; this.cache = cache; diff --git a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshMultipleNamespacesIT.java b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshMultipleNamespacesIT.java index d09a9028bb..d8f8680026 100644 --- a/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshMultipleNamespacesIT.java +++ b/spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshMultipleNamespacesIT.java @@ -49,8 +49,6 @@ class ActuatorRefreshMultipleNamespacesIT { private static final String WIREMOCK_HOST = "localhost"; - private static final String WIREMOCK_PATH = "/"; - private static final int WIREMOCK_PORT = 80; private static final String DEFAULT_NAMESPACE = "default";