Skip to content

Commit e4c9f5c

Browse files
authored
if defined, use top-level replicas as default for clusters (#899)
* extractDomainResource should use the replica count when specified in the kubernetes section as the default cluster replicas count instead of the cluster size
1 parent ff7a0eb commit e4c9f5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/main/python/wlsdeploy/tool/extract/domain_resource_extractor.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ def _update_resource_dictionary(self, resource_dict):
251251
cluster_list = list()
252252
spec_section[CLUSTERS] = cluster_list
253253
for cluster_name, cluster_values in model_clusters.items():
254-
server_count = k8s_helper.get_server_count(cluster_name, cluster_values, self._model.get_model(),
255-
self._aliases)
254+
if REPLICAS in spec_section:
255+
server_count = spec_section[REPLICAS]
256+
else:
257+
server_count = k8s_helper.get_server_count(cluster_name, cluster_values,
258+
self._model.get_model(), self._aliases)
256259
cluster_dict = PyOrderedDict()
257260
cluster_dict[CLUSTER_NAME] = cluster_name
258261
cluster_dict[REPLICAS] = server_count

0 commit comments

Comments
 (0)