kubernetes-run doesn't not work as described in documentation

Aperta
#537 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
kubernetes, ruby
Ambito
cli

Direzione di ricerca

Start with the kubernetes-run CLI entry point and compare its argument handling with the Usage documentation. Reproduce the reported command using a PodTemplate and rake arguments, checking how namespace, context, and args are passed. Done means the documented command works as shown, or the Usage documentation clearly describes the supported syntax.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug report

I have deployed a PodTemplate to my namespace and I'm trying to run it from command-line using the Usage documentation. It works fine when I use an executable from my project's bin directory but fails when I try to use rake with arguments.

Either this is a bug in CLI or I'm trying to use it incorrectly. If latter then documentation update is enough.

kubernetes-run my-kube-namespace my-kube-context "--tasks" --template=task-runner-template --max-watch-seconds=86400 --entrypoint=bin/rake

Expected behavior:

[INFO][2019-08-20 10:53:18 +0300]
[INFO][2019-08-20 10:53:18 +0300]	-------------------------------------Phase 1: Initializing task-------------------------------------
[INFO][2019-08-20 10:53:18 +0300]	Validating configuration
[INFO][2019-08-20 10:53:18 +0300]	Using namespace 'my-kube-namespace' in context 'my-kube-context'
[INFO][2019-08-20 10:53:19 +0300]	Using template 'task-runner-template'
[INFO][2019-08-20 10:53:19 +0300]
[INFO][2019-08-20 10:53:19 +0300]	----------------------------------------Phase 2: Running pod----------------------------------------
[INFO][2019-08-20 10:53:19 +0300]	Creating pod 'task-runner-6adf88dc7e4b7047'
[INFO][2019-08-20 10:53:19 +0300]	Pod creation succeeded
[INFO][2019-08-20 10:53:19 +0300]
[INFO][2019-08-20 10:53:19 +0300]	--------------------------------------Phase 3: Streaming logs---------------------------------------
[INFO][2019-08-20 10:53:19 +0300]	Streaming logs from Pod/task-runner-6adf88dc7e4b7047 container 'task-runner':
[INFO][2019-08-20 10:53:40 +0300]	[2019-08-20 07:53:35 +0000] No valid API key has been set, notifications will not be sent
[INFO][2019-08-20 10:53:40 +0300]	rake about                                           # List versions of all Rails frameworks and the environment

...

[INFO][2019-08-20 10:53:40 +0300]	Running via Spring preloader in process 22
[INFO][2019-08-20 10:53:41 +0300]	Successfully ran in 22.5s: Pod/task-runner-6adf88dc7e4b7047
[INFO][2019-08-20 10:53:41 +0300]
[INFO][2019-08-20 10:53:41 +0300]	------------------------------------------Result: SUCCESS-------------------------------------------
[INFO][2019-08-20 10:53:41 +0300]	Successfully ran 1 resource
[INFO][2019-08-20 10:53:41 +0300]
[INFO][2019-08-20 10:53:41 +0300]	Successful resources
[INFO][2019-08-20 10:53:41 +0300]	Pod/task-runner-6adf88dc7e4b7047                  Succeeded

Actual behavior: [What actually happened]

Namespace and context are omited from ARGV and args is not handled as expected.

kubernetes-run: invalid option: --tasks
[INFO][2019-08-20 10:54:47 +0300]
[INFO][2019-08-20 10:54:47 +0300]	-------------------------------------Phase 1: Initializing task-------------------------------------
[INFO][2019-08-20 10:54:47 +0300]	Validating configuration
[INFO][2019-08-20 10:54:47 +0300]
[INFO][2019-08-20 10:54:47 +0300]	------------------------------------------Result: FAILURE-------------------------------------------
[FATAL][2019-08-20 10:54:47 +0300]	Configuration invalid
[FATAL][2019-08-20 10:54:47 +0300]
[FATAL][2019-08-20 10:54:47 +0300]	- Could not connect to kubernetes cluster - context invalid

Version(s) affected:

v0.26.7

Steps to Reproduce
  1. Create Rails project
  2. Create PodTemplate to your namespace
  3. Try to run a rake task with any arguments
Lingua principale
Ruby
Stelle
1.4k
Fork
119
Merge medio
1h 7m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Shopify/krane

Tutte le issue di Shopify/krane

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.