This repository was archived by the owner on Sep 30, 2020. It is now read-only.
File tree 2 files changed +8
-12
lines changed
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 9
9
"path/filepath"
10
10
"regexp"
11
11
"sort"
12
+ "strconv"
12
13
"strings"
13
14
"unicode/utf8"
14
15
@@ -362,12 +363,9 @@ func (c *Cluster) ControllerFeatureGates() model.FeatureGates {
362
363
//From kube 1.11 PodPriority and ExpandPersistentVolumes have become enabled by default,
363
364
//so making sure it is not enabled if user has explicitly set them to false
364
365
//https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.11.md#changelog-since-v1110
365
- if ! c .Experimental .Admission .Priority .Enabled {
366
- gates ["PodPriority" ] = "false"
367
- }
368
- if ! c .Experimental .Admission .PersistentVolumeClaimResize .Enabled {
369
- gates ["ExpandPersistentVolumes" ] = "false"
370
- }
366
+ gates ["PodPriority" ] = strconv .FormatBool (c .Experimental .Admission .Priority .Enabled )
367
+ gates ["ExpandPersistentVolumes" ] = strconv .FormatBool (c .Experimental .Admission .PersistentVolumeClaimResize .Enabled )
368
+
371
369
return gates
372
370
}
373
371
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package config
2
2
3
3
import (
4
4
"fmt"
5
+ "strconv"
5
6
"strings"
6
7
7
8
"github.com/go-yaml/yaml"
@@ -300,12 +301,9 @@ func (c ProvidedConfig) FeatureGates() model.FeatureGates {
300
301
//From kube 1.11 PodPriority and ExpandPersistentVolumes have become enabled by default,
301
302
//so making sure it is not enabled if user has explicitly set them to false
302
303
//https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.11.md#changelog-since-v1110
303
- if ! c .Experimental .Admission .Priority .Enabled {
304
- gates ["PodPriority" ] = "false"
305
- }
306
- if ! c .Experimental .Admission .PersistentVolumeClaimResize .Enabled {
307
- gates ["ExpandPersistentVolumes" ] = "false"
308
- }
304
+ gates ["PodPriority" ] = strconv .FormatBool (c .Experimental .Admission .Priority .Enabled )
305
+ gates ["ExpandPersistentVolumes" ] = strconv .FormatBool (c .Experimental .Admission .PersistentVolumeClaimResize .Enabled )
306
+
309
307
return gates
310
308
}
311
309
You can’t perform that action at this time.
0 commit comments