util

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 28 Imported by: 8

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 ConstructApp

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

func ConstructAppProj

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

func ConvertSecretData

func ConvertSecretData(secret *v1.Secret)

ConvertSecretData converts kubernetes secret's data to stringData

func GetOrphanedResourcesSettings

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

func NewCluster

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

func PrintKubeContexts

func PrintKubeContexts(ca clientcmd.ConfigAccess)

func PrintResources

func PrintResources(resources []interface{}, output string) error

PrintResource prints a single resource in YAML or JSON format to stdout according to the output format

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 If the app is a ksonnet app, then parameters are expected to be in the form: component=param=value Otherwise, 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
	Name                    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
}

Jump to

Keyboard shortcuts

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