-
Notifications
You must be signed in to change notification settings - Fork 762
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
feat: add init containers #1423
Conversation
Signed-off-by: Taehyun Kim <[email protected]>
5ae092d
to
0457580
Compare
@kimxogus could you please justify why we need this init containers? |
@zyyw As harbor-registry component doesn't check if the pod has proper iam permission(not like https://github.com/distribution/distribution), I'd like to prevent pod from running if pod doesn't have proper iam permission. As I have to use kiam or kube2iam to use harbor-registry, there could be mistakes like assigning wrong node groups which don't have permission to assume kiam/kube2iam role. |
Hi, we actually need this for Trivy init container. when in offline environments we need an init container that downloads the vulnerability data base to the trivy container |
IMO, Trivy can download the DB itself? Why are you using the init container? |
Because of environment where it cannot download the database from the open internet, we use an init container to pull the database from S3 for example. I am not aware of a way to directly tell Trivy where to download the data base from. Basically to automate this https://aquasecurity.github.io/trivy/v0.49/docs/advanced/air-gap/ |
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
@kimxogus I realized this is missing the init container in the in the https://github.com/goharbor/harbor-helm/blob/main/templates/trivy/trivy-sts.yaml, any chance you can add it there as well? |
645e7f2
to
d8da1a0
Compare
Merged current main and also applied to trivy statefulset. |
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
Hi, I just wanted to state that we also need init containers, if you guys might want another justification for it. Our storage class always creates PVCs in a way that only root can write to it and with an init container we could automate/streamline the setup process so that harbor works directly and no manual intervention is needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we also add this to database sts to keep consistency?
dbb0dd3
to
34b03df
Compare
@MinerYang I've just added init containers for database and redis. |
Signed-off-by: Taehyun Kim <[email protected]>
34b03df
to
e5c177c
Compare
@kimxogus @MinerYang -> Merging can be performed automatically once the requested changes are addressed. |
Add init containers to each deployment components