Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITA-1209 : Add status flag to filter pods by the current status.phase #35

Merged
merged 3 commits into from
Jun 15, 2020

Conversation

phariharan-wish-zz
Copy link
Contributor

Ctl: Add -a/--a flag for getting pods
The get pods retrieves all pods of all statuses - Pending, Running, Succeeded, Failed, Unknown.

Since the get pods command already retrieves all pods, this ticket addresses a status flag that allows user to filter the pods by the current Status.Phase

-s, --status string Filter pods by specified status

Example:

➜  ctl git:(add_a_flag) ✗ ./main get pods -s Failed                                                
CONTEXT                 NAMESPACE      NAME                                                  READY  STATUS  RESTARTS  AGE         K8S_ENV  AZ
app-01-prod.k8s.local   kron           example-2-1591161485-jzlxd                            0/1    Failed  0         132h8m19s   prod     us-west-1a
app-01-prod.k8s.local   kron           example-2-1591161485-pjhjd                            0/1    Failed  0         132h8m26s   prod     us-west-1a
app-01-prod.k8s.local   merchant-cron  v3-oauth-api-daily-usage-report-1590645600-8666n      0/2    Failed  0         275h26m24s  prod     us-west-1a
app-01-prod.k8s.local   wish-cron      backup-route53-dns-to-s3-1590771707-lrgsb             0/2    Failed  0         240h24m44s  prod     us-west-1a
app-01-prod.k8s.local   wish-cron      bbsolr-query-payload-1591211321-m2dkk                 0/2    Failed  0         118h17m50s  prod     us-west-1a
app-03-stage.k8s.local  infra-cron     test-1590620590-t7kb7                                 0/1    Failed  0         282h23m21s  stage    us-west-1a
app-03-stage.k8s.local  infra-cron     test-1590620590-w9g4g                                 0/1    Failed  0         282h23m14s  stage    us-west-1a
app-03-stage.k8s.local  infra-cron     test-1590634420-nl8lx                                 0/1    Failed  0         278h32m51s  stage    us-west-1a
app-03-stage.k8s.local  infra-cron     test-1590634420-pgzzx                                 0/1    Failed  0         278h32m45s  stage    us-west-1a
app-03-stage.k8s.local  kron           test-example-1591220130-ppwzl                         0/1    Failed  0         115h50m55s  stage    us-west-1a
app-03-stage.k8s.local  kron           test-example-1591220130-zxtn5                         0/1    Failed  0         115h51m1s   stage    us-west-1a
app-03-stage.k8s.local  merchant-cron  test-merchant-1590667840-hx2wn                        0/2    Failed  0         269h15m51s  stage    us-west-1a
app-03-stage.k8s.local  merchant-cron  test-merchant-1590667943-q7crk                        0/2    Failed  0         269h14m8s   stage    us-west-1a
app-03-stage.k8s.local  merchant-cron  test-merchant-1590670638-ngfxs                        0/2    Failed  0         268h29m13s  stage    us-west-1a
app-03-stage.k8s.local  wish-cron      weekly-load-onesource-tax-treatment-1591574400-bck8n  0/2    Failed  0         17h26m27s   stage    us-west-1a
app-05-dev.k8s.local    linkerd        linkerd-heartbeat-1589912280-g7xfs                    0/1    Failed  0         479h2m56s   dev      us-west-1a
app-05-dev.k8s.local    linkerd        linkerd-heartbeat-1589912280-hl6vf                    0/1    Failed  0         478h57m15s  dev      us-west-1a

@codecov
Copy link

codecov bot commented Jun 10, 2020

Codecov Report

Merging #35 into master will increase coverage by 0.14%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   33.92%   34.07%   +0.14%     
==========================================
  Files          52       52              
  Lines        2022     2031       +9     
==========================================
+ Hits          686      692       +6     
- Misses       1309     1311       +2     
- Partials       27       28       +1     
Impacted Files Coverage Δ
cmd/get.go 0.00% <0.00%> (ø)
pkg/client/logpods.go 0.00% <0.00%> (ø)
cmd/util/parsing/options.go 82.50% <75.00%> (-2.35%) ⬇️
cmd/describe.go 32.03% <100.00%> (+0.66%) ⬆️
pkg/client/listpods.go 71.92% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93d8849...8f35ace. Read the comment docs.

@vsakhart vsakhart merged commit c20724b into wish:master Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants