Giter Club home page Giter Club logo

Comments (7)

alessiodionisi avatar alessiodionisi commented on September 25, 2024 3

I opened a PR #61 that adds the feature, I still have to test it :D

from terraform-provider-k0s.

alessiodionisi avatar alessiodionisi commented on September 25, 2024 2

PR #61 has been merged, release coming soon

from terraform-provider-k0s.

vyas-n avatar vyas-n commented on September 25, 2024 1

@andyrue at the moment, nothing native with terraform.

For the time being I've been:

  1. Generating a k0sctl.yaml file using terraform's yamlencode function.
  2. Running k0sctl apply --kubeconfig-out kubeconfig.yaml --no-wait manually in the terminal (you could replace this with a null_resource and a local-exec provisioner)
  3. Parsing the kubeconfig.yaml file using the file & yamldecode functions, then passing that data to the kubernetes & helm terraform providers.

from terraform-provider-k0s.

vyas-n avatar vyas-n commented on September 25, 2024 1

Thanks @alessiodionisi, I was able to successfully setup the k0s cluster using the new no_wait flag!

from terraform-provider-k0s.

andreeib avatar andreeib commented on September 25, 2024

There doesn't seem to be a way to set it.

Here is how it's set in k0sctl:
https://github.com/k0sproject/k0sctl/blob/04a76d8461934b92ed77d89bebb2cc90a5afce89/cmd/apply.go#L60

I guess this is where it should be set in terraform-provider-k0s but it's not:

func getK0sctlManagerForCreateOrUpdate(k0sctlConfig *k0sctl_v1beta1.Cluster) k0sctl_phase.Manager {
manager := k0sctl_phase.Manager{
Config: k0sctlConfig,
}
lockPhase := &k0sctl_phase.Lock{}
manager.AddPhase(
&k0sctl_phase.Connect{},
&k0sctl_phase.DetectOS{},
lockPhase,
&k0sctl_phase.PrepareHosts{},
&k0sctl_phase.GatherFacts{},
&k0sctl_phase.DownloadBinaries{},
&k0sctl_phase.UploadFiles{},
&k0sctl_phase.ValidateHosts{},
&k0sctl_phase.GatherK0sFacts{},
&k0sctl_phase.ValidateFacts{},
&k0sctl_phase.UploadBinaries{},
&k0sctl_phase.DownloadK0s{},
&k0sctl_phase.InstallBinaries{},
&k0sctl_phase.PrepareArm{},
&k0sctl_phase.ConfigureK0s{},
&k0sctl_phase.InitializeK0s{},
&k0sctl_phase.InstallControllers{},
&k0sctl_phase.InstallWorkers{},
&k0sctl_phase.UpgradeControllers{},
&k0sctl_phase.UpgradeWorkers{},
&k0sctl_phase.GetKubeconfig{},
&k0sctl_phase.Unlock{Cancel: lockPhase.Cancel},
&k0sctl_phase.Disconnect{},
)
return manager
}

from terraform-provider-k0s.

andyrue avatar andyrue commented on September 25, 2024

Is there a workaround for this until the fix is released?

from terraform-provider-k0s.

alessiodionisi avatar alessiodionisi commented on September 25, 2024

Released now with v0.2.0: https://github.com/alessiodionisi/terraform-provider-k0s/releases/tag/v0.2.0

https://registry.terraform.io/providers/alessiodionisi/k0s/latest/docs/resources/cluster#no_wait

from terraform-provider-k0s.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.