Commit 0cdd003
committed
WIP: flag plumbing
Notes:
Some of these parse into a map in their config and then call SetFromMap -- need to retain ability to pass in via config.
Option 1: make a `feature.EnableMapControl()`
Option 2: pass map into `feature.EnablePFlagControl()`
Option 3: `feature.GetAllGates(feature.FromFlags(flagName), feature.FromEnv(prefix))`
This is probablay most correct today and makes validation easy,
since we do it exactly once. A little awkward with any dynamic
source (e.g. API).
Should env enablement be part of "AddFlags" logic in these components?
It's a little muddy how apps are configured.
```
$ for f in _output/bin/*; do X=$($f --help 2>&1 | grep gates); if [[ -z "$X" ]]; then X=$($f init --help 2>&1 | grep gates); fi; if [[ -n "$X" ]]; then echo; echo "$f"; echo "$X"; fi; done
_output/bin/apiextensions-apiserver
--feature-gates mapStringBool 4444 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/e2e_node.test
--feature-gates mapStringBool 6666 A set of key=value pairs that describe feature gates for alpha/experimental features.
--service-feature-gates mapStringBool 7777 A set of key=value pairs that describe feature gates for alpha/experimental features for API service.
_output/bin/kubeadm
--feature-gates string 2222 A set of key=value pairs that describe feature gates for various features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kube-aggregator
--feature-gates mapStringBool 4444 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kube-apiserver
--feature-gates mapStringBool 4444 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kube-controller-manager
--feature-gates mapStringBool 4444 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kubelet
--feature-gates mapStringBool 3333 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kube-proxy
--feature-gates mapStringBool 1111 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
_output/bin/kube-scheduler
--feature-gates mapStringBool 4444 A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
--new-feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
```1 parent ae307ea commit 0cdd003
File tree
9 files changed
+37
-0
lines changed- cmd
- kube-controller-manager/app/options
- kube-proxy/app
- kube-scheduler/app/options
- kubeadm/app
- cmd
- upgrade
- features
- kubelet/app
- staging/src/k8s.io
- cloud-provider/options
- sample-apiserver/pkg/cmd/server
9 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| 278 | + | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
579 | 583 | | |
580 | 584 | | |
581 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
| |||
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
| 380 | + | |
376 | 381 | | |
377 | 382 | | |
378 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
0 commit comments