Git Product home page Git Product logo

Comments (4)

harshanarayana avatar harshanarayana commented on June 22, 2024 1

@helayoty I opened a quick POC of the changes to enable Helm support for the e2e-framework. Please let me know if you are already working on it and I will be happy to close up my PR if you have started working on this already.

from e2e-framework.

harshanarayana avatar harshanarayana commented on June 22, 2024

I made the support helper a little more generic and to do now just install but a simple way to wrap all commands for helm.

proc := helm.NewManager().Run(
	helm.WithMode("install"),
	helm.WithName("memcached"),
	helm.WithReleaseName("bitnami/memcached"),
	helm.WithNamespace(namespace),
	helm.WithArgs("--kubeconfig", config.KubeconfigFile()),
)

We can also write a simple wrapper to help few generic command with much simpler way to access as well. This way, one can do most of the workflow centric to helm in their test using the same framework helpers. Is this inline with what you thought about ?

cc @vladimirvivien What do you think about this model ?

from e2e-framework.

vladimirvivien avatar vladimirvivien commented on June 22, 2024

This is interesting.
My one suggestion is that helm shoul be kept in a package that clearly indicates it's not part of the core functionality. Possibly introduce package third-party/helm.

I will add review comments on the PR directly.

from e2e-framework.

harshanarayana avatar harshanarayana commented on June 22, 2024

@vladimirvivien I kept the helm.go under support/helm like we did with support/kind but moving that to third_party/helm might be a good idea too. Makes the integration with other tools easier in the future. And if we do, should we define a standard interface through which we can introduce these new tool integration or is that too much of an expectation to start with and can be done at a later date ?

type Option func(*Opts)

type Opts struct {
    name string
    args []string
    argMap map[string]interface{}
}

func WithName(name string) Option {
    return func(opts *Opts) {
        opts.name = name
    }
}

func WithArgs(args ...string) Option {
    return func(opts *Opts) {
        opts.args = append(opts.args, args...)
    }
}

func WithKWArg(key string, val interface{}) Option {
    return func(opts *Opts) {
        opts.argMap[key] = val
    }
}

type Integration interface {
    Run(opts ...Option) (proc *exec.Proc, err error)
}

from e2e-framework.

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.