Skip to content

Commit d15320e

Browse files
committed
Merge branch 'helm-large-integers' into 'main'
working around Helm bug #1707 See merge request weblogic-cloud/weblogic-toolkit-ui!246
2 parents 22dc8ff + eaa3834 commit d15320e

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

electron/app/js/helmUtils.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
*/
66
'use strict';
@@ -250,6 +250,12 @@ function processHelmChartValues(args, helmChartValues) {
250250
args.push('--timeout', `${propertyValue}m`);
251251
break;
252252

253+
// Workaround Helm bug #1707 that formats large integers in scientific notation...
254+
//
255+
case 'javaLoggingFileSizeLimit':
256+
args.push('--set-string', formatSetArgument(propertyName, propertyValue));
257+
break;
258+
253259
default:
254260
args.push('--set', formatSetArgument(propertyName, propertyValue));
255261
break;

webui/src/js/utils/k8s-domain-deployer.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
*/
66
'use strict';
@@ -123,6 +123,13 @@ function (K8sDomainActionsBase, project, wktConsole, i18n, projectIo, dialogHelp
123123
break;
124124
}
125125

126+
// Prior to WKO 4.1.0, the operator Helm charts were vulnerable to Helm bug #1707 that mangles the value of
127+
// large integers by putting them in scientific notation. This causes the javaLoggingFileSizeLimit to not be
128+
// honored. As a workaround, always include this parameter in the Helm chart values. The code processing this
129+
// collection will use --set-string for this property to ensure that it is set correctly.
130+
//
131+
helmChartValues['javaLoggingFileSizeLimit'] = this.project.wko.javaLoggingFileSizeLimit.value;
132+
126133
// Run helm upgrade so that operator picks up the new namespace.
127134
//
128135
// Skip passing kubectlExe and kubectlOptions args since the installed version

webui/src/js/utils/wko-actions-base.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2023, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
*/
66
'use strict';
@@ -176,7 +176,7 @@ function(WktActionsBase, project, wktConsole, i18n, projectIo, dialogHelper, val
176176
// Only put the values in here where the UI is not following the operator helm chart's default values.
177177
//
178178
serviceAccount: operatorServiceAccount,
179-
domainNamespaceSelectionStrategy: this.project.wko.operatorDomainNamespaceSelectionStrategy.value
179+
domainNamespaceSelectionStrategy: this.project.wko.operatorDomainNamespaceSelectionStrategy.value,
180180
};
181181

182182
if (!this.isValueEmpty(this.project.wko.operatorImage.value)) {
@@ -232,9 +232,15 @@ function(WktActionsBase, project, wktConsole, i18n, projectIo, dialogHelper, val
232232
}
233233

234234
this.addHelmChartValueIfSet(helmChartValues, 'javaLoggingLevel', this.project.wko.javaLoggingLevel);
235-
this.addHelmChartValueIfSet(helmChartValues, 'javaLoggingFileSizeLimit', this.project.wko.javaLoggingFileSizeLimit);
236235
this.addHelmChartValueIfSet(helmChartValues, 'javaLoggingFileCount', this.project.wko.javaLoggingFileCount);
237236

237+
// Prior to WKO 4.1.0, the operator Helm charts were vulnerable to Helm bug #1707 that mangles the value of
238+
// large integers by putting them in scientific notation. This causes the javaLoggingFileSizeLimit to not be
239+
// honored. As a workaround, always include this parameter in the Helm chart values. The code processing this
240+
// collection will use --set-string for this property to ensure that it is set correctly.
241+
//
242+
helmChartValues['javaLoggingFileSizeLimit'] = this.project.wko.javaLoggingFileSizeLimit.value;
243+
238244
if (this.project.wko.nodeSelector.hasValue()) {
239245
const nodeSelectorMap = {};
240246
this.project.wko.nodeSelector.value.forEach(label => {

0 commit comments

Comments
 (0)