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: update k8s version #1701

Merged
merged 27 commits into from
Sep 19, 2023
Merged

chore: update k8s version #1701

merged 27 commits into from
Sep 19, 2023

Conversation

RealAnna
Copy link
Contributor

@RealAnna RealAnna commented Jul 11, 2023

This Fixes #1445 Closes #1457

A big breaking change has been added to fakeclient kubernetes-sigs/controller-runtime#2259
where basically any resource where we want to update the status should be prevetively added by the test at client generation using the WithStatusSubresource option. This pr fixes parts of it, but many tests in which we use fakeclient.create() in the lifecycle controller will need an update

@netlify
Copy link

netlify bot commented Jul 11, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit a7f579d
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/65095f07b304770008217fb5
😎 Deploy Preview https://deploy-preview-1701--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 11, 2023

Codecov Report

Merging #1701 (1695295) into main (bcc64e8) will decrease coverage by 0.21%.
The diff coverage is 63.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1701      +/-   ##
==========================================
- Coverage   84.34%   84.13%   -0.21%     
==========================================
  Files         151      150       -1     
  Lines        9601     9577      -24     
==========================================
- Hits         8098     8058      -40     
- Misses       1218     1233      +15     
- Partials      285      286       +1     
Files Changed Coverage Δ
klt-cert-manager/pkg/webhook/builder.go 50.00% <33.33%> (-33.79%) ⬇️
...perator/api/v1alpha3/analysisdefinition_webhook.go 83.52% <75.00%> (ø)
.../lifecycle/v1alpha3/keptntaskdefinition_webhook.go 93.44% <100.00%> (ø)
...trics-operator/api/v1alpha3/keptnmetric_webhook.go 94.87% <100.00%> (ø)

... and 2 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 65.91% <33.33%> (-2.64%) ⬇️
component-tests 58.48% <ø> (-0.42%) ⬇️
lifecycle-operator 84.94% <100.00%> (ø)
metrics-operator 86.56% <85.71%> (ø)
scheduler 32.12% <ø> (ø)

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

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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
30.7% 30.7% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@RealAnna
Copy link
Contributor Author

envtest uses the env var ENVTEST_K8S_VERSION this is currently too old 1.24 and needs to be updated to 1.27.0 or more

@RealAnna RealAnna force-pushed the chore/upgrade_controller_runtime branch from 98eabca to ce0342b Compare September 18, 2023 15:19
@RealAnna
Copy link
Contributor Author

RealAnna commented Sep 18, 2023

I do not think it is a good strategy to change the code to make the test pass, instead of removing Status().Update() we can fix our usage of the fake client adding the object at client creation and making sure to use .WithStatusSubresource(objs...)

I fixed this for the app version and changed the app version tests but we should do all of them

this fixed appversion failing component test, so the change should make all component test pass

odubajDT and others added 11 commits September 19, 2023 10:42
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: RealAnna <89971034+RealAnna@users.noreply.github.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
RealAnna and others added 7 commits September 19, 2023 10:42
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT odubajDT force-pushed the chore/upgrade_controller_runtime branch from ccfee8d to a7f579d Compare September 19, 2023 08:42
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@github-actions github-actions bot added the helm label Sep 19, 2023
klt-cert-manager/go.mod Outdated Show resolved Hide resolved
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT odubajDT marked this pull request as ready for review September 19, 2023 09:37
@odubajDT odubajDT requested review from a team as code owners September 19, 2023 09:37
@RealAnna RealAnna removed the on hold Do not merge yet label Sep 19, 2023
bacherfl
bacherfl previously approved these changes Sep 19, 2023
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 19, 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

@RealAnna RealAnna merged commit 010d7cd into main Sep 19, 2023
33 of 34 checks passed
@RealAnna RealAnna deleted the chore/upgrade_controller_runtime branch September 19, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support controller runtime v0.15.0 Remove Decoder Injector interface from webhook
4 participants