@@ -103,8 +103,8 @@ func (o *DeleteClusterOptions) Complete(cmd *cobra.Command, args []string) (*kkc
103103// completeConfig updates the configuration with container manager settings
104104func (o * DeleteClusterOptions ) completeConfig () error {
105105 // If kube_version is not set in config, set it to the specified Kubernetes version
106- if _ , ok , _ := unstructured .NestedFieldNoCopy (o .CommonOptions .Config .Value (), "kube_version" ); ! ok {
107- if err := unstructured .SetNestedField (o .CommonOptions .Config .Value (), o .Kubernetes , "kube_version" ); err != nil {
106+ if _ , ok , _ := unstructured .NestedFieldNoCopy (o .CommonOptions .Config .Value (), "kubernetes" , " kube_version" ); ! ok {
107+ if err := unstructured .SetNestedField (o .CommonOptions .Config .Value (), o .Kubernetes , "kubernetes" , " kube_version" ); err != nil {
108108 return errors .Wrapf (err , "failed to set %q to config" , "kube_version" )
109109 }
110110 }
@@ -184,8 +184,8 @@ func (o *DeleteNodesOptions) Complete(cmd *cobra.Command, args []string) (*kkcor
184184// completeConfig updates the configuration with container manager settings
185185func (o * DeleteNodesOptions ) completeConfig (nodes []string ) error {
186186 // If kube_version is not set in config, set it to the specified Kubernetes version
187- if _ , ok , _ := unstructured .NestedFieldNoCopy (o .CommonOptions .Config .Value (), "kube_version" ); ! ok {
188- if err := unstructured .SetNestedField (o .CommonOptions .Config .Value (), o .Kubernetes , "kube_version" ); err != nil {
187+ if _ , ok , _ := unstructured .NestedFieldNoCopy (o .CommonOptions .Config .Value (), "kubernetes" , " kube_version" ); ! ok {
188+ if err := unstructured .SetNestedField (o .CommonOptions .Config .Value (), o .Kubernetes , "kubernetes" , " kube_version" ); err != nil {
189189 return errors .Wrapf (err , "failed to set %q to config" , "kube_version" )
190190 }
191191 }
0 commit comments