Skip to content

Commit

Permalink
[statefulset] Ensure bundlebee.kube.filters.statefuleset.spec.allowed…
Browse files Browse the repository at this point in the history
… is properly handled and documentation is right
  • Loading branch information
rmannibucau committed Sep 12, 2023
1 parent 04d8262 commit 15a33d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class KubeClient implements ConfigHolder {
private boolean logDescriptorOnParsingError;

@Inject
@Description("Should YAML/JSON be logged when it can't be parsed.")
@Description("The attributes to keep from `StatefulSet` (`spec` children) descriptor on updates.")
@ConfigProperty(name = "bundlebee.kube.filters.statefuleset.spec.allowed", defaultValue = "replicas,template,updateStrategy,persistentVolumeClaimRetentionPolicy,minReadySeconds,serviceName,selector")
private Set<String> statefulsetSpecAllowedAttributes;

Expand Down Expand Up @@ -540,7 +540,7 @@ private JsonObject filterSpec(final String ref, final JsonObject desc, final Col
log.info(() -> "Important: filtering descriptor spec attributes (" + ref + ") for update (" +
spec.keySet().stream().filter(it -> !allowed.contains(it)).collect(joining(", ")) +
" update is not supported)");
return jsonBuilderFactory.createObjectBuilder(spec.entrySet().stream()
return jsonBuilderFactory.createObjectBuilder(desc.entrySet().stream()
.filter(it -> !"spec".equals(it.getKey()))
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue)))
.add("spec", jsonBuilderFactory.createObjectBuilder(spec.entrySet().stream()
Expand Down

0 comments on commit 15a33d0

Please sign in to comment.