1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-25 15:01:58 +00:00

Merge pull request #3265 from kinarashah/14r

[v1.4] Updates for v1.4.6
This commit is contained in:
Kinara Shah 2023-06-21 09:28:21 -07:00 committed by GitHub
commit 040e3591a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 19 deletions

View File

@ -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
}
}

View File

@ -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