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

Improve GetRuntimeClient compatibility #273

Merged
merged 1 commit into from
May 7, 2022

Conversation

lbbniu
Copy link
Member

@lbbniu lbbniu commented Apr 18, 2022

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #232 #251 #276

Special notes for your reviewer:

@github-actions
Copy link
Contributor

github-actions bot commented Apr 18, 2022

🎊 PR Preview 76d5644 has been successfully built and deployed to https://gocrane-crane-preview-pr-273.surge.sh

🕐 Build time: 1.573s

🤖 By surge-preview

@qmhu qmhu requested a review from chenkaiyue April 23, 2022 09:15
@qmhu
Copy link
Member

qmhu commented Apr 23, 2022

@chenkaiyue Please take a look

@chenkaiyue
Copy link
Contributor

chenkaiyue commented Apr 27, 2022

Thanks for your contributions. Have you tested in Kind or K3S, maybe you can paste test images here?

@github-actions
Copy link
Contributor

github-actions bot commented Apr 29, 2022

🎉 Successfully Build Images.

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-273-6eef366 docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-273-6eef366
dashboard:pr-273-6eef366 docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-273-6eef366
metric-adapter:pr-273-6eef366 docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-273-6eef366
craned:pr-273-6eef366 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-273-6eef366

@zsnmwy
Copy link
Member

zsnmwy commented Apr 29, 2022

I have some tests in finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-273-c744466, k8s v1.23.5.

Connect container runtime endpoint successfully, but have some permission problems.

    1 connection.go:42] connect endpoint 'unix:///var/run/dockershim.sock', make sure you are running as root and the endpoint has been started
    1 connection.go:26] Connect using endpoint 'unix:///run/containerd/containerd.sock' with '2s' timeout
    1 connection.go:44] Connected successfully using endpoint: unix:///run/containerd/containerd.sock
    1 agent.go:157] Failed to get noderesource tsp configmap : configmaps "noderesource-tsp-template" is forbidden: User "system:serviceaccount:crane-system:crane-agent" cannot
    1 agent.go:202] Discover the presence of old noderesource tsp and try to contrast the changes: noderesource-demo
    1 agent.go:206] Discover the presence of old noderesource tsp and the Tsp rules have been changed: noderesource-demo
    1 request.go:936] Error in request: resource name may not be empty
    1 agent.go:210] Failed to update noderesource tsp noderesource-demo : resource name may not be empty
    1 agent.go:60] resource name may not be empty

@lbbniu
Copy link
Member Author

lbbniu commented Apr 29, 2022

k3s connect container runtime endpoint successfully:
image

@qmhu
Copy link
Member

qmhu commented Apr 29, 2022

https://github.com/gocrane/helm-charts/pull/46/files is this pr related to this change?

@lbbniu
Copy link
Member Author

lbbniu commented Apr 29, 2022

https://github.com/gocrane/helm-charts/pull/46/files is this pr related to this change?

ok

@lbbniu
Copy link
Member Author

lbbniu commented Apr 29, 2022

I have some tests in finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-273-c744466, k8s v1.23.5.

Connect container runtime endpoint successfully, but have some permission problems.

    1 connection.go:42] connect endpoint 'unix:///var/run/dockershim.sock', make sure you are running as root and the endpoint has been started
    1 connection.go:26] Connect using endpoint 'unix:///run/containerd/containerd.sock' with '2s' timeout
    1 connection.go:44] Connected successfully using endpoint: unix:///run/containerd/containerd.sock
    1 agent.go:157] Failed to get noderesource tsp configmap : configmaps "noderesource-tsp-template" is forbidden: User "system:serviceaccount:crane-system:crane-agent" cannot
    1 agent.go:202] Discover the presence of old noderesource tsp and try to contrast the changes: noderesource-demo
    1 agent.go:206] Discover the presence of old noderesource tsp and the Tsp rules have been changed: noderesource-demo
    1 request.go:936] Error in request: resource name may not be empty
    1 agent.go:210] Failed to update noderesource tsp noderesource-demo : resource name may not be empty
    1 agent.go:60] resource name may not be empty

@qmhu @chenkaiyue Should this bug be fixed by this pr or fixed by a separate pr?

@lbbniu
Copy link
Member Author

lbbniu commented Apr 29, 2022

kind connect container runtime endpoint successfully:
image

@chenkaiyue
Copy link
Contributor

Please squash these commits.

@lbbniu
Copy link
Member Author

lbbniu commented May 6, 2022

Please squash these commits.

Finish

@qmhu
Copy link
Member

qmhu commented May 6, 2022

/LGTM

nice job!

@chenkaiyue
Copy link
Contributor

/LGTM

@chenkaiyue chenkaiyue merged commit a212a98 into gocrane:main May 7, 2022
@lbbniu lbbniu deleted the fix/lbbniu/crane-agent branch May 16, 2023 06:40
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.

Support install crane-agent in Kind
4 participants