-
Notifications
You must be signed in to change notification settings - Fork 137
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
WIP Ensure ActiveGate is Enabled for Extensions #3361
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 #3361 +/- ##
==========================================
- Coverage 57.23% 57.13% -0.11%
==========================================
Files 344 344
Lines 19781 19849 +68
==========================================
+ Hits 11322 11340 +18
- Misses 7221 7256 +35
- Partials 1238 1253 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pkg/controllers/dynakube/activegate/internal/statefulset/builder/modifiers/eec.go
Outdated
Show resolved
Hide resolved
pkg/controllers/dynakube/activegate/internal/statefulset/builder/modifiers/eec.go
Outdated
Show resolved
Hide resolved
d3e8730
to
836a49b
Compare
d6a5873
to
7702ab9
Compare
7702ab9
to
74de5f2
Compare
a7b24ca
to
0c66a37
Compare
"github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta2/dynakube" | ||
dynakubev1beta3 "github.com/Dynatrace/dynatrace-operator/pkg/api/v1beta3/dynakube" |
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.
IMO, if you use 2 versions, use 2 aliases
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 read through more of the code, and it always comes back up.
And I started to ask my self: "What is the benefit of handling 2 versions in a package?"
It is just confusing, and will only cause more work, because when we move away from the older version, all of these packages need to be changed.
There is no information loss when converting between the versions, so what the old-version had the new-version also has. So doing this "use double the version, and sometimes pass in 2 dynakubes" are just asking for mistakes caused by confusion.
IMO The biggest flaw with this whole approach (converting at "random" places) is that we like to pass the DynaKube via reference, and we expect the Status part to be mutated as we pass it around, but the moment you introduce conversions in places, and not handle the mutation carefully, some data may be lost
How I would do it is:
- Only 1 version is allowed in a package (conversion and main dk-controller is exempt, maybe troubleshoot and istio aswell)
- If a package uses the new-version in any way, the input for that package should be the new-version
- The caller of the package will do the convertTo and From, so it will own the reference that is passed it, so no changes to the Status should be lost.
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.
While I agree with you, I think we should focus on unblocking this PR (because Werner is on vacation, many stories depends on this and it's getting stucked) and then start switching to beta3 everywhere. We will have to do it anyways with the oncoming stories so we can do it in small increments, or maybe do it all at once after this is merged?
I'm just trying to find the most painless way of moving forward with this.
0c66a37
to
c3c709b
Compare
c3c709b
to
8ed6f57
Compare
8759b85
to
8d004dc
Compare
6837f17
to
e8af565
Compare
e8af565
to
0b753a4
Compare
new PR based on v1beta3 branch will be created |
Description
see K8S-10118
ActiveGate is also created when Extensions are enabled in the DynaKube. No other AG capabilities are needed.
Dynakube v1beta2 is manually converted to v1beta3 in all cases when
dynakube.NeedsActiveGate()
orNeedsActiveGateService()
is called.How can this be tested?
Check enabled capabilities on the AG pod using:
a)
dynakube:
capabilities:
b)
dynakube:
capabilities:
c)
dynakube:
capabilities: