In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use kubernetes/kubeadm Workflow Runner". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor learn how to use kubernetes/kubeadm Workflow Runner.
PhaseRunner// phaseRunner provides a wrapper to a Phase with the addition of a set// of contextual information derived by the workflow managed by the Runner.// TODO: the level of If we ever decide to get more sophisticated we can swap this type with a well defined dag or tree library.type phaseRunner struct {Phase parent * phaseRunner// parent phaseRunner level int / / phase in the workflow / / selfPath contains all the elements of the path that identify the phase into / / the workflow managed by the Runner. SelfPath [] string generatedName string / / phase contains full name use string / / usage help information for all levels of phase, which is equivalent to the relative path} Runnertype RunnerOptions struct {FilterPhases [] string / / phase list to be executed in the workflow. If the list is empty, all SkipPhases [] string / / phase to be shielded will be executed, if the list is empty. Then} / / Runner implements management of composable kubeadm workflows.type Runner struct {Options RunnerOptions / / Runner execution option Phases [] Phase / / Runner managed workflow is not blocked all phase runDataInitializer func (* cobra.Command, [] string) (RunData) Error) / / construct a callback function for all phase shared data in workflow runData RunData / / data shared by all phase in workflow runCmd * cobra.Command / / trigger Runner command / / cmdAdditionalFlags holds additional, shared flags that could be added to the subcommands generated / / for phases. Flags could be inherited from the parent command too or added directly to each phase cmdAdditionalFlags * pflag.FlagSet phaseRunners [] * context information of phaseRunner / / Workflow} Runner external method to create Runner
The workflow workflow package provides a method NewRunner () to create an empty Runner, which is actually an empty workflow, which does not include any phase. You can use the interface to add phase to add phase later.
Func NewRunner () * Runner {return & Runner {Phases: [] Phase {},}} join phase
When the workflow is created, you can use the func (e * Runner) AppendPhase (t Phase) interface to add phase.
Func (e * Runner) AppendPhase (t Phase) {e.Phases = append (e.Phases, t)}
To add phase at this time, it is simply to append phase to the slice list of runner, and the execution order of phase is the same as that of adding.
At this point, I believe you have a deeper understanding of "how to use kubernetes/kubeadm Workflow Runner". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.