Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Kubeclarity startup dependencies can be Improved to a graceful handling and prevent pods from crashing #658

Open
pkalapat opened this issue Feb 7, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@pkalapat
Copy link

pkalapat commented Feb 7, 2023

Is your feature request related to a problem? Please describe.
kubeclarity pods crash during installation due to postgress dependency. This can be improved to gracefully handle dependency and prevent pods from crashing

Describe the solution you'd like
kubeclarity kubeclarity-kubeclarity-8994b7966-vr4t6 ● 0/1 0 Init:2/3 10.0.158.68 ip-10-0-151-209.us-east-2.compute.internal 2m47s │
│ kubeclarity kubeclarity-kubeclarity-grype-server-c8fc5847f-zk8h4 ● 0/1 4 CrashLoopBackOff 10.0.102.137 ip-10-0-73-177.us-east-2.compute.internal 2m47s │
│ kubeclarity kubeclarity-kubeclarity-postgresql-0 ● 1/1 0 Running 10.0.148.40 ip-10-0-151-209.us-east-2.compute.internal 2m47s │
│ kubeclarity kubeclarity-kubeclarity-sbom-db-687d5df5f5-7ltxl ● 1/1 0 Running 10.0.74.175 ip-10-0-73-177.us-east-2.compute.internal 2m47s │
│ │

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@FrimIdan
Copy link
Member

FrimIdan commented Feb 7, 2023

@pkalapat thanks for the report. Can you share the logs from the crashing pod kubeclarity-kubeclarity-grype-server-c8fc5847f-zk8h4 (you can use kubectl logs -p <pod-name> to get the logs of the previous instance of the container)

Not sure how grype-server related to postgresql.

@stale
Copy link

stale bot commented Apr 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Apr 22, 2023

This issue has been stale for 14 days and is now closed due to inactivity, if this issue is still relevant please re-open this issue, or open a new issue.

@stale stale bot closed this as completed Apr 22, 2023
@lelia lelia reopened this May 31, 2023
@stale
Copy link

stale bot commented Jul 30, 2023

This issue has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 14 days if no further activity occurs. If this issue is still relevant please leave a comment to let us know and the stale label will be automatically removed. Thank you for your contributions.

@github-actions
Copy link

This issue has been marked stale for 14 days, and is now closed due to inactivity. If the issue is still relevant, please re-open this issue or file a new one. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2023
@Tehsmash Tehsmash added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 29, 2023
@Tehsmash Tehsmash reopened this Aug 29, 2023
@Tehsmash
Copy link
Contributor

It looks like we need an init container to wait for postgres to be ready and then start the main kubeclarity backend container, this will prevent crashloops on the initial installation.

@danmanners
Copy link

I've added a Job as part of my deployment to run the postgres db-init. I'll work on submitting a PR and add something like this into the Helm chart as an optional init container.

https://github.com/danmanners/homelab-kube-cluster/blob/main/manifests/workloads/kubeclarity/initdb.yaml

@ramizpolic ramizpolic transferred this issue from openclarity/openclarity Aug 8, 2024
@ramizpolic ramizpolic transferred this issue from another repository Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants