File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
cmd/kubeadm/app/cmd/upgrade Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,11 @@ type diffFlags struct {
57
57
// newCmdDiff returns the cobra command for `kubeadm upgrade diff`
58
58
func newCmdDiff (out io.Writer ) * cobra.Command {
59
59
flags := & diffFlags {
60
- kubeConfigPath : constants .GetAdminKubeConfigPath (),
61
- out : out ,
60
+ kubeConfigPath : constants .GetAdminKubeConfigPath (),
61
+ out : out ,
62
+ apiServerManifestPath : constants .GetStaticPodFilepath (constants .KubeAPIServer , constants .GetStaticPodDirectory ()),
63
+ controllerManagerManifestPath : constants .GetStaticPodFilepath (constants .KubeControllerManager , constants .GetStaticPodDirectory ()),
64
+ schedulerManifestPath : constants .GetStaticPodFilepath (constants .KubeScheduler , constants .GetStaticPodDirectory ()),
62
65
}
63
66
64
67
cmd := & cobra.Command {
@@ -88,9 +91,6 @@ func newCmdDiff(out io.Writer) *cobra.Command {
88
91
89
92
func validateManifestsPath (manifests ... string ) (err error ) {
90
93
for _ , manifestPath := range manifests {
91
- if len (manifestPath ) == 0 {
92
- return errors .New ("empty manifest path" )
93
- }
94
94
s , err := os .Stat (manifestPath )
95
95
if err != nil {
96
96
if os .IsNotExist (err ) {
Original file line number Diff line number Diff line change @@ -113,13 +113,6 @@ diff:
113
113
cfgPath : "missing-path-to-a-config" ,
114
114
expectedError : true ,
115
115
},
116
- {
117
- name : "invalid: valid config but empty manifest path" ,
118
- cfgPath : testUpgradeDiffConfig ,
119
- setManifestPath : true ,
120
- manifestPath : "" ,
121
- expectedError : true ,
122
- },
123
116
{
124
117
name : "invalid: valid config but bad manifest path" ,
125
118
cfgPath : testUpgradeDiffConfig ,
You can’t perform that action at this time.
0 commit comments