kudo icon indicating copy to clipboard operation
kudo copied to clipboard

Document triggering a plan via the k8s API

Open simonvane opened this issue 4 years ago • 1 comments

What would you like to be added: Documentation of how to run a specific plan via the k8s API.

Why is this needed: We are using KUDO in a scenario where we need to automate our process. We cannot use kubectl in the process.

Further details: Running a specific plan is mentioned here using $ kubectl kudo plan trigger --name deploy --instance my-instance. We would like to do the same using the k8s API.

It looks like the code that is run by the command above is UpdateInstance.

Would it be a safe approach to patch the instance with the following (as the UpdateInstance method does)?

{
  "spec": {
    "planExecution": {
      "planName": "the-custom-plan",
      "uid": "633f03ba-024f-4c17-a74d-fb3f1a210a40"
    }
  }
}

simonvane avatar Jan 26 '21 09:01 simonvane

Would anyone be able to respond and let us know if what we are doing is safe please?

simonvane avatar Feb 09 '21 09:02 simonvane