imjoseangel / powerline-k8sstatus

A Powerline segment for showing the status of a K8s context
MIT License
2 stars 0 forks source link

Feature/36 namespacealert #40

Closed imjoseangel closed 3 years ago

imjoseangel commented 3 years ago

SUMMARY

Fixes #36

ISSUE TYPE

COMPONENT NAME

namespace

ADDITIONAL INFORMATION

Add namespace colouring

        namespacestatus = "k8sstatus_namespace"

        if show_namespace:
            try:
                namespace = active_context['context']['namespace']
                if namespace in namespace_alert:
                    namespacestatus = "k8sstatus_namespace:alert"

            except KeyError:
                namespace = 'default'
        else:
            namespace = 'default'
codecov[bot] commented 3 years ago

Codecov Report

Merging #40 (145b056) into devel (d1a3327) will increase coverage by 0.14%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel      #40      +/-   ##
==========================================
+ Coverage   97.82%   97.97%   +0.14%     
==========================================
  Files           3        3              
  Lines         138      148      +10     
==========================================
+ Hits          135      145      +10     
  Misses          3        3              
Flag Coverage Δ
unittests 97.97% <100.00%> (+0.14%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
powerline_k8sstatus/segments.py 94.11% <100.00%> (+0.63%) :arrow_up:
tests/test_powerlinek8sstatus.py 100.00% <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 d1a3327...145b056. Read the comment docs.