mirror of
https://github.com/rancher/rke.git
synced 2025-06-25 15:01:58 +00:00
commit
040e3591a3
@ -404,15 +404,8 @@ func (c *Cluster) setClusterServicesDefaults() {
|
||||
c.Services.KubeAPI.EventRateLimit.Configuration == nil {
|
||||
c.Services.KubeAPI.EventRateLimit.Configuration = newDefaultEventRateLimitConfig()
|
||||
}
|
||||
parsedVersion, err := getClusterVersion(c.Version)
|
||||
if err != nil {
|
||||
logrus.Warnf("Can not parse the cluster version [%s] to determine wether to set the default PodSecurityConfiguration: %v", c.Version, err)
|
||||
} else {
|
||||
if parsedRangeAtLeast123(parsedVersion) {
|
||||
if len(c.Services.KubeAPI.PodSecurityConfiguration) == 0 {
|
||||
c.Services.KubeAPI.PodSecurityConfiguration = PodSecurityPrivileged
|
||||
}
|
||||
}
|
||||
if len(c.Services.KubeAPI.PodSecurityConfiguration) == 0 {
|
||||
c.Services.KubeAPI.PodSecurityConfiguration = PodSecurityPrivileged
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,17 +167,11 @@ func (c *Cluster) getConsolidatedAdmissionConfiguration() (*apiserverv1.Admissio
|
||||
_ = setPluginConfiguration(admissionConfig, ertConfig)
|
||||
|
||||
// PodSecurity
|
||||
parsedVersion, err := getClusterVersion(c.Version)
|
||||
psConfig, err := c.getPodSecurityAdmissionPluginConfiguration()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if parsedRangeAtLeast123(parsedVersion) {
|
||||
psConfig, err := c.getPodSecurityAdmissionPluginConfiguration()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_ = setPluginConfiguration(admissionConfig, psConfig)
|
||||
}
|
||||
_ = setPluginConfiguration(admissionConfig, psConfig)
|
||||
|
||||
return admissionConfig, nil
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user