Skip to content

Commit 2ff03da

Browse files
committed
dirty
1 parent 6b230b6 commit 2ff03da

File tree

7 files changed

+17
-26
lines changed

7 files changed

+17
-26
lines changed

spring-cloud-kubernetes-client-config/src/main/java/org/springframework/cloud/kubernetes/client/config/NamedConfigMapContextToSourceDataProvider.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public KubernetesClientContextToSourceData get() {
4545
return new NamedSourceData() {
4646
@Override
4747
protected String generateSourceName(String target, String sourceName, String namespace,
48-
String[] activeProfiles, boolean namespacedBatchRead) {
48+
String[] activeProfiles) {
4949
if (source.appendProfileToName()) {
5050
return ConfigUtils.sourceName(target, sourceName, namespace, activeProfiles);
5151
}
52-
return super.generateSourceName(target, sourceName, namespace, activeProfiles, namespacedBatchRead);
52+
return super.generateSourceName(target, sourceName, namespace, activeProfiles);
5353
}
5454

5555
@Override
@@ -58,8 +58,7 @@ public MultipleSourcesContainer dataSupplier(LinkedHashSet<String> sourceNames)
5858
sourceNames, context.environment(), context.namespacedBatchRead());
5959
}
6060
}.compute(source.name().orElseThrow(), source.prefix(), source.target(), source.profileSpecificSources(),
61-
source.failFast(), context.namespace(), context.environment().getActiveProfiles(),
62-
context.namespacedBatchRead());
61+
source.failFast(), context.namespace(), context.environment().getActiveProfiles());
6362
};
6463

6564
}

spring-cloud-kubernetes-client-config/src/main/java/org/springframework/cloud/kubernetes/client/config/NamedSecretContextToSourceDataProvider.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,20 @@ public KubernetesClientContextToSourceData get() {
4444
return new NamedSourceData() {
4545
@Override
4646
protected String generateSourceName(String target, String sourceName, String namespace,
47-
String[] activeProfiles, boolean namesspacedBatchRead) {
47+
String[] activeProfiles) {
4848
if (source.appendProfileToName()) {
4949
return ConfigUtils.sourceName(target, sourceName, namespace, activeProfiles);
5050
}
51-
return super.generateSourceName(target, sourceName, namespace, activeProfiles,
52-
namesspacedBatchRead);
51+
return super.generateSourceName(target, sourceName, namespace, activeProfiles);
5352
}
5453

5554
@Override
5655
public MultipleSourcesContainer dataSupplier(LinkedHashSet<String> sourceNames) {
5756
return KubernetesClientConfigUtils.secretsDataByName(context.client(), context.namespace(),
58-
sourceNames, context.environment(), context.includeDefaultProfileData());
57+
sourceNames, context.environment(), context.namespacedBatchRead());
5958
}
6059
}.compute(source.name().orElseThrow(), source.prefix(), source.target(), source.profileSpecificSources(),
61-
source.failFast(), context.namespace(), context.environment().getActiveProfiles(),
62-
context.namespacedBatchRead());
60+
source.failFast(), context.namespace(), context.environment().getActiveProfiles());
6361
};
6462
}
6563

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/NamedConfigMapContextToSourceDataProviderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void matchIncludeSingleProfile() {
173173
MockEnvironment environment = new MockEnvironment();
174174
environment.setActiveProfiles("with-profile");
175175
KubernetesClientConfigContext context = new KubernetesClientConfigContext(api, source, NAMESPACE, environment,
176-
true, NAMESPACED_BATCH_READ);
176+
false, NAMESPACED_BATCH_READ);
177177

178178
KubernetesClientContextToSourceData data = new NamedConfigMapContextToSourceDataProvider().get();
179179
SourceData sourceData = data.apply(context);

spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/LabeledSourceData.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public final SourceData compute(Map<String, String> labels, ConfigUtils.Prefix p
8080
* Implementation specific (fabric8 or k8s-native) way to get the data from then given
8181
* source names.
8282
* @param labels the ones that have been configured
83-
* @param profiles profiles to taken into account when gathering source data. Can be
84-
* empty.
8583
* @return a container that holds the names of the source that were found and their
8684
* data
8785
*/

spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/NamedSourceData.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public abstract class NamedSourceData {
3333

3434
public final SourceData compute(String sourceName, ConfigUtils.Prefix prefix, String target, boolean profileSources,
35-
boolean failFast, String namespace, String[] activeProfiles, boolean namespacedBatchRead) {
35+
boolean failFast, String namespace, String[] activeProfiles) {
3636

3737
LinkedHashSet<String> sourceNames = new LinkedHashSet<>();
3838
// first comes non-profile based source
@@ -67,12 +67,10 @@ public final SourceData compute(String sourceName, ConfigUtils.Prefix prefix, St
6767
}
6868

6969
String names = data.names().stream().sorted().collect(Collectors.joining(PROPERTY_SOURCE_NAME_SEPARATOR));
70-
return new SourceData(generateSourceName(target, names, namespace, activeProfiles, namespacedBatchRead),
71-
data.data());
70+
return new SourceData(generateSourceName(target, names, namespace, activeProfiles), data.data());
7271
}
7372

74-
protected String generateSourceName(String target, String sourceName, String namespace, String[] activeProfiles,
75-
boolean namespacedBatchRead) {
73+
protected String generateSourceName(String target, String sourceName, String namespace, String[] activeProfile) {
7674
return ConfigUtils.sourceName(target, sourceName, namespace);
7775
}
7876

spring-cloud-kubernetes-fabric8-config/src/main/java/org/springframework/cloud/kubernetes/fabric8/config/NamedConfigMapContextToSourceDataProvider.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ public Fabric8ContextToSourceData get() {
5353

5454
@Override
5555
protected String generateSourceName(String target, String sourceName, String namespace,
56-
String[] activeProfiles, boolean namespacedBatchRead) {
56+
String[] activeProfiles) {
5757
if (source.appendProfileToName()) {
5858
return ConfigUtils.sourceName(target, sourceName, namespace, activeProfiles);
5959
}
60-
return super.generateSourceName(target, sourceName, namespace, activeProfiles, namespacedBatchRead);
60+
return super.generateSourceName(target, sourceName, namespace, activeProfiles);
6161
}
6262

6363
@Override
@@ -66,8 +66,7 @@ public MultipleSourcesContainer dataSupplier(LinkedHashSet<String> sourceNames)
6666
context.environment(), context.namespacedBatchRead());
6767
}
6868
}.compute(source.name().orElseThrow(), source.prefix(), source.target(), source.profileSpecificSources(),
69-
source.failFast(), context.namespace(), context.environment().getActiveProfiles(),
70-
context.namespacedBatchRead());
69+
source.failFast(), context.namespace(), context.environment().getActiveProfiles());
7170
};
7271

7372
}

spring-cloud-kubernetes-fabric8-config/src/main/java/org/springframework/cloud/kubernetes/fabric8/config/NamedSecretContextToSourceDataProvider.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public Fabric8ContextToSourceData get() {
4343
return new NamedSourceData() {
4444
@Override
4545
protected String generateSourceName(String target, String sourceName, String namespace,
46-
String[] activeProfiles, boolean namespacedBatchRead) {
46+
String[] activeProfiles) {
4747
if (source.appendProfileToName()) {
4848
return ConfigUtils.sourceName(target, sourceName, namespace, activeProfiles);
4949
}
50-
return super.generateSourceName(target, sourceName, namespace, activeProfiles, namespacedBatchRead);
50+
return super.generateSourceName(target, sourceName, namespace, activeProfiles);
5151
}
5252

5353
@Override
@@ -56,8 +56,7 @@ public MultipleSourcesContainer dataSupplier(LinkedHashSet<String> sourceNames)
5656
context.environment(), context.namespacedBatchRead());
5757
}
5858
}.compute(source.name().orElseThrow(), source.prefix(), source.target(), source.profileSpecificSources(),
59-
source.failFast(), context.namespace(), context.environment().getActiveProfiles(),
60-
context.namespacedBatchRead());
59+
source.failFast(), context.namespace(), context.environment().getActiveProfiles());
6160
};
6261
}
6362

0 commit comments

Comments
 (0)