Giter Site home page Giter Site logo

Argo workflow GC about onepanel HOT 1 CLOSED

rushtehrani avatar rushtehrani commented on August 16, 2024
Argo workflow GC

from onepanel.

Comments (1)

rushtehrani avatar rushtehrani commented on August 16, 2024

For 3, we'll have to inject the strategy here, this should be passed in as an option with the strategy potentially being read from an env var, example diff:

@@ -17,6 +17,8 @@ type Workflow = wfv1.Workflow
 
 type WorkflowParameter = wfv1.Parameter
 
+type PodGCStrategy = wfv1.PodGCStrategy
+
 type WorkflowOptions struct {
        Name           string
        GeneratedName  string
@@ -25,6 +27,7 @@ type WorkflowOptions struct {
        ServiceAccount string
        Labels         *map[string]string
        ListOptions    *ListOptions
+       PodGCStrategy  *PodGCStrategy
 }
 
 func unmarshalWorkflows(wfBytes []byte, strict bool) (wfs []Workflow, err error) {
@@ -81,6 +84,11 @@ func (c *Client) create(namespace string, wf *Workflow, opts *WorkflowOptions) (
        if opts.Labels != nil {
                wf.ObjectMeta.Labels = *opts.Labels
        }
+       if wf.Spec.PodGC != nil {
+               wf.Spec.PodGC = &wfv1.PodGC{
+                       Strategy: *opts.PodGCStrategy,
+               }
+       }
 
        createdWorkflow, err = c.ArgoprojV1alpha1().Workflows(namespace).Create(wf)

from onepanel.

Related Issues (20)

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.