Skip to content

Improve GetRuntimeClient compatibility#273

Merged
chenkaiyue merged 1 commit intogocrane:mainfrom
lbbniu:fix/lbbniu/crane-agent
May 7, 2022
Merged

Improve GetRuntimeClient compatibility#273
chenkaiyue merged 1 commit intogocrane:mainfrom
lbbniu:fix/lbbniu/crane-agent

Conversation

@lbbniu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

qmhu commented Apr 23, 2022

@chenkaiyue Please take a look

@chenkaiyue
Copy link
Copy Markdown
Contributor

chenkaiyue commented Apr 27, 2022

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

@lbbniu lbbniu force-pushed the fix/lbbniu/crane-agent branch from bf5d5d1 to c744466 Compare April 29, 2022 03:58
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

lbbniu commented Apr 29, 2022

k3s connect container runtime endpoint successfully:
image

@qmhu
Copy link
Copy Markdown
Member

qmhu commented Apr 29, 2022

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

@zsnmwy
Copy link
Copy Markdown
Member

zsnmwy commented Apr 29, 2022

@lbbniu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

lbbniu commented Apr 29, 2022

kind connect container runtime endpoint successfully:
image

@lbbniu lbbniu force-pushed the fix/lbbniu/crane-agent branch from c744466 to 6f12558 Compare April 29, 2022 09:22
@chenkaiyue
Copy link
Copy Markdown
Contributor

Please squash these commits.

@lbbniu lbbniu force-pushed the fix/lbbniu/crane-agent branch from 6f12558 to bda836c Compare May 6, 2022 02:37
@lbbniu
Copy link
Copy Markdown
Member Author

lbbniu commented May 6, 2022

Please squash these commits.

Finish

@lbbniu lbbniu force-pushed the fix/lbbniu/crane-agent branch from bda836c to 2a91368 Compare May 6, 2022 02:50
@lbbniu lbbniu force-pushed the fix/lbbniu/crane-agent branch from 2a91368 to 6eef366 Compare May 6, 2022 02:53
@qmhu
Copy link
Copy Markdown
Member

qmhu commented May 6, 2022

/LGTM

nice job!

@chenkaiyue
Copy link
Copy Markdown
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