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

chore(operator): standardize k8s Events on lifecycle path #1692

Merged
merged 12 commits into from
Jul 21, 2023

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Jul 7, 2023

Fixes: #1683

Changes

  • standardize k8s Events on lifecycle path - introduce started, finished and failed events
  • introduce PhaseStates of Phases and make use of them in the code
  • remove k8s Events creating big noise and having no big value for the end users (not finished Events, ...)
  • add more tests
  • normalize all Events to use the same pattern

@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit 36d3c47
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/64ba17e935ff430008d8579b
😎 Deploy Preview https://deploy-preview-1692--keptn-lifecycle-toolkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #1692 (36d3c47) into main (f47ca50) will decrease coverage by 0.16%.
The diff coverage is 43.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1692      +/-   ##
==========================================
- Coverage   63.59%   63.43%   -0.16%     
==========================================
  Files         143      143              
  Lines       10934    10907      -27     
==========================================
- Hits         6953     6919      -34     
- Misses       3719     3727       +8     
+ Partials      262      261       -1     
Impacted Files Coverage Δ
operator/apis/lifecycle/v1alpha3/common/phases.go 100.00% <ø> (ø)
...rator/controllers/lifecycle/keptnapp/controller.go 63.47% <0.00%> (-0.63%) ⬇️
...rator/controllers/lifecycle/keptntask/job_utils.go 73.33% <0.00%> (-0.84%) ⬇️
...ifecycle/keptntaskdefinition/reconcile_function.go 71.11% <0.00%> (-4.45%) ⬇️
.../controllers/lifecycle/keptnworkload/controller.go 65.47% <0.00%> (-0.41%) ⬇️
...rator/webhooks/pod_mutator/pod_mutating_webhook.go 75.13% <0.00%> (+0.27%) ⬆️
...ontrollers/lifecycle/keptnevaluation/controller.go 76.12% <33.33%> (-0.31%) ⬇️
...controllers/lifecycle/keptntask/runtime_builder.go 70.44% <33.33%> (ø)
operator/controllers/common/taskhandler.go 78.51% <50.00%> (-0.62%) ⬇️
...lers/lifecycle/keptnworkloadinstance/controller.go 76.74% <60.00%> (-5.00%) ⬇️
... and 4 more

... and 3 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 68.55% <ø> (ø)
component-tests 57.79% <7.14%> (-1.48%) ⬇️
lifecycle-operator 84.90% <48.64%> (+0.32%) ⬆️
metrics-operator 82.32% <ø> (ø)
scheduler 32.12% <ø> (ø)

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

@odubajDT odubajDT force-pushed the chore/1683/standardize-events branch 3 times, most recently from 38b81d0 to 09ae15f Compare July 10, 2023 12:59
@odubajDT odubajDT marked this pull request as ready for review July 10, 2023 14:11
@odubajDT odubajDT requested a review from a team as a code owner July 10, 2023 14:11
@odubajDT odubajDT force-pushed the chore/1683/standardize-events branch from dc8577c to e5af26d Compare July 11, 2023 09:36
RealAnna
RealAnna previously approved these changes Jul 13, 2023
odubajDT and others added 11 commits July 21, 2023 07:29
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
…oadsstate.go

Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT odubajDT force-pushed the chore/1683/standardize-events branch from e0d38a2 to 36d3c47 Compare July 21, 2023 05:30
@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2023

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

@odubajDT odubajDT merged commit 92730ad into main Jul 21, 2023
37 of 38 checks passed
@odubajDT odubajDT deleted the chore/1683/standardize-events branch July 21, 2023 10:13
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

Successfully merging this pull request may close these issues.

Lifecycle Operator :: Emit K8s Events for all phases
4 participants