Skip to content

Commit

Permalink
add debug dont apply
Browse files Browse the repository at this point in the history
  • Loading branch information
jarededwards committed Dec 7, 2024
1 parent b003d43 commit b3edfe9
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions cmd/addipmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/konstructio/colony/internal/constants"
"github.com/konstructio/colony/internal/exec"
"github.com/konstructio/colony/internal/k8s"
"github.com/konstructio/colony/internal/logger"
"github.com/konstructio/colony/manifests"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -101,19 +100,19 @@ func getAddIPMICommand() *cobra.Command {
}
templateFiles = append(templateFiles, string(content))
}

k8sClient, err := k8s.New(log, filepath.Join(homeDir, constants.ColonyDir, constants.KubeconfigHostPath))
if err != nil {
return fmt.Errorf("failed to create k8s client: %w", err)
}

if err := k8sClient.LoadMappingsFromKubernetes(); err != nil {
return fmt.Errorf("error loading dynamic mappings from kubernetes: %w", err)
}

if err := k8sClient.ApplyManifests(ctx, templateFiles); err != nil {
return fmt.Errorf("error applying templates: %w", err)
}
log.Info(templateFiles)
// k8sClient, err := k8s.New(log, filepath.Join(homeDir, constants.ColonyDir, constants.KubeconfigHostPath))
// if err != nil {
// return fmt.Errorf("failed to create k8s client: %w", err)
// }

// if err := k8sClient.LoadMappingsFromKubernetes(); err != nil {
// return fmt.Errorf("error loading dynamic mappings from kubernetes: %w", err)
// }

// if err := k8sClient.ApplyManifests(ctx, templateFiles); err != nil {
// return fmt.Errorf("error applying templates: %w", err)
// }
}

return nil
Expand Down

0 comments on commit b3edfe9

Please sign in to comment.