-
Notifications
You must be signed in to change notification settings - Fork 8
Add ODG controller #411
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
Add ODG controller #411
Conversation
import odg_operator.odg_model as odgm | ||
|
||
|
||
ci.log.configure_default_logging() |
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 would prefer to new code to avoid dependencies to ci.*
packages. esp. sth. basic like logging we should rather define locally (esp. considering that we might see a different logging infrastructure for ODG - e.g. conveying logs to some service, rather than (only) printing to stdout).
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.
Agree, but for logging I suggest to address this as a separate topic (there are many usages of ci.log
modul across odg-extensions).
For ci.util
I will copy the merge-dict function 👍
218d87a
to
484d21a
Compare
9b20804
to
24641a8
Compare
24641a8
to
dc5c0de
Compare
@@ -0,0 +1,583 @@ | |||
import argparse |
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.
is it, naming-wise a good match to have a package odg_operator
(emphasis on the operator part), w/ a submodule odg_controller
?
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.
An k8s operator is a method of managing a k8s application using resource, controllers, and domain specific stuff.
I prefer a dedicated repository, for the time being I think the package is okay.
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.
We might omit the odg_
prefix for the modules as it's already expressed by the package name odg_operator
, wdyt?
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.
for model
and util
there are name collisions, thus odg
prefix has to remain.
for controller we could remove it, however considering consistency and that we will restructure repositories anyways, I think we should keep the prefix for now.
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.
Why are there name collisions if they are part of the odg_operator
package?
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.
well, package local import would look like that:
import util
this would collide with top level util
module
we could workaround this with "full path" (import odg_operator.util
) as we typically add the repo-dir to PYTHONPATH, nevertheless I'd like to avoid introducing such pitfalls.
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.
Hmm, AFAIK we always import modules with "full path" within this code base, so I'd vote to use a consistent approach either way.
Edit: I just saw those imports are using the "full path" already anyways.
dc5c0de
to
7878934
Compare
@@ -0,0 +1,583 @@ | |||
import argparse |
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.
We might omit the odg_
prefix for the modules as it's already expressed by the package name odg_operator
, wdyt?
7878934
to
4faf902
Compare
4faf902
to
93f3acc
Compare
e452e0b
to
acdc8c2
Compare
@@ -0,0 +1,583 @@ | |||
import argparse |
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.
Why are there name collisions if they are part of the odg_operator
package?
Reconciles ODG resources in mODG-root cluster and creates ODG-Extension resources (via gardener-resource-manager).
acdc8c2
to
71932bd
Compare
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.
/lgtm
Reconciles ODG resources in mODG-root cluster and creates ODG-Extension resources (via gardener-resource-manager).
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: