flag

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArtifactFlags

func AddArtifactFlags(command *cobra.Command, flags *ArtifactFlags)

AddArtifactFlags adds the Artifact flags to the given command

func AddBuildFlags

func AddBuildFlags(command *cobra.Command, flags *BuildFlags)

AddBuildFlags adds the BuildFlags to the given command

func AddConfigFlags

func AddConfigFlags(command *cobra.Command, flags *ConfigFlags)

AddConfigFlags adds the common config flags to the given command

func AddEnvVarFlags

func AddEnvVarFlags(command *cobra.Command, flags *EnvVarFlags, envVarName, enVarShorthand string)

AddEnvVarFlags adds the common env var flags to the given command

func AddGitSourceFlags

func AddGitSourceFlags(command *cobra.Command, flags *GitSourceFlags)

AddGitSourceFlags adds the Git source flags to the given command

func AddImageFlags

func AddImageFlags(command *cobra.Command, flags *ImageFlags)

AddImageFlags adds the image flags to the given command

func AddInfraResourceFlags

func AddInfraResourceFlags(command *cobra.Command, flags *InfraResourceFlags)

AddInfraResourceFlags adds the Resource flags to the given command

func AddInstallFlags

func AddInstallFlags(command *cobra.Command, flags *InstallFlags)

AddInstallFlags adds the common deploy flags to the given command

func AddMonitoringFlags

func AddMonitoringFlags(command *cobra.Command, flags *MonitoringFlags)

AddMonitoringFlags adds the monitoring flags to the given command

func AddPodResourceFlags

func AddPodResourceFlags(command *cobra.Command, flags *PodResourceFlags, prefix string)

AddPodResourceFlags adds the common resource flags to the given command

func AddProbeFlags

func AddProbeFlags(command *cobra.Command, flags *ProbeFlags)

AddProbeFlags adds the ProbeFlags flags to the given command

func AddPropertiesFlags

func AddPropertiesFlags(command *cobra.Command, flags *PropertiesFlag)

AddPropertiesFlags adds the Properties flags to the given command

func AddRuntimeFlags

func AddRuntimeFlags(command *cobra.Command, flags *RuntimeFlags)

AddRuntimeFlags adds the RuntimeFlags to the given command

func AddRuntimeTypeFlags

func AddRuntimeTypeFlags(command *cobra.Command, flags *RuntimeTypeFlags)

AddRuntimeTypeFlags adds the Runtime flags to the given command

func AddWebHookFlags

func AddWebHookFlags(command *cobra.Command, flags *WebHookFlags)

AddWebHookFlags adds the WebHook flags to the given command

func CheckArtifactArgs

func CheckArtifactArgs(_ *ArtifactFlags) error

CheckArtifactArgs validates the ArtifactFlags flags

func CheckBuildArgs

func CheckBuildArgs(flags *BuildFlags) error

CheckBuildArgs validates the BuildFlags flags

func CheckConfigFlags

func CheckConfigFlags(flags *ConfigFlags) error

CheckConfigFlags checks the ConfigFlags flags

func CheckEnvVarArgs

func CheckEnvVarArgs(flags *EnvVarFlags) error

CheckEnvVarArgs checks the EnvVarFlags flags

func CheckGitSourceArgs

func CheckGitSourceArgs(flags *GitSourceFlags) error

CheckGitSourceArgs validates the GitSourceFlags flags

func CheckImageArgs

func CheckImageArgs(flags *ImageFlags) error

CheckImageArgs validates the ImageFlags flags

func CheckInfraResourceArgs

func CheckInfraResourceArgs(flags *InfraResourceFlags) error

CheckInfraResourceArgs validates the InfraResourceFlags flags

func CheckInstallArgs

func CheckInstallArgs(flags *InstallFlags) error

CheckInstallArgs checks the default deploy flags

func CheckMonitoringArgs

func CheckMonitoringArgs(_ *MonitoringFlags) error

CheckMonitoringArgs validates the MonitoringFlags flags

func CheckPodResourceArgs

func CheckPodResourceArgs(flags *PodResourceFlags) error

CheckPodResourceArgs validates the resource flags

func CheckProbeArgs

func CheckProbeArgs(_ *ProbeFlags) error

CheckProbeArgs validates the ProbeFlags flags

func CheckPropertiesArgs

func CheckPropertiesArgs(flags *PropertiesFlag) error

CheckPropertiesArgs validates the PropertiesFlag flags

func CheckRuntimeArgs

func CheckRuntimeArgs(flags *RuntimeFlags) error

CheckRuntimeArgs validates the RuntimeFlags flags

func CheckRuntimeTypeArgs

func CheckRuntimeTypeArgs(flags *RuntimeTypeFlags) error

CheckRuntimeTypeArgs validates the RuntimeTypeFlags flags

func CheckWebHookArgs

func CheckWebHookArgs(flags *WebHookFlags) error

CheckWebHookArgs validates the WebHookFlags flags

Types

type ArtifactFlags

type ArtifactFlags struct {
	ProjectGroupID    string
	ProjectArtifactID string
	ProjectVersion    string
}

