diff --git a/.github/workflows/composites/pre-test-actions/action.yaml b/.github/workflows/composites/pre-test-actions/action.yaml index 1a39eaa5ec..b11abd2616 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 -Dspring-boot.build-image.skip=true -DskipITs -DskipTests -T1C -U -B -q + ./mvnw clean install -P 'run-on-github-actions' -Dspring-boot.build-image.skip=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 9f143ad799..a6a6ae63eb 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 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2020 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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..cf0706da0e 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 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2020 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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..f9208a15cf 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 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2022 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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..575ad8861e 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 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2021 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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 cecd3232ea..a259ce3a5c 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 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2021 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,16 +62,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;