@@ -182,19 +182,22 @@ func newInstallCommand(ctx context.Context, f *factory.Factory) *cobra.Command {
182
182
f .AddLiqoNamespaceFlag (cmd .PersistentFlags ())
183
183
184
184
base .RegisterFlags (cmd )
185
- cmd .AddCommand (newInstallProviderCommand (ctx , options , aks .New ))
186
- cmd .AddCommand (newInstallProviderCommand (ctx , options , eks .New ))
187
- cmd .AddCommand (newInstallProviderCommand (ctx , options , gke .New ))
188
- cmd .AddCommand (newInstallProviderCommand (ctx , options , k3s .New ))
189
- cmd .AddCommand (newInstallProviderCommand (ctx , options , kind .New ))
190
- cmd .AddCommand (newInstallProviderCommand (ctx , options , kubeadm .New ))
191
- cmd .AddCommand (newInstallProviderCommand (ctx , options , openshift .New ))
185
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , aks .New ))
186
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , eks .New ))
187
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , gke .New ))
188
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , k3s .New ))
189
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , kind .New ))
190
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , kubeadm .New ))
191
+ cmd .AddCommand (newInstallProviderCommand (ctx , options . CommonOptions , openshift .New ))
192
192
193
193
return cmd
194
194
}
195
195
196
- func newInstallProviderCommand (ctx context.Context , options * install.Options , creator func (* install.Options ) install.Provider ) * cobra.Command {
197
- provider := creator (options )
196
+ func newInstallProviderCommand (ctx context.Context , commonOpts * install.CommonOptions ,
197
+ creator func (* install.Options ) install.Provider ) * cobra.Command {
198
+ options := install.Options {CommonOptions : commonOpts }
199
+ provider := creator (& options )
200
+
198
201
cmd := & cobra.Command {
199
202
Use : provider .Name (),
200
203
Short : fmt .Sprintf ("Install Liqo in the selected %s cluster" , provider .Name ()),
0 commit comments