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

s2i job label must be no more than 63 characters #170

Open
yangbo7907 opened this issue Dec 27, 2022 · 1 comment
Open

s2i job label must be no more than 63 characters #170

yangbo7907 opened this issue Dec 27, 2022 · 1 comment

Comments

@yangbo7907
Copy link

Hi guys,
I got stucked by issue "must be no more than 63 characters",.
It was successful when I manually created a job by click "run" button in the image builder, and the final web application worked as I expectecd, I saw the job presented:
root@yb01:~# kubectl get jobs -A
NAMESPACE NAME COMPLETIONS DURATION AGE
demo1 dockerhub.kubekey.local-library-myweb-0ts-9fbc088797cc-job 1/1 9s 12h
demo1 dockerhub.kubekey.local-library-myweb-etm-a5364c5f3a73-job 1/1 8s 32m
demo1 dockerhub.kubekey.local-library-myweb-prh-68e5f481c0bd-job 1/1 10s 4d20h
demo1 library-mywebb-latest-vot-ru5-fbca5cfd0776-job 1/1 10s 4d20h

but when I triggered a job from the gitlab web hook, I got the error in the s2i operator logs:

I1227 03:41:19.150241 1 s2irun_controller.go:136] s2irun-controller "msg"="Reconciler of s2irun called" "Name"="dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m"
I1227 03:41:19.151135 1 s2irun_controller.go:270] s2irun-controller "msg"="Creating Job" "Name"="dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job" "Namespace"="demo1"
E1227 03:41:19.160172 1 s2irun_controller.go:281] s2irun-controller "msg"="Failed to create Job" "error"="Job.batch "dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job" is invalid: spec.template.labels: Invalid value: "dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job": must be no more than 63 characters" "Name"="dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job" "Namespace"="demo1"
E1227 03:41:19.162391 1 controller.go:267] controller-runtime/manager/controller/s2irun-controller "msg"="Reconciler error" "error"="Job.batch "dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job" is invalid: spec.template.labels: Invalid value: "dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job": must be no more than 63 characters" "name"="dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m" "namespace"="demo1"

the job name "dockerhub.kubekey.local-library-mywebc-latest-gah7qf7m-b36c6f9d5838-job" is really too long to exceed the 63 characters and is different from the manual job which does't make the job name long than 63 limit, so may I have the solution for this issue? really appreciate.

Thanks,
Leo

@yangbo7907
Copy link
Author

问题就是webhook触发的job名称字符超过63个字符报错了, 而手动运行构建器,生成的job名字却没有这么长, 是否能够调整?

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

No branches or pull requests

1 participant