Documentation ¶
Index ¶
- Constants
- Variables
- func InitWorkflowClient(ns ...string) v1alpha1.WorkflowInterface
- func InstallNamespace() string
- func NewCommand() *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewDeleteCommand() *cobra.Command
- func NewGetCommand() *cobra.Command
- func NewInstallCommand() *cobra.Command
- func NewLintCommand() *cobra.Command
- func NewListCommand() *cobra.Command
- func NewLogsCommand() *cobra.Command
- func NewResubmitCommand() *cobra.Command
- func NewResumeCommand() *cobra.Command
- func NewRetryCommand() *cobra.Command
- func NewSubmitCommand() *cobra.Command
- func NewSuspendCommand() *cobra.Command
- func NewUninstallCommand() *cobra.Command
- func NewWaitCommand() *cobra.Command
- func SubmitWorkflows(filePaths []string, submitArgs *submitFlags)
- type ByFinishedAt
- type VersionChecker
- type WorkflowStatusPoller
Constants ¶
const ( Bold = 1 FgBlack = 30 FgRed = 31 FgGreen = 32 FgYellow = 33 FgBlue = 34 FgMagenta = 35 FgCyan = 36 FgWhite = 37 FgDefault = 39 )
ANSI escape codes
const ( // Argo controller resource constants ArgoControllerServiceAccount = "argo" ArgoControllerClusterRole = "argo-cluster-role" ArgoControllerClusterRoleBinding = "argo-binding" // Argo UI resource constants ArgoUIServiceAccount = "argo-ui" ArgoUIClusterRole = "argo-ui-cluster-role" ArgoUIClusterRoleBinding = "argo-ui-binding" ArgoUIDeploymentName = "argo-ui" ArgoUIServiceName = "argo-ui" )
const (
// CLIName is the name of the CLI
CLIName = "argo"
)
Variables ¶
var ( ArgoControllerPolicyRules = []rbacv1.PolicyRule{ { APIGroups: []string{""}, Resources: []string{"pods", "pods/exec"}, Verbs: []string{"create", "get", "list", "watch", "update", "patch"}, }, { APIGroups: []string{""}, Resources: []string{"configmaps"}, Verbs: []string{"get", "watch", "list"}, }, { APIGroups: []string{""}, Resources: []string{"persistentvolumeclaims"}, Verbs: []string{"create", "delete"}, }, { APIGroups: []string{"argoproj.io"}, Resources: []string{"workflows"}, Verbs: []string{"get", "list", "watch", "update", "patch"}, }, } ArgoUIPolicyRules = []rbacv1.PolicyRule{ { APIGroups: []string{""}, Resources: []string{"pods", "pods/exec", "pods/log"}, Verbs: []string{"get", "list", "watch"}, }, { APIGroups: []string{""}, Resources: []string{"secrets"}, Verbs: []string{"get"}, }, { APIGroups: []string{"argoproj.io"}, Resources: []string{"workflows"}, Verbs: []string{"get", "list", "watch"}, }, } )
var ( // These are the default image names which `argo install` uses during install DefaultControllerImage = imageNamespace + "/workflow-controller:" + imageTag DefaultExecutorImage = imageNamespace + "/argoexec:" + imageTag DefaultUiImage = imageNamespace + "/argoui:" + imageTag )
Functions ¶
func InitWorkflowClient ¶
func InitWorkflowClient(ns ...string) v1alpha1.WorkflowInterface
InitWorkflowClient creates a new client for the Kubernetes Workflow CRD.
func InstallNamespace ¶
func InstallNamespace() string
InstallNamespace returns either the namespace specified via the --namespace flag or the default argo installation namespace (kube-system)
func NewCommand ¶
NewCommand returns a new instance of an argocd command
func NewCompletionCommand ¶
func NewDeleteCommand ¶
NewDeleteCommand returns a new instance of an `argocd repo` command
func NewGetCommand ¶
func NewInstallCommand ¶
func NewLintCommand ¶
func NewListCommand ¶
func NewLogsCommand ¶
func NewResubmitCommand ¶
func NewResumeCommand ¶
func NewRetryCommand ¶
func NewSubmitCommand ¶
func NewSuspendCommand ¶
func NewUninstallCommand ¶
func NewWaitCommand ¶
func SubmitWorkflows ¶
func SubmitWorkflows(filePaths []string, submitArgs *submitFlags)
Types ¶
type ByFinishedAt ¶
ByFinishedAt is a sort interface which sorts running jobs earlier before considering FinishedAt
func (ByFinishedAt) Len ¶
func (f ByFinishedAt) Len() int
func (ByFinishedAt) Less ¶
func (f ByFinishedAt) Less(i, j int) bool
func (ByFinishedAt) Swap ¶
func (f ByFinishedAt) Swap(i, j int)
type VersionChecker ¶
type VersionChecker struct{}
VersionChecker checks the Kubernetes version and currently logs a message if wait should be implemented using watch instead of polling.
type WorkflowStatusPoller ¶
type WorkflowStatusPoller struct {
// contains filtered or unexported fields
}
WorkflowStatusPoller exports methods to wait on workflows by periodically querying their status.
func NewWorkflowStatusPoller ¶
func NewWorkflowStatusPoller(wfc v1alpha1.WorkflowInterface, ignoreNotFound bool, noOutput bool) *WorkflowStatusPoller
NewWorkflowStatusPoller creates a new WorkflowStatusPoller object.
func (*WorkflowStatusPoller) WaitWorkflows ¶
func (wsp *WorkflowStatusPoller) WaitWorkflows(workflowNames []string)
WaitWorkflows waits for the given workflowNames.