-
Notifications
You must be signed in to change notification settings - Fork 136
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
Introduce new version v1beta2 for DynaKube and add conversion logic #3092
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3092 +/- ##
==========================================
- Coverage 59.25% 58.09% -1.17%
==========================================
Files 319 324 +5
Lines 17446 17891 +445
==========================================
+ Hits 10338 10393 +55
- Misses 5941 6319 +378
- Partials 1167 1179 +12 ☔ View full report in Codecov by Sentry. |
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.
Just checking occurrences of v1beta1
/v1alpha1
in the code base, I think we need to adapt a few more files:
PROJECT
hasv1alpha1
andv1beta1
onlytroubleshoot
package and command still usev1beta1
v1alpha1
is still used in a bunch of places (can we completely remove it?)
|
I would assume that all our logic should use the same, latest version of I missed that the |
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.
The conversion doesn't seem to work, when I create a v1beta1
DynaKube I get the following error:
Error from server: error when creating "./.vscode/deploy/dynakube_zib50933.yaml": admission webhook "webhook.dynatrace.com" denied the request: unable to decode dynatrace.com/v1beta1, Kind=DynaKube into *dynakube.DynaKube
Nothing in the logs.
I have been trying to fix it, introduced several changes but that did nothing.
The only relevant change is probably the missing version here, but that still didn't fix the issue
} | ||
|
||
if src.Annotations[dynakube.AnnotationFeatureApiRequestThreshold] != "" { | ||
duration, err := time.ParseDuration(src.Annotations[dynakube.AnnotationFeatureApiRequestThreshold]) |
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.
I don't think this is correct as ParseDuration
is actually smart and allows such things as 10h
, but we only allow raw ints, that we use as seconds (I originally fought to use the actual ParseDuration
, but it was deemed "to confusing" 🫤)
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.
my attempts so far: 1990796
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.
So basically you switched hub version if I see that correctly?
Thank you I will have a look and hopefully fix it
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.
So basically you switched hub version
that was something I tried, it does not fix the problem
(I think its better to have the new version as the hub, if we are only using that in code, it should result in less conversions)
Rebased PR #3188 is already merged |
With this introduction and conversion logic of version v1beta2 for the DynaKube is done. Version v1alpha1 is removed for DynaKube and the new hubVersion is v1beta1. It is also the storageVersion
Summary of things that are added:
Please have a look at the tags if they are correct and also check my wording please.
Corresponding JIRA tickets: K8S-9331 and K8S-9492
Description
How can this be tested?
Take your time to: