util

package
v2.10.7 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 31 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 ConstructApplicationSet added in v2.5.0

func ConstructApplicationSet(fileURL string) ([]*argoprojiov1alpha1.ApplicationSet, 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 FilterResources added in v2.5.0

func FilterResources(groupChanged bool, resources []*argoappv1.ResourceDiff, group, kind, namespace, resourceName string, all bool) ([]*unstructured.Unstructured, error)

func GetKubePublicEndpoint added in v2.7.0

func GetKubePublicEndpoint(client kubernetes.Interface) (string, error)

GetKubePublicEndpoint returns the kubernetes apiserver endpoint as published in the kube-public.

func GetOrphanedResourcesSettings

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

func LiveObjects added in v2.5.0

func LiveObjects(resources []*argoappv1.ResourceDiff) ([]*unstructured.Unstructured, error)

LiveObjects deserializes the list of live states into unstructured objects

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 ClusterEndpoint added in v2.7.0

type ClusterEndpoint string
const (
	KubeConfigEndpoint   ClusterEndpoint = "kubeconfig"
	KubePublicEndpoint   ClusterEndpoint = "kube-public"
	KubeInternalEndpoint ClusterEndpoint = "internal"
)

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
	ClusterEndpoint         string
}

func (ClusterOptions) InClusterEndpoint added in v2.7.0

func (o ClusterOptions) InClusterEndpoint() bool

InClusterEndpoint returns true if ArgoCD should reference the in-cluster endpoint when registering the target cluster.

type ProjectOpts

type ProjectOpts struct {
	Description string

	Sources          []string
	SignatureKeys    []string
	SourceNamespaces []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

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

func (*ProjectOpts) GetSourceNamespaces added in v2.5.0

func (opts *ProjectOpts) GetSourceNamespaces() []string

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
	GCPServiceAccountKeyPath       string
	ForceHttpBasicAuth             bool
}

Jump to

Keyboard shortcuts

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