Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Hide kubecontext outside of kube project #122

Merged
merged 3 commits into from
Dec 3, 2018
Merged

Hide kubecontext outside of kube project #122

merged 3 commits into from
Dec 3, 2018

Conversation

matchai
Copy link
Owner

@matchai matchai commented Nov 30, 2018

Description

Add an early return when kube_context is not present.

Motivation and Context

Closes #111

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux

Checklist:

  • I have checked that no other PR duplicates mine
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@matchai matchai added the Type: Bug Fix an existing bug label Nov 30, 2018
@matchai matchai requested a review from Snuggle November 30, 2018 20:53
@Snuggle
Copy link
Collaborator

Snuggle commented Dec 3, 2018

The indentation on this line has gone swimming! Looks good otherwise, please fix before merging. 😊

__sf_util_set_default SPACEFISH_KUBECONTEXT_SUFFIX $SPACEFISH_PROMPT_DEFAULT_SUFFIX

@matchai matchai merged commit 464f26d into master Dec 3, 2018
@matchai matchai deleted the fix-kubecontext branch December 3, 2018 16:38
@MindTooth
Copy link

Did you notice any changes in rendering speed of the prompt? Felt like this (kubectl)-check caused the shell to halt some before render det new input line.

Testing without Spacefish and using a built in prompt, and it flies away.

Any way for me to completely disable the Kubernetes section, to test the speed out?

@matchai
Copy link
Owner Author

matchai commented Dec 3, 2018

This most-recent update should not really affect performance as it's only checking the existence of a variable. We were already performing the kubectl check previously, but not acting on it. 😅

Yes, by setting SPACEFISH_KUBECONTEXT_SHOW to false, the section won't appear, skipping the check.

You can add set -gx SPACEFISH_KUBECONTEXT_SHOW false to your config.fish to disable it.

@MindTooth
Copy link

Guess it's all the different checks then. 😄

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Fix an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes included with Docker 18.09 sets the kubectl-section to always be enabled
3 participants