mirror of https://github.com/rancher/ui.git
add rke1 psac default option
This commit is contained in:
parent
9ba86b94ab
commit
ef010cde9c
|
|
@ -718,7 +718,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
set(this, 'config.services', { kubeApi: { podSecurityPolicy: value } });
|
set(this, 'config.services.kubeApi.podSecurityPolicy', value );
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
@ -727,13 +727,13 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
|
|
||||||
kubeApiPSAC: computed('config.services.kubeApi.podSecurityConfiguration', {
|
kubeApiPSAC: computed('config.services.kubeApi.podSecurityConfiguration', {
|
||||||
get() {
|
get() {
|
||||||
let pspConfig = get(this, 'config.services.kubeApi');
|
let psaConfig = get(this, 'config.services.kubeApi');
|
||||||
|
|
||||||
if (typeof pspConfig === 'undefined') {
|
if (typeof psaConfig === 'undefined') {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return get(pspConfig, 'podSecurityConfiguration');
|
return get(psaConfig, 'podSecurityConfiguration');
|
||||||
},
|
},
|
||||||
set(key, value) {
|
set(key, value) {
|
||||||
if (!value){
|
if (!value){
|
||||||
|
|
@ -748,7 +748,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
set(this, 'config.services', { kubeApi: { podSecurityConfiguration: value } });
|
set(this, 'config.services.kubeApi.podSecurityConfiguration', value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -756,6 +756,15 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
psaOpts: computed('model.psacs.[]', function(){
|
||||||
|
let psacs = get(this, 'model.psacs').toArray()
|
||||||
|
const intl = get(this, 'intl');
|
||||||
|
|
||||||
|
return [
|
||||||
|
{ displayName: intl.t('clusterNew.psa.default'), },
|
||||||
|
...psacs]
|
||||||
|
}),
|
||||||
|
|
||||||
|
|
||||||
supportsPSA: computed('config.kubernetesVersion', function() {
|
supportsPSA: computed('config.kubernetesVersion', function() {
|
||||||
// rke config supports PSA if version >= 1.23.0 - this is also when PSP support ends
|
// rke config supports PSA if version >= 1.23.0 - this is also when PSP support ends
|
||||||
|
|
|
||||||
|
|
@ -543,11 +543,11 @@
|
||||||
value=config.services.kubeApi.podSecurityConfiguration
|
value=config.services.kubeApi.podSecurityConfiguration
|
||||||
}}
|
}}
|
||||||
{{new-select
|
{{new-select
|
||||||
content=model.psacs
|
content=psaOpts
|
||||||
optionLabelPath="displayName"
|
optionLabelPath="displayName"
|
||||||
optionValuePath="id"
|
optionValuePath="id"
|
||||||
localizedPrompt=true
|
localizedPrompt=true
|
||||||
value=config.services.kubeApi.podSecurityConfiguration
|
value=kubeApiPSAC
|
||||||
}}
|
}}
|
||||||
{{/input-or-display}}
|
{{/input-or-display}}
|
||||||
</CheckOverrideAllowed>
|
</CheckOverrideAllowed>
|
||||||
|
|
|
||||||
|
|
@ -4472,6 +4472,7 @@ clusterNew:
|
||||||
shortLabel: Open Telekom Cloud CCE
|
shortLabel: Open Telekom Cloud CCE
|
||||||
psa:
|
psa:
|
||||||
label: Pod Security Admission Configuration Template
|
label: Pod Security Admission Configuration Template
|
||||||
|
default: Default
|
||||||
psp:
|
psp:
|
||||||
label: Default Pod Security Policy
|
label: Default Pod Security Policy
|
||||||
none: No policies are defined
|
none: No policies are defined
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue