create

package
v0.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	scmhelpers.PullRequestOptions

	PreviewHelmfile  string
	PreviewNamespace string
	Namespace        string
	PreviewService   string
	DockerRegistry   string
	BuildNumber      string
	Version          string
	GitUser          string
	PreviewURLPath   string

	// PullRequestBranch used for testing to fake out the pull request branch name
	PullRequestBranch     string
	PreviewURLTimeout     time.Duration
	NoComment             bool
	NoWatchNamespace      bool
	Debug                 bool
	GitClient             gitclient.Interface
	PreviewClient         versioned.Interface
	KubeClient            kubernetes.Interface
	JXClient              jxc.Interface
	KServeClient          kserve.Interface
	CommandRunner         cmdrunner.CommandRunner
	OutputEnvVars         map[string]string
	WatchNamespaceCommand *exec.Cmd
	Preview               *v1alpha1.Preview
}

Options the CLI options for

func NewCmdPreviewCreate

func NewCmdPreviewCreate() (*cobra.Command, *Options)

NewCmdPreviewCreate creates a command object for the command

func (*Options) AddFlags added in v0.0.183

func (o *Options) AddFlags(cmd *cobra.Command)

func (*Options) CreateHelmfileEnvVars added in v0.0.183

func (o *Options) CreateHelmfileEnvVars(fn func(string) (string, error)) (map[string]string, error)

func (*Options) DiscoverPreviewHelmfile

func (o *Options) DiscoverPreviewHelmfile() error

DiscoverPreviewHelmfile if there is no helmfile configured lets find the charts folder and default the preview helmfile to that then generate a helmfile.yaml if its missing

func (*Options) IfPodIsFailedShareLogs added in v0.2.0

func (o *Options) IfPodIsFailedShareLogs(pod *corev1.Pod, previewNamespace string) error

func (*Options) ProcessHelmfileSyncTimeoutOrReturnOriginalError added in v0.2.0

func (o *Options) ProcessHelmfileSyncTimeoutOrReturnOriginalError(syncError error) error

func (*Options) Run

func (o *Options) Run() error

Run implements a helmfile based preview environment

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the inputs are valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL