util

package
v2.4.16 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 25 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogFormat string
	LogLevel  string
)

Functions

func AddAppFlags

func AddAppFlags(command *cobra.Command, opts *AppOptions)

func AddClusterFlags

func AddClusterFlags(command *cobra.Command, opts *ClusterOptions)

func AddProjFlags

func AddProjFlags(command *cobra.Command, opts *ProjectOpts)

func AddRepoFlags

func AddRepoFlags(command *cobra.Command, opts *RepoOptions)

func ConstructAppProj

func ConstructAppProj(fileURL string, args []string, opts ProjectOpts, c *cobra.Command) (*v1alpha1.AppProject, error)

func ConstructApps added in v2.2.0

func ConstructApps(fileURL, appName string, labels, annotations, args []string, appOpts AppOptions, flags *pflag.FlagSet) ([]*argoappv1.Application, error)

func GetOrphanedResourcesSettings

func GetOrphanedResourcesSettings(flagSet *pflag.FlagSet, opts ProjectOpts) *v1alpha1.OrphanedResourcesMonitorSettings

func NewCluster

func NewCluster(name string, namespaces []string, clusterResources bool, conf *rest.Config, managerBearerToken string, awsAuthConf *argoappv1.AWSAuthConfig, execProviderConf *argoappv1.ExecProviderConfig, labels, annotations map[string]string) *argoappv1.Cluster

func PrintKubeContexts

func PrintKubeContexts(ca clientcmd.ConfigAccess)

func SetAppSpecOptions

func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, appOpts *AppOptions) int

func SetParameterOverrides

func SetParameterOverrides(app *argoappv1.Application, parameters []string)

SetParameterOverrides updates an existing or appends a new parameter override in the application The app is assumed to be a helm app and is expected to be in the form: param=value

func SetProjSpecOptions

func SetProjSpecOptions(flags *pflag.FlagSet, spec *v1alpha1.AppProjectSpec, projOpts *ProjectOpts) int

Types

type AppOptions

type AppOptions struct {
	Parameters []string

	Validate bool
	// contains filtered or unexported fields
}

type ClusterOptions

type ClusterOptions struct {
	InCluster               bool
	Upsert                  bool
	ServiceAccount          string
	AwsRoleArn              string
	AwsClusterName          string
	SystemNamespace         string
	Namespaces              []string
	ClusterResources        bool
	Name                    string
	Project                 string
	Shard                   int64
	ExecProviderCommand     string
	ExecProviderArgs        []string
	ExecProviderEnv         map[string]string
	ExecProviderAPIVersion  string
	ExecProviderInstallHint string
}

type ProjectOpts

type ProjectOpts struct {
	Description string

	Sources       []string
	SignatureKeys []string
	// contains filtered or unexported fields
}

func (*ProjectOpts) GetAllowedClusterResources

func (opts *ProjectOpts) GetAllowedClusterResources() []v1.GroupKind

func (*ProjectOpts) GetAllowedNamespacedResources

func (opts *ProjectOpts) GetAllowedNamespacedResources() []v1.GroupKind

func (*ProjectOpts) GetDeniedClusterResources

func (opts *ProjectOpts) GetDeniedClusterResources() []v1.GroupKind

func (*ProjectOpts) GetDeniedNamespacedResources

func (opts *ProjectOpts) GetDeniedNamespacedResources() []v1.GroupKind

func (*ProjectOpts) GetDestinations

func (opts *ProjectOpts) GetDestinations() []v1alpha1.ApplicationDestination

func (*ProjectOpts) GetSignatureKeys

func (opts *ProjectOpts) GetSignatureKeys() []v1alpha1.SignatureKey

TODO: Get configured keys and emit warning when a key is specified that is not configured

type RepoOptions

type RepoOptions struct {
	Repo                           appsv1.Repository
	Upsert                         bool
	SshPrivateKeyPath              string
	InsecureIgnoreHostKey          bool
	InsecureSkipServerVerification bool
	TlsClientCertPath              string
	TlsClientCertKeyPath           string
	EnableLfs                      bool
	EnableOci                      bool
	GithubAppId                    int64
	GithubAppInstallationId        int64
	GithubAppPrivateKeyPath        string
	GitHubAppEnterpriseBaseURL     string
	Proxy                          string
}

Jump to

Keyboard shortcuts

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