Remove unnecessary role privileges from api server (resolves #319). Fix linting issues (#359)

This commit is contained in:
Jesse Suen 2018-07-09 13:53:45 -07:00 committed by GitHub
parent 9d7d1989e9
commit b092e1bc7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 35 deletions

View file

@ -188,7 +188,7 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com
fmt.Println()
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
printAppResources(w, app, showOperation)
w.Flush()
_ = w.Flush()
}
default:
log.Fatalf("Unknown output format: %s", output)
@ -805,7 +805,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
fmt.Println()
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
printAppResources(w, app, true)
w.Flush()
_ = w.Flush()
}
pruningRequired := 0
@ -1022,18 +1022,6 @@ func printOperationResult(opState *argoappv1.OperationState) {
}
}
func printHooks(opState *argoappv1.OperationState) {
if len(opState.HookResources) > 0 {
fmt.Printf("\n")
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
fmt.Fprintf(w, "HOOK\tKIND\tNAME\tSTATUS\tMESSAGE\n")
for _, hookStatus := range opState.HookResources {
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", hookStatus.Type, hookStatus.Kind, hookStatus.Name, hookStatus.Status, hookStatus.Message)
}
_ = w.Flush()
}
}
// NewApplicationManifestsCommand returns a new instance of an `argocd app manifests` command
func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var (

View file

@ -3,31 +3,10 @@ kind: Role
metadata:
name: argocd-server-role
rules:
- apiGroups:
- ""
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create