ArtifactFlags is common properties used to configure Artifact

type BinaryBuildType

type BinaryBuildType string

BinaryBuildType specifies what kind of binary build is being done

const (
	// SourceToImageBuild specifies a s2i build (not binary build)
	SourceToImageBuild BinaryBuildType = "SourceToImageBuild"
	// BinarySpringBootJvmBuild is a Spring Boot JVM binary build
	BinarySpringBootJvmBuild BinaryBuildType = "BinarySpringBootJvmBuild"
	// BinaryQuarkusFastJarJvmBuild is a Quarkus JVM binary build with Fast Jar
	BinaryQuarkusFastJarJvmBuild BinaryBuildType = "BinaryQuarkusFastJarJvmBuild"
	// BinaryQuarkusLegacyJarJvmBuild is a Quarkus JVM binary build with Legacy Jar
	BinaryQuarkusLegacyJarJvmBuild BinaryBuildType = "BinaryQuarkusLegacyJarJvmBuild"
	// BinaryQuarkusNativeBuild is a Quarkus native binary build
	BinaryQuarkusNativeBuild BinaryBuildType = "BinaryQuarkusNativeBuild"
)

type BuildFlags

type BuildFlags struct {
	GitSourceFlags
	RuntimeTypeFlags
	PodResourceFlags
	ArtifactFlags
	WebHookFlags
	EnvVarFlags
	Name                      string
	Project                   string
	IncrementalBuild          bool
	Native                    bool
	MavenMirrorURL            string
	BuildImage                string
	RuntimeImage              string
	TargetRuntime             string
	EnableMavenDownloadOutput bool
}

BuildFlags is common properties used to configure Build

type ConfigFlags

type ConfigFlags struct {
	Config     []string
	ConfigFile string
}

ConfigFlags is common properties used to configure application properties

type EnvVarFlags

type EnvVarFlags struct {
	Env       []string
	SecretEnv []string
}

EnvVarFlags is common properties used to configure Env var

type GitSourceFlags

type GitSourceFlags struct {
	Reference  string
	ContextDir string
	Source     string
}

GitSourceFlags is common properties used to configure Git

type ImageFlags

type ImageFlags struct {
	Image                 string
	InsecureImageRegistry bool
}

ImageFlags is common properties used to configure Image

func (*ImageFlags) IsEmpty

func (i *ImageFlags) IsEmpty() bool

IsEmpty return true if image details are not provided else return false

type InfraResourceFlags

type InfraResourceFlags struct {
	APIVersion        string
	Kind              string
	ResourceNamespace string
	ResourceName      string
}

InfraResourceFlags is common properties used to configure Resource

type InstallFlags

type InstallFlags struct {
	PodResourceFlags
	ImageFlags
	EnvVarFlags
	MonitoringFlags
	ConfigFlags
	ProbeFlags
	Project          string
	Replicas         int32
	Infra            []string
	TrustStoreSecret string
}

InstallFlags is the base structure for resources that can be deployed in the cluster

type MonitoringFlags

type MonitoringFlags struct {
	Scrape bool
	Scheme string
	Path   string
}

MonitoringFlags is common properties used to configure Monitoring service

type PodResourceFlags

type PodResourceFlags struct {
	Limits   []string
	Requests []string
}

PodResourceFlags is common properties used to configure CPU resources

type ProbeFlags

type ProbeFlags struct {
	LivenessInitialDelay  int32
	ReadinessInitialDelay int32
}

ProbeFlags is common properties used to configure probe for kogito service

type PropertiesFlag

type PropertiesFlag struct {
	Properties []string
}

PropertiesFlag is common properties

type ResourceType

type ResourceType string

ResourceType represents mediums through which user can trigger build

const (
	// LocalFileResource build using file on local system
	LocalFileResource ResourceType = "LocalFileResource"
	// LocalDirectoryResource s2i build using directory on local system
	LocalDirectoryResource ResourceType = "LocalDirectoryResource"
	// LocalBinaryDirectoryResource binary build using directory on local system
	LocalBinaryDirectoryResource ResourceType = "LocalBinaryDirectoryResource"
	// GitFileResource build using file in Git Repo
	GitFileResource ResourceType = "GitFileResource"
	// GitRepositoryResource build using Git Repo
	GitRepositoryResource ResourceType = "GitRepositoryResource"
	// BinaryResource build using user generated binaries
	BinaryResource ResourceType = "BinaryResource"
)

type RuntimeFlags

type RuntimeFlags struct {
	InstallFlags
	RuntimeTypeFlags
	Name              string
	EnableIstio       bool
	EnablePersistence bool
	EnableEvents      bool
	ServiceLabels     []string
}

RuntimeFlags is common properties used to configure Runtime service

type RuntimeTypeFlags

type RuntimeTypeFlags struct {
	Runtime string
}

RuntimeTypeFlags is common properties used to configure runtime properties

type WebHookFlags

type WebHookFlags struct {
	WebHook []string
}

WebHookFlags is common properties used to configure Git

Jump to

Keyboard shortcuts

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