keptn icon indicating copy to clipboard operation
keptn copied to clipboard

feat(installer): Add initcontainers to prevent installation errors

Open agardnerIT opened this issue 3 years ago • 4 comments

This PR

  • Adds initContainers to prevent Errors and CrashLoopBackOffs during a Keptninstallation.

Related Issues

Fixes #7580

Notes

This is my "best guess" as to the order of the dependencies and probably needs adjusting.

Follow-up Tasks

This is a temporary fix and should be solved with other methods (like improved readiness probes and health checks).

How to test

Install a version without this PR and you'll see the pods fall into Error and CrashLoopBackOff states until everything settles down. This is due to dependencies between the Keptn pods.

Install this version and initcontainers should prevent Errors and CrashLoopBackOffs.

agardnerIT avatar Aug 30 '22 03:08 agardnerIT

@agardnerIT did you try a solution with just readiness probes instead of init containers?

mowies avatar Aug 30 '22 08:08 mowies

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Aug 30 '22 21:08 sonarqubecloud[bot]

@agardnerIT did you try a solution with just readiness probes instead of init containers?

No. I'm at the limit of my knowledge here so any assistance or better solutions to move this PR towards being ready for a merge is appreciated.

agardnerIT avatar Aug 31 '22 21:08 agardnerIT

I will look into it soon, sorry for the long wait, vacation, other prios in Keptn...

mowies avatar Sep 19 '22 09:09 mowies

Codecov Report

Merging #8775 (8a2d763) into master (60a8953) will increase coverage by 0.00%. The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8775   +/-   ##
=======================================
  Coverage   70.65%   70.65%           
=======================================
  Files         619      619           
  Lines       32628    32657   +29     
  Branches     1634     1634           
=======================================
+ Hits        23052    23075   +23     
- Misses       8345     8348    +3     
- Partials     1231     1234    +3     
Impacted Files Coverage Δ
distributor/pkg/uniform/log/uniformlog.go 71.87% <0.00%> (-4.69%) :arrow_down:
resource-service/models/resource.go 100.00% <0.00%> (ø)
...ard-controller/internal/db/mongodb_uniform_repo.go 69.04% <0.00%> (+0.06%) :arrow_up:
shipyard-controller/main.go 72.05% <0.00%> (+0.24%) :arrow_up:
cli/internal/textutils.go 92.30% <0.00%> (+0.64%) :arrow_up:
cli/pkg/config/cli_config.go 59.75% <0.00%> (+3.65%) :arrow_up:
Flag Coverage Δ
api 75.60% <ø> (ø)
approval-service 64.61% <ø> (ø)
bridge-server 73.96% <ø> (ø)
bridge2 87.03% <ø> (ø)
cli 44.16% <ø> (+0.13%) :arrow_up:
distributor 69.88% <ø> (-0.30%) :arrow_down:
lighthouse-service 73.60% <ø> (ø)
mongodb-datastore 57.94% <ø> (ø)
remediation-service 100.00% <ø> (ø)
resource-service 80.48% <ø> (ø)
secret-service 81.81% <ø> (ø)
shipyard-controller 67.86% <ø> (+0.01%) :arrow_up:
statistics-service 58.41% <ø> (ø)
webhook-service 84.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Oct 10 '22 08:10 codecov[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Oct 20 '22 09:10 sonarqubecloud[bot]

All good for me. I can verify this works. Awesome work @mowies .

agardnerIT avatar Oct 25 '22 08:10 agardnerIT