mirror of https://github.com/rancher/ui.git
Cluster options in Edit as a Form are not all configurable in current Edit as YAML option
https://github.com/rancher/rancher/issues/15396
This commit is contained in:
parent
d7961211cf
commit
447f5838f4
|
|
@ -492,6 +492,11 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
return '';
|
||||
}
|
||||
|
||||
let cluster = this.getSupportedFields(get(this, 'cluster'), 'cluster');
|
||||
|
||||
delete cluster.rancher_kubernetes_engine_config
|
||||
Object.assign(config, cluster)
|
||||
|
||||
config = removeEmpty(config, EXCLUDED_KEYS);
|
||||
|
||||
while ( JSON.stringify(config) !== JSON.stringify(removeEmpty(config, EXCLUDED_KEYS)) ){
|
||||
|
|
@ -538,11 +543,23 @@ export default InputTextFile.extend(ClusterDriver, {
|
|||
set(this, 'clusterOptErrors', []);
|
||||
|
||||
const validFields = this.getResourceFields('rancherKubernetesEngineConfig');
|
||||
const clusterFields = this.getResourceFields('cluster');
|
||||
|
||||
Object.keys(configs || {}).forEach((key) => {
|
||||
if ( validFields[underlineToCamel(key)] ) {
|
||||
if ( validFields[underlineToCamel(key)] || clusterFields[underlineToCamel(key)] ) {
|
||||
if (configs[key] === null) {
|
||||
return
|
||||
}
|
||||
const obj = keysToCamel(configs[key]);
|
||||
|
||||
const clusterKey = ['docker_root_dir', 'enable_cluster_alerting', 'enable_cluster_monitoring', 'enable_network_policy']
|
||||
|
||||
if (clusterKey.includes(key)) {
|
||||
set(this, `cluster.${ underlineToCamel(key) }`, obj)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if ( key === 'services' && obj['kube-api'] ) {
|
||||
set(obj, 'kubeApi', obj['kube-api']);
|
||||
delete obj['kube-api'];
|
||||
|
|
|
|||
|
|
@ -6802,3 +6802,6 @@ rkeConfigComment:
|
|||
" kubelet:"
|
||||
" cluster_domain: cluster.local"
|
||||
" cluster_dns_server: 10.43.0.10"
|
||||
docker_root_dir: |
|
||||
""
|
||||
" # Rancher Config"
|
||||
|
|
@ -6650,3 +6650,6 @@ rkeConfigComment:
|
|||
" # 修改空间配额为$((4*1024*1024*1024)),默认2G,最大8G"
|
||||
" extra_args:"
|
||||
" quota-backend-bytes: '4294967296'"
|
||||
docker_root_dir: |
|
||||
""
|
||||
" # 自定义Rancher参数"
|
||||
Loading…
Reference in New Issue