arkade icon indicating copy to clipboard operation
arkade copied to clipboard

Include support kube-ps1 in tools

Open nitishkumar71 opened this issue 4 years ago • 14 comments

We want to include support of kube-ps1 in arkade get

Expected Behaviour

arkade get does not provides installation support of kube-ps1

Current Behaviour

arkade get should provides installation support of kube-ps1

Possible Solution

Include kube-ps1 as another tool in arkade

nitishkumar71 avatar Mar 09 '21 03:03 nitishkumar71

@patbi would like to work on it?

As this is a shell script, so it will work on all unix/linux version. Prevent it's installation on windows. You need to append it in the list of tools in https://github.com/alexellis/arkade/blob/master/pkg/get/tools.go

nitishkumar71 avatar Mar 31 '21 14:03 nitishkumar71

Hello @nitishkumar71 of course how can I contribute.

patbi avatar Mar 31 '21 16:03 patbi

Look at this section, arkade provides easy way to install a lot of tools.

We want to add support of kube-ps1. You need to add support into tools file. Follow the contribution guidelines to know about how to contribute.

nitishkumar71 avatar Mar 31 '21 17:03 nitishkumar71

@nitishkumar71 Great I look at it in the night

patbi avatar Mar 31 '21 18:03 patbi

@patbi How can we help you to work on this?

nitishkumar71 avatar Apr 13 '21 01:04 nitishkumar71

Hello @nitishkumar71 Thank you, I need to do some reading during the day and then come back with more questions.

patbi avatar Apr 13 '21 06:04 patbi

@nitishkumar71 : Look at this section, arkade provides easy way to install a lot of tools.

--------------------------------done----------------------------------------

I have already cloned the project with the command:

Windows users with Git Bash

curl -sLS https://dl.get-arkade.dev | sh

patbi avatar Apr 13 '21 16:04 patbi

@nitishkumar71 I went through contribution guidelines

and joined the community

patbi avatar Apr 13 '21 16:04 patbi

@nitishkumar71 my concern is how to contribute to add support in the tool file

Thank you.

patbi avatar Apr 13 '21 16:04 patbi

@patbi You can look at this example, where we have added support for istio in arkade using go template.

nitishkumar71 avatar Apr 14 '21 13:04 nitishkumar71

@nitishkumar71 Great I look at.

patbi avatar Apr 14 '21 13:04 patbi

Hey! I tried arkade yesterday and felt also the need to have support for kube-ps1. I already forked the project and added the support for kube-ps1. You can find my changes here: https://github.com/andreppires/arkade/commit/ec95a3c2a00b6f6179b45c51c6950b9c8345884f

The only thing I would like to add is documentation on how to set up the terminal to make use of the kube-ps1. Is there a way to prompt that information to the user when he does arkade get kube-ps1?

andreppires avatar Jun 09 '21 09:06 andreppires

@andreppires if you install any tool, arkade alredy provides generic steps for setup. Are there any other instructions you want to include?

Also please raise the PR, it will help team to review it. You can keep PR in WIP state. image

nitishkumar71 avatar Jun 10 '21 06:06 nitishkumar71

Hey @nitishkumar71 Maybe the problem here is that kube-ps1 in not a tool like kops or kubectx etc. It is a script that lets you add the current Kubernetes context and namespace configured on kubectl to your Bash/Zsh prompt strings. So maybe it does not fit in the purposes of arkade.

The steps I suggest to add is about setting up zsh or bash to show the k8s context and namespace. Like for zsh:

# Update .zshrc
source /path/to/kube-ps1.sh
PROMPT='$(kube_ps1)'$PROMPT

Link for the project: https://github.com/jonmosco/kube-ps1

andreppires avatar Jun 14 '21 11:06 andreppires