Merge pull request #3220 from loganhz/gke-cp

Fix cluster yaml issue
This commit is contained in:
Vincent Fiduccia 2019-08-12 11:04:53 -07:00 committed by GitHub
commit 6e6edbe07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -483,6 +483,7 @@ export function keysToDecamelize(obj, ignore = [], drop = []) {
return obj;
}
const UNDER_SCORE_PARAMS = ['.rancher_kubernetes_engine_config.network.options'];
const KUBE_SERVICES = ['.rancher_kubernetes_engine_config.services'];
export function keysToCamel(obj, path = '') {
if ( !typeof (obj) === 'object' || typeof (obj) === 'string' || typeof (obj) === 'number' || typeof (obj) === 'boolean' || isEmpty(obj) ) {
@ -496,7 +497,9 @@ export function keysToCamel(obj, path = '') {
let titleKey = key;
if ( UNDER_SCORE_PARAMS.indexOf(path) === -1 ) {
if ( KUBE_SERVICES.indexOf(path) > -1 ) {
titleKey = underlineToCamel(key.replace(/-/g, '_'));
} else if ( UNDER_SCORE_PARAMS.indexOf(path) === -1 ) {
titleKey = underlineToCamel(key);
}