cloud-native-toolkit / cloud-native-toolkit/planning

cloud-shell-commands show a meaningless message of grep usage

Open
#904 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
cloud-shell-commands show a meaningless message of grep usage when I use `docker-deskto` context.

**To Reproduce**
Steps to reproduce the behavior:

1. Install cloud native toolkit
- `curl -sfL get.cloudnativetoolkit.dev | sh -`
- https://cloudnativetoolkit.dev/setup/fast-start/
1. Install Docker Desktop
- https://docs.docker.com/desktop/mac/install/
1. Enable Kubernetes of Docker Desktop
- https://docs.docker.com/desktop/kubernetes/
1. Use `docker-deskto` context
- `kubectl config use-context docker-desktop `
1. See a meaningless message of grep usage
- I attached a screenshot

**Expected behavior**
I think that the function has a problem.
https://github.com/cloud-native-toolkit/cloud-shell-commands/blob/main/assets/config/zsh-kube#L7

Because `docker-desktop` cluster name does not contain `/`.
When `CLUSTER_NAME=$(echo $1 | awk -F / '{print $2}')` is executed, nothing is stored in `CLUSTER_NAME`.
As a result, the function pipes nothing to `grep -v`.

**Screenshots**
![スクリーンショット 2022-01-13 20.02.08.png](https://images.zenhubusercontent.com/61de36412f3d477b1862ff55/75cf40d3-b02e-4866-8580-032c57aa55ad)

**IBM Cloud**
Select the services and tools affected

- [x] IBM Kubernetes Service Managed Service
- [x] Red Hat OpenShift Managed Services

**Desktop (please complete the following information):**
- OS: macOS 11.6

**Additional context**
I will create a pull request to fix the problem. Please wait a little.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.