Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pkg/errors #90

Closed
wants to merge 6 commits into from
Closed

add pkg/errors #90

wants to merge 6 commits into from

Conversation

whomobile
Copy link
Contributor

DRAFT:

Adding errors wrapper

@whomobile whomobile closed this May 14, 2024
@wencaiwulue
Copy link
Collaborator

wencaiwulue commented Jul 27, 2024

@whomobile Hello kim, i have a propose about log. wants to make it more more formal.
current is like this

~ kubevpn connect
Password:
start to connect
get cidr from cluster info...
get cidr from cluster info ok
get cidr from cni...
wait pod cni-net-dir-kubevpn to be running timeout, reason , ignore
get cidr from svc...
get cidr from svc ok
get cidr successfully
traffic manager not exist, try to create it...
label namespace default
create serviceAccount kubevpn-traffic-manager
create roles kubevpn-traffic-manager
create roleBinding kubevpn-traffic-manager
create service kubevpn-traffic-manager
create deployment kubevpn-traffic-manager
pod kubevpn-traffic-manager-66d969fd45-9zlbp is Pending
Container     Reason            Message
control-plane ContainerCreating
vpn           ContainerCreating
webhook       ContainerCreating

pod kubevpn-traffic-manager-66d969fd45-9zlbp is Running
Container     Reason           Message
control-plane ContainerRunning
vpn           ContainerRunning
webhook       ContainerRunning

Creating mutatingWebhook_configuration for kubevpn-traffic-manager
update ref count successfully
port forward ready
tunnel connected
dns service ok
+---------------------------------------------------------------------------+
|    Now you can access resources in the kubernetes cluster, enjoy it :)    |
+---------------------------------------------------------------------------+
➜  ~

look the chinglish

start to connect
get cidr from cluster info...
get cidr from cluster info ok
get cidr from cni...
wait pod cni-net-dir-kubevpn to be running timeout, reason , ignore
get cidr from svc...
get cidr from svc ok
get cidr successfully

Maybe we can change it . do you have interesting?

look the ssh-keygen log , better style

```shell
C:\ProgramData\ssh>ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\Administrator/.ssh/id_rsa.
Your public key has been saved in C:\Users\Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:O9KSPdpaiZCNE2L+HlAr1w5lQNkjaWxzXAC/8yIYDOc [email protected]
The key's randomart image is:
+---[RSA 3072]----+
|   o+*.o.        |
|    Oo=          |
|. +oo++.         |
| B o X .         |
|  E O = S        |
|   B = B o       |
|  . + B X        |
|   . o B o       |
|    . o..        |
+----[SHA256]-----+

C:\ProgramData\ssh>

minikube log, better

😄  minikube v1.28.0 on Darwin 13.4.1 (arm64)
🎉  minikube 1.31.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.31.2
💡  To disable this notice, run: 'minikube config set WantUpdateNotification false'

✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
> gcr.io/k8s-minikube/kicbase:  0 B [______________________] ?% ? p/s 1m11s
🤷  docker "minikube" container is missing, will recreate.
🔥  Creating docker container (CPUs=2, Memory=3885MB) ...
🐳  Preparing Kubernetes v1.25.3 on Docker 20.10.20 ...
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Because my english is not that good, born and raised in America should have more suggestion. so i am looking for your help~ 😂

@whomobile
Copy link
Contributor Author

If there is a one way to find all user visible logs(debug/info/warn/error), we could make llm to generate more readable/consistent logs. Lat time when I debug, there were couple of variants.

When user face issues, they should able to report/fix.

@wencaiwulue
Copy link
Collaborator

wencaiwulue commented Jul 28, 2024 via email

@wencaiwulue
Copy link
Collaborator

wencaiwulue commented Jul 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants