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 {
|
||||
set(this, 'config.services', { kubeApi: { podSecurityPolicy: value } });
|
||||
set(this, 'config.services.kubeApi.podSecurityPolicy', value );
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
@ -727,13 +727,13 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
|||
|
||||
kubeApiPSAC: computed('config.services.kubeApi.podSecurityConfiguration', {
|
||||
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 get(pspConfig, 'podSecurityConfiguration');
|
||||
return get(psaConfig, 'podSecurityConfiguration');
|
||||
},
|
||||
set(key, value) {
|
||||
if (!value){
|
||||
|
|
@ -748,7 +748,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
|||
}),
|
||||
}));
|
||||
} 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() {
|
||||
// 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
|
||||
}}
|
||||
{{new-select
|
||||
content=model.psacs
|
||||
content=psaOpts
|
||||
optionLabelPath="displayName"
|
||||
optionValuePath="id"
|
||||
localizedPrompt=true
|
||||
value=config.services.kubeApi.podSecurityConfiguration
|
||||
value=kubeApiPSAC
|
||||
}}
|
||||
{{/input-or-display}}
|
||||
</CheckOverrideAllowed>
|
||||
|
|
|
|||
|
|
@ -4472,6 +4472,7 @@ clusterNew:
|
|||
shortLabel: Open Telekom Cloud CCE
|
||||
psa:
|
||||
label: Pod Security Admission Configuration Template
|
||||
default: Default
|
||||
psp:
|
||||
label: Default Pod Security Policy
|
||||
none: No policies are defined
|
||||
|
|
|
|||
Loading…
Reference in New Issue