Code Monkey home page Code Monkey logo

kubecolor's People

Contributors

alperen-selcuk avatar awinecki avatar code-hex avatar denysvitali avatar erjanmx avatar franciosi avatar hidetatz avatar jtyr avatar mattn avatar prune998 avatar rothgar avatar schnatterer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubecolor's Issues

Better color schema

While I believe kubecolor colorizes the kubectl output nicely, I don't think current implementation is best. The better color schema might be found in the future.

Now, there are a lot of color schema change requests:

#110
#102
#91
#89
#88
#77
#76

It will be possible to implement all the things, but I'm concerned the kubecolor will be not very simple and not easy to use. In the first place, this kind of thing is completely personal preference.

In my opinion, we have to options:

  • Keep it simple. No color customization ability in kubecolor. If you don't like it's color schema, you can fork and change it.
  • Make kubecolor configurable. Imagine vim's syntax highlighting configuration. The configuration file will look like this:
# ~/.config/kubecolor/schema.yml
dark: true
color:
  get:
    base_color: blue
    warn_color: red
    highlight_crush_loop_backoff: true
...

Two things on the second option:

  • Will we really want to write this file?
  • What's the format of the file?

I don't want to make kubecolor too complicated, I want to keep it simple as much as possible. However, the really useful feature should be builtin without configuration file.
I want to gather the opinion.

Panic: runtime error with Krew

Hi!
Thank you for such a good tool!

I found an panic error when use Krew:

k krew version
panic: runtime error: index out of range [1] with length 1

goroutine 18 [running]:
github.com/dty1er/kubecolor/printer.(*VersionPrinter).Print(0xc000014088, 0x5400c0, 0xc0000ac028, 0x5400e0, 0xc0000ac008)
        /home/runner/work/kubecolor/kubecolor/printer/kubectl_version.go:41 +0xd7a
github.com/dty1er/kubecolor/printer.(*KubectlOutputColoredPrinter).Print(0xc000094350, 0x5400c0, 0xc0000ac028, 0x5400e0, 0xc0000ac008)
        /home/runner/work/kubecolor/kubecolor/printer/kubectl_output_colored_printer.go:109 +0x15e
github.com/dty1er/kubecolor/command.Run.func1(0xc0000ba0c0, 0x5405e0, 0xc0000ac028, 0xc0000a8050)
        /home/runner/work/kubecolor/kubecolor/command/runner.go:89 +0x9b
created by github.com/dty1er/kubecolor/command.Run
        /home/runner/work/kubecolor/kubecolor/command/runner.go:88 +0x43d

It should be:

k krew version
OPTION            VALUE
GitTag            v0.4.0
GitCommit         8bebb56
IndexURI          https://github.com/kubernetes-sigs/krew-index.git

kubectl version

k version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.16-gke.2100", GitCommit:"36d0b0a39224fef7a40df3d2bc61dfd96c8c7f6a", GitTreeState:"clean", BuildDate:"2021-03-16T09:15:29Z", GoVersion:"go1.13.15b4", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.21) and server (1.18) exceeds the supported minor version skew of +/-1

Please check

REQ: More conditional coloring of `kubectl get pods` column values (like READY column)

I like to run a constantly refreshing kubectl get pods -A command in a specified interval using watch (in mac & linux) or while (1) {clear; <command_here>; sleep <interval_in_seconds>} (in windows powershell).

It would be nice conditional coloring for STATUS columns values just like the READY column:
image

For example: yellow for "Pending"/"Init:....", red for "Terminating"/"CrashLoopBackOff", green for "Running", grey for "Completed" etc.

No coloring when using watch and kubecolor

Using the 'watch' command with 'kubecolor' does not colorize, example:

watch -n5 kubecolor get all

output:

NAME                                         READY   STATUS    RESTARTS   AGE
pod/nfs-client-provisioner-f9c9cd856-g26ks   1/1     Running   0          24h

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.233.0.1   <none>        443/TCP   235d

NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nfs-client-provisioner   1/1     1            1           24h

NAME                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/nfs-client-provisioner-f9c9cd856   1         1         1       24h

Using the parameter: --force-colors

watch -n5 kubecolor --force-colors get all

output:

^[37mNAME READY STATUS RESTARTS AGE^[0m
^[36mpod/nfs-client-provisioner-f9c9cd856-g26ks^[0m ^[32m1/1^[0m ^[35mRunning^[0m ^[37m0^[0m ^[33m24h^[0m
^[37m^[0m
^[37mNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)AGE^[0m
^[36mservice/kubernetes^[0m ^[36mClusterIP^[0m ^[32m10.233.0.1^[0m ^[35m<none>^[0m ^[37m443/TCP^[0m ^[33m235d^[0m
^[37m^[0m
^[37mNAME READY UP-TO-DATE AVAILABLE AGE^[0m
^[36mdeployment.apps/nfs-client-provisioner^[0m ^[36m1/1^[0m ^[32m1^[0m ^[35m1^[0m ^[33m24h^[0m
^[37m^[0m
^[37mNAME DESIRED CURRENT READY AGE^[0m
^[36mreplicaset.apps/nfs-client-provisioner-f9c9cd856^[0m ^[37m1^[0m ^[33m1^[0m ^[36m1^[0m ^[32m24h^[0m

Piping `-o yaml > file.yml` to file adds color information to the file

using kubecolor with oc

running this command
oc adm create-bootstrap-project-template -o yaml > /tmp/project-template.yaml

creates a file that looks like this.

CleanShot 2023-01-19 at 13 55 45

A simple fix is to escape the alias.

\oc adm create-bootstrap-project-template -o yaml > /tmp/project-template.yaml

I realize this is outside of the intended scope.
Just thought I'd report in case anyone else has the issue.

kubecolor autocomplete adds extra symbols

I've noticed recently that kubecolor is adding symbols such as $'\033'\[33m when I press tab for autocomplete. I am using the kubectl plugin for oh-my-zsh. My shell is zsh. Pure /bin/kubectl autocomplete works fine.

I have another computer with the same setup (using dotfiles) where the same problems occur, having exactly the same zsh/oh-my-zsh/kubectl/kubecolor versions.

image

colorizing kubectl apply

Hi!

This looks like a nice and useful project. I like colors. I switched from curl to httpie because colors.

Would you be interested in me attempting to colorize kubectl apply? Currently it is all green. I'd like it to be mostly white, with separate colors for actions that are "unchanged", "created", "configured", etc.

I've not looked at the code so I don't know if it fits. Let me know. Any other tips for an implementation would be welcome.

Cheers
Per.

yaml color for `kubecolor apply -o yaml`

kubecolor 0.0.7: kubecolor apply -f foo.yaml -o yaml
Actual result: all yaml output is green.

Expected result: it would be great if the yaml output would be nicely colored like with kubecolor get pods -o yaml.

Kubecolor autocompletion does not work and break canonical k alias

I tried to enable the autocompletion for kubecolor following instructions on the official README:

Basically, configuring autocompletion for kubecolor requires adding following line in your shell config file.

# autocomplete for kubecolor
complete -o default -F __start_kubectl kubecolor

If you are using an alias like k="kubecolor", then just change above like:

complete -o default -F __start_kubectl k

but it does not work, no autocompletion for kubecolor and even worse no autocompletion anymore for k alias!

Here some info:

  • OS: macos catalina v10.15.7
  • kubectl: official v1.20.2
  • k alias set and autocompletion properly working (without enabling kubecolor autocompletion)

Here the output of kubectl version command:

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-14T05:14:17Z", GoVersion:"go1.15.6", Compiler:"gc", Platform:"darwin/amd64"}

Any help is really appreciated!!

Can't get this working

I followed the readme file and did the installation. After that the kubecolor command does not work.

diff coloring

I think it it would be nice to have diff colors similar to helm diff, currently the entire output looks green

show different color for pod lifecycle

Output different color for pod lifecycle. Currently is shows only one color.
It will be great if it shows a different color for each pod lifecycle. which will help to easily identify
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/

  • Screenshot of "kubecolor" output

Screen Shot 2021-10-18 at 11 50 34 AM

  • Screenshot of "kubectl" output:

Screen Shot 2021-10-18 at 3 47 33 PM

  • What's the issue and what you expect
    it outputs only one color for pod lifecycle. I expect it to have different color for each pod lifecycle.
  • Shell info (bash/zsh/fish etc, its version)
    zsh 5.8 (x86_64-apple-darwin20.0)

go install fails

Instructions say:

go install github.com/hidetatz/kubecolor/cmd/kubecolor@latest

But this results in:

go install: github.com/hidetatz/kubecolor/cmd/kubecolor@latest: github.com/hidetatz/[email protected]: parsing go.mod:
	module declares its path as: github.com/dty1er/kubecolor
	        but was required as: github.com/hidetatz/kubecolor

panic: runtime error: index out of range [0]

kubecolor describe node xxx

Capacity:
  attachable-volumes-gce-pd:panic: runtime error: index out of range [0] with length 0

goroutine 6 [running]:
github.com/dty1er/kubecolor/printer.(*DescribePrinter).Print(0xc000100f08, 0x535320, 0xc00000e030)
        /home/vlad/dev/oss/kubecolor/printer/describe.go:93 +0xc84
github.com/dty1er/kubecolor/printer.Print(0x535320, 0xc00000e030, 0x535340, 0xc00000e018, 0xc000018980, 0x1)
        /home/vlad/dev/oss/kubecolor/printer/printer.go:81 +0x292
github.com/dty1er/kubecolor/command.Run.func7()
        /home/vlad/dev/oss/kubecolor/command/runner.go:79 +0x97
github.com/dty1er/kubecolor/command.runAsync.func1(0xc000076810, 0xc000016150)
        /home/vlad/dev/oss/kubecolor/command/runner.go:95 +0x27
created by github.com/dty1er/kubecolor/command.runAsync
        /home/vlad/dev/oss/kubecolor/command/runner.go:94 +0x6e

Do not colorise output of kubecolor.exe __complete

Can we please add logic to always pass through the output of kubecolor.exe __complete in plain text. Without this in plain text it breaks the auto-completion in Powershell since Powershell calls this function to receive next arguments for auto-completion. Since users are not calling this directly it should not impact general workflow of kubecolor.

As a temporary workaround, I had this added in my Powershell autocomplete script

  if(((Get-Alias kubectl).Definition) -eq 'kubecolor'){
    $Program = $Program + ' --plain'
  }

I'm new at golang but happy to take a stab with some hand holding :)

failed to install kubecolor using brew

Failed message:
➜ ~ brew install hidetatz/tap/kubecolor
Error: hidetatz/tap/kubecolor: wrong number of arguments (given 1, expected 0)

Please let me know for any more information

Installation without depending on go get

Currently kubecolor can be installed via go get, but ideally it should not be depending on go command. We should:

  • enable kubecolor to be installed via package manager (homebrew etc)
  • distribute pre-build binary via GitHub release

Autocomplete does not work.

Hello @dty1er

I have kubecolor updated after running go get -u github.com/dty1er/kubecolor/cmd/kubecolor. I also have the following in my.zshrc

# kubecolor
alias kubectl=kubecolor
complete -o default -F __start_kubectl kubectl

So, when I typed kubectl command, my autocomplete did not work. Then, I removed the above kubecolor config in my .zshrc, and ran source ~/.zshrc to get the latest changes on my src file.

I re-tried kubectl again, and the autocomplete still did not work.

After I removed that kubecolor config, I checked the following:

▶ which kubectl
kubectl: aliased to kubecolor
▶ which kubecolor
/Users/lpurba/go/bin/kubecolor

Why the autocomplete did not work? Also, after removing kubecolor config and sourceing the src file, why my kubectl was still an alias of kubecolor?

Having autocomplete is very helpful. I appreciate your help

Thank you,
Laurentius

Brew installation method does not work

==> Tapping hidetatz/tap
Cloning into '/usr/local/Homebrew/Library/Taps/hidetatz/homebrew-tap'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 59 (delta 12), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (59/59), 7.89 KiB | 2.63 MiB/s, done.
Resolving deltas: 100% (12/12), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/hidetatz/homebrew-tap/Formula/kubecolor.rb
kubecolor: Calling bottle :unneeded is disabled! There is no replacement.
Please report this issue to the hidetatz/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/hidetatz/homebrew-tap/Formula/kubecolor.rb:9

Error: Cannot tap hidetatz/tap: invalid syntax in tap!
Failed to install [hidetatz/tap/kubecolor]
Some packages were not installed

==> Some tasks were not executed successfully

Unsure where the error is, seems in brew formula

kubecolor inconsistent output

i have inconsistent output (sometime dup, sometime disappear, order change) when i use kubecolor versus direct kubectl

  • Screenshot of "kubectl" output
    image

  • Screenshot of "kubecolor" output

i launch it 4 times

image

  • What's the issue and what you expect

i expect to have the same output as with kubectl with color of course

  • Shell info (bash/zsh/fish etc, its version)

zsh 5.8
kubectl v1.21.0
kubecolor 0.0.20

kubectl debug prompt issue with kubecolor

Hello all,

I am trying to test Ephemeral Container using kube version v1.23.5

after entering kubectl debug -it ephemeral-demo --image=busybox:1.35 --target=ephemeral-demo
i can see 2 issues..

  1. prompt displayed improper format. each line is different tab spaces etc
  2. can’t see whatever i type at command prompt. After pressing enter.. i will be able to see along with result

Issue:
2022-03-31 14 40 26

When i remove alias kubectl=kubecolor it works as expected
2022-04-02 11 41 00

Any workaround to fix this issue without removing?

Want to always run with --light-background

Hello!
Thanks for very useful tool.

I'm using kubecolor on macos with zsh, iTerm2 with ligth theme (Solarized Light). And I want to configure kubecolor to always use --light-background.

Regards :)

kubectl run command showing disorder outputs

I'm running kubectl run -i --tty busybox --image=busybox --restart=Never -- sh. the shell would not echo any character inputed.
after entering enter, the commands are executed but the output is not readable.

If you don't see a command prompt, try pressing enter.

                                                      / #
                                                          / # ls
                                                                bin   dev   etc   home  proc  root  sys   tmp   usr   var

kubecolor: Calling bottle :unneeded is disabled! There is no replacement

brew install hidetatz/tap/kubecolor
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
fclones

==> Tapping hidetatz/tap
Cloning into '/home/pepodev/.linuxbrew/Homebrew/Library/Taps/hidetatz/homebrew-tap'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 59 (delta 12), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (59/59), 7.89 KiB | 2.63 MiB/s, done.
Resolving deltas: 100% (12/12), done.
Error: Invalid formula: /home/pepodev/.linuxbrew/Homebrew/Library/Taps/hidetatz/homebrew-tap/Formula/kubecolor.rb
kubecolor: Calling bottle :unneeded is disabled! There is no replacement.
Please report this issue to the hidetatz/tap tap (not Homebrew/brew or Homebrew/core):
  /home/pepodev/.linuxbrew/Homebrew/Library/Taps/hidetatz/homebrew-tap/Formula/kubecolor.rb:9

Error: Cannot tap hidetatz/tap: invalid syntax in tap!

go get fails

Instructions say:

go get -u github.com/hidetatz/kubecolor/cmd/kubecolor

But this results in

go get: github.com/hidetatz/[email protected]: parsing go.mod:
	module declares its path as: github.com/dty1er/kubecolor
	        but was required as: github.com/hidetatz/kubecolor

install fail on homebrew on mac

brew install hidetatz/tap/kubecolor
==> Tapping hidetatz/tap
Cloning into '/usr/local/Homebrew/Library/Taps/hidetatz/homebrew-tap'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 59 (delta 12), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (59/59), 7.89 KiB | 336.00 KiB/s, done.
Resolving deltas: 100% (12/12), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/hidetatz/homebrew-tap/Formula/kubecolor.rb
kubecolor: wrong number of arguments (given 1, expected 0)
Error: Cannot tap hidetatz/tap: invalid syntax in tap!

Problem editing resources when using emacs

Get this error after I started using kubecolor. My editor is emacs running as daemon.

$ k edit deployments.apps unleash
emacsclient: could not get terminal name
emacsclient: error executing alternate editor ""
error: there was a problem with the editor "emacsclient -t"

Kubecolor breaks krew plugins using fzf (ctx + ns)

Kubecolor breaks some krew plugins using fzf.
For example, kubecolor ctx only lists the contexts with coloration instead of enabling the user to choose the context to switch to with fzf.
Here's a screenshot :
Capture d’écran du 2022-01-06 16-59-18
I'm using zsh, version 5.8 on Linux.

Go install command fails due to module naming

When running the install command specified in the readme, we get an error:

$ go install github.com/hidetatz/kubecolor/cmd/kubecolor@latest                                         
go: github.com/hidetatz/kubecolor/cmd/kubecolor@latest: github.com/hidetatz/[email protected]: parsing go.mod:
	module declares its path as: github.com/dty1er/kubecolor
	        but was required as: github.com/hidetatz/kubecolor

brew warning

$ brew info kubecolor
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the dty1er/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/dty1er/homebrew-tap/Formula/kubecolor.rb:9

dty1er/tap/kubecolor: stable 0.0.20

kubecolor plugins version failed

when i try to use the version command of a kubectl plugin it failed
ex with cert-manager

  • Screenshot of "kubectl" output
    kubectl cert-manager version
    util.Version{GitVersion:"v1.0.1", GitCommit:"c06d7a55dafb1a812321bf3c2ab982daa7b3e699", GitTreeState:"clean", GoVersion:"go1.15", Compiler:"gc", Platform:"darwin/amd64"}

  • Screenshot of "kubecolor" output
    kubecolor cert-manager version
    panic: runtime error: index out of range [1] with length 1

goroutine 18 [running]:
github.com/dty1er/kubecolor/printer.(*VersionPrinter).Print(0xc00008c008, 0x11383f8, 0xc00010e028, 0x1138418, 0xc00010e008)
/home/runner/work/kubecolor/kubecolor/printer/kubectl_version.go:41 +0xcf6
github.com/dty1er/kubecolor/printer.(*KubectlOutputColoredPrinter).Print(0xc0001161d0, 0x11383f8, 0xc00010e028, 0x1138418, 0xc00010e008)
/home/runner/work/kubecolor/kubecolor/printer/kubectl_output_colored_printer.go:110 +0x16e
github.com/dty1er/kubecolor/command.Run.func1(0xc00013c060, 0x1138868, 0xc00010e028, 0xc00010c040)
/home/runner/work/kubecolor/kubecolor/command/runner.go:95 +0x9b
created by github.com/dty1er/kubecolor/command.Run
/home/runner/work/kubecolor/kubecolor/command/runner.go:94 +0x45f

  • What's the issue and what you expect

i expect to ahve the version as kubectl return

  • Shell info (bash/zsh/fish etc, its version)
    zsh 5.8
    kubectl v1.21.0
    kubecolor 0.0.19

Error when running `kubectl describe namespace <namespace>`

I am on Mac OSX v. 10.15.7 (Catalina) and Kubecolor 0.0.7 installed from brew, and I'm using zsh in iTerm2. I get the following errors when trying to describe namespace resources in K8s:

Resource Quotas
Name:panic: runtime error: index out of range [0] with length 0

goroutine 18 [running]:
github.com/dty1er/kubecolor/printer.(*DescribePrinter).Print(0xc00005e010, 0x113d2e0, 0xc0000a2028, 0x113d300, 0xc0000a2008)
/home/runner/work/kubecolor/kubecolor/printer/kubectl_describe.go:85 +0xe75
github.com/dty1er/kubecolor/printer.(*KubectlOutputColoredPrinter).Print(0xc000082340, 0x113d2e0, 0xc0000a2028, 0x113d300, 0xc0000a2008)
/home/runner/work/kubecolor/kubecolor/printer/kubectl_output_colored_printer.go:101 +0x15e
github.com/dty1er/kubecolor/command.Run.func1(0xc00009a0a0, 0x113d820, 0xc0000a2028, 0xc0000a8040)
/home/runner/work/kubecolor/kubecolor/command/runner.go:85 +0x9b
created by github.com/dty1er/kubecolor/command.Run
/home/runner/work/kubecolor/kubecolor/command/runner.go:84 +0x34c
image

:unneeded is deprecated

After update to Monterey, I have this issue:

% brew upgrade kubecolor
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the dty1er/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/dty1er/homebrew-tap/Formula/kubecolor.rb:9

switching between light and dark background

Hello,

First of all - love the tool, discovered it recently and really happy with the functionality.

Second of all, I need suggestions for my setup.
So I'm using the latest iTerm2 (v3.5) that supports switching color preset (including background) based on the system automatically enabled/disabled dark mode, e.g., if the system is set to light mode during the day, I have the light solarized background, if it's dark mode - I have dark solarized.

As per this suggestion, I'm using scripts and aliases to switch manually between kubecolor and kubecolor --light-background, but wonder if there is more automatic way to switch?

autocompletion bug

this could very well have to do with my setup, but I'm getting something weird from the first word of autocomplete.

if i tab from kubecolor , i get kubecolor $'\033'\[33m
kubecolor de doesn't complete

but kubecolor get , does work and gives me all the right options

Publish a container image in CI

Hi there. Thanks for this great project! As a Linux user it's incredibly inconvenient to go grab a new static binary. A lot of k8s centric go apps I wire into shell functions with podman/docker containers. Would it be possible if we can get releases wired up to a image?

kubectl process exit status lost with kubecolor

kubecolor ignores the exit status of the kubectl process:

$ /usr/bin/kubectl get pod foo; echo $?
Error from server (NotFound): pods "foo" not found
1
$ kubecolor get pod foo; echo $?
Error from server (NotFound): pods "foo" not found
0

(use-case: in a script (so the exit status is necessary), where a human still sees the outputs (so the color is much useful).)

AUR package is in need of new maintainer

kubecolor has been packaged in the AUR for some time, but was recently abandoned by the previous maintainer. A new maintainer is welcome to adopt the package. You should have knowledge of AUR conventions, PKGBUILD, and makepkg.

Good luck :)

kubecolor breaks on first argument after kubectl

Starting with kubectl v1.22, the first argument has changed.

kubectl v1.21.1
image001

kubectl v1.22.12
image002

This causes issues with tab completion using kubecolor.

kubecolor using kubectl v1.22 on first argument
image003

kubecolor using kubectl v1.22 with all other arguments after the first
image004 60

Losing minus sign "-" in yaml output

Create a pod with "-" prefixed args

kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: test-pod
spec:
  containers:
    - name: main
      image: remrain/tiny-hello
      args:
      - -test
EOF

"-" is missing in yaml output

kubecolor get pod test-pod -o yaml
...
spec:          
  containers:      
  - args:        
    - test  <---------- HERE
kubectl get pod test-pod -o yaml
...
spec:
  containers:
  - args:
    - -test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.