Support -f/--file flag in argocd app add#35
Merged
merenbach merged 22 commits intoargoproj:masterfrom Mar 14, 2018
merenbach:app-add-file
Merged
Support -f/--file flag in argocd app add#35merenbach merged 22 commits intoargoproj:masterfrom merenbach:app-add-file
argocd app add#35merenbach merged 22 commits intoargoproj:masterfrom
merenbach:app-add-file
Conversation
added 20 commits
March 13, 2018 10:33
alexmt
approved these changes
Mar 14, 2018
Collaborator
alexmt
left a comment
There was a problem hiding this comment.
LGTM. I've added two minor comments. Please fix and merge
cmd/argocd/commands/app.go
Outdated
| } | ||
| if err != nil { | ||
| log.Fatal(err) | ||
| os.Exit(1) |
Collaborator
There was a problem hiding this comment.
log.Fatal already executes os.Exit(1). Can you please remove this line?
| @@ -0,0 +1,48 @@ | |||
| package commands | |||
|
|
|||
| import ( | |||
Collaborator
There was a problem hiding this comment.
Nitpicking. Please run goimports -w cmd/argocd/commands/util.go. We usually automatically run goimports on file save, so next person might get unexpected changes.
Contributor
Author
|
@alexmt thank you! The requested changes have been made, and per https://godoc.org/golang.org/x/tools/cmd/goimports I've updated my |
alexec
pushed a commit
that referenced
this pull request
Apr 24, 2019
leoluz
pushed a commit
to leoluz/argo-cd
that referenced
this pull request
Sep 29, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds an
-fflag to (mostly) mirror Kubernetes'kubectl create -fflag, and in the process resolves #31.Problem
Currently a GitHub repo and a path to a manifest inside the repo are required. It would be nice to be able to use a
-fflag to point to a local file or URL containing a Kubernetes Application manifest that can be used directly. The repo and path can be recovered from inside the file.Solution
argoappv1.Applicationstruct.NewApplicationAddCommand:pathandrepoargs at theFlagSetlevel.-f/--fileflag that contains either a local path or a remote URL.Notes
@alexmt and any other reviewers:
APPNAMEpositional parameter and replaces it with a named parameter.kubectl create -fdirectly.kubectl create -falso allows local directories to be specified. Since Application manifests are small for now and not generally divided between files, directories are not currently supported.