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

I need a lifecycle setting for the harbor core container, any thoughts on adding it to the chart? #1722

Open
derekcha opened this issue Mar 5, 2024 · 3 comments
Assignees

Comments

@derekcha
Copy link

derekcha commented Mar 5, 2024

I was getting a 504 or EOF error when rolling while using harbor.
Pods don't seem to be cleaned up gracefully when terminated (possibly due to my having harbor after AWS LB)
So I tested by randomly setting a prestop(sleep 60) lifecycle for the container in harbor core and no errors occurred.
I would like to be able to set lifecycle on chart as well, what do you think?

@zyyw
Copy link
Collaborator

zyyw commented Mar 7, 2024

Could you please elaborate and clarify the problem, the actual behavior, the expected behavior, and your proposed solution?

@derekcha
Copy link
Author

derekcha commented Mar 8, 2024

@zyyw
Hi first of all thanks for the reply.
To explain the problem situation, I'm using harbor with helm installed, and I did a helm upgarde because I needed to make some changes, but then a developer using harbor reported the following error.

  Warning  Failed                  13s (x2 over 32s)  kubelet                  Failed to pull image "harbor-domain/harbor-project/image:tag": rpc error: code = Unknown desc = failed to pull and unpack image "harbor-domain/harbor-project/image:tag": failed to resolve reference "harbor-domain/harbor-project/image:tag": failed to do request: Head "harbor-domain/harbor-project/image:tag": EOF
  Warning  Failed                  13s (x2 over 32s)  kubelet                  Error: ErrImagePull

So I did some digging and found that the harbor core pod was not rolling out gracefully.
I tried randomly adding the following configuration to harbor-core for graceful shutdown, and no more errors occurred.

lifecycle:
  preStop:
    exec:
      command: ["/bin/sh", "-c", "sleep 60"] 

I registered this issue because it would be nice if the lifecycle settings of the container were added to the helm chart itself.
Maybe I should fix it myself and raise the PR?

@derekcha
Copy link
Author

@zyyw
Check plz.

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

2 participants