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

[BUG]The yurt-manager component cannot be started normally. #2267

Open
tianxin8206 opened this issue Jan 13, 2025 · 3 comments
Open

[BUG]The yurt-manager component cannot be started normally. #2267

tianxin8206 opened this issue Jan 13, 2025 · 3 comments
Labels
kind/bug kind/bug

Comments

@tianxin8206
Copy link

What happened:
yurt-manager cannot start.
logs:

I0113 02:07:40.145529       1 platform_admin_controller.go:117] resource iot.openyurt.io/v1beta1, Resource=platformadmins doesn't exist
2025-01-13T02:07:40Z	ERROR	setup	unable to setup controllers	{"error": "no matches for iot.openyurt.io/v1beta1, Resource=platformadmins"}
github.com/openyurtio/openyurt/cmd/yurt-manager/app.Run
	/build/cmd/yurt-manager/app/manager.go:211
github.com/openyurtio/openyurt/cmd/yurt-manager/app.NewYurtManagerCommand.func2
	/build/cmd/yurt-manager/app/manager.go:111
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:989
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
main.main
	/build/cmd/yurt-manager/yurt-manager.go:46
runtime.main
	/usr/local/go/src/runtime/proc.go:271

How to reproduce it (as minimally and precisely as possible):
Install openyurt 1.6.0 in k8s 1.30.8.

Environment:

  • OpenYurt version: 1.6.0
  • Kubernetes version (use kubectl version): 1.30.8
  • OS (e.g: cat /etc/os-release): almalinux 9.5
  • Kernel (e.g. uname -a): 5.14.0-503.19.1.el9_5.x86_64
  • Install tools: yurt-manager

/kind bug

@tianxin8206 tianxin8206 added the kind/bug kind/bug label Jan 13, 2025
@tnsimon
Copy link
Contributor

tnsimon commented Jan 30, 2025

This is due being unable to apply v1beta1.platformadmins CRD due to kubectl.kubernetes.io/last-applied-configuration being stored as metadata in the update.

k apply -f iot.openyurt.io_platformadmins.yaml
Warning: resource customresourcedefinitions/platformadmins.iot.openyurt.io is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
The CustomResourceDefinition "platformadmins.iot.openyurt.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Refer to Kubectl Install CRD Failed — Annotations Too Long

A temporary workaround is to disable platformadmins controller by adding -platformadmin to the values.yaml and upgrade yurt-manager.

If you need to use this controller, use kubectl replace -f ... to apply the CRD

@ssen85
Copy link

ssen85 commented Jan 30, 2025

Hello,

I am also facing the same issue. May I know where should I apply this fix in the values.yaml file ?

A temporary workaround is to disable platformadmins controller by adding -platformadmin to the values.yaml and upgrade yurt-manager.

@tnsimon
Copy link
Contributor

tnsimon commented Jan 30, 2025

@ssen85 when you install yurt-manager, you can pass a values.yaml file with controllers: "-nodelifecycle,-platformadmin,*" set to disable the platformadmin controller.

helm upgrade --install yurt-manager -n kube-system openyurt/yurt-manager -f values.yaml per the docs

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

No branches or pull requests

3 participants