-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: allow multiple kepler deployments using kepler-internal #309
feat: allow multiple kepler deployments using kepler-internal #309
Conversation
0336482
to
4b05247
Compare
In case of multiple kepler deployments we have to figure out openshift dashboard's deployments and also revise our prometheus rules accordingly. |
Thats not a supported scenario to start with. I am thinking of adding a
to KeplerInternal where |
729a95a
to
57abbd9
Compare
@vprashar2929 I have added an |
d1d9e4f
to
0349e21
Compare
Kepler container is container[0] and not 1 which was a change introduced in ae09380 Signed-off-by: Sunil Thaha <[email protected]>
This commit adds a `KeplerInternal` CRD which is a internal API of Kepler Operator. Kepler CRD is now a facade for `KeplerInternal` Creating a `Kepler` now creates a corresponding `keplerinternal` CR with appropriate spec initialised. The KeplerInternal Controller responds creation of `kepler-internal` by deploying kepler. This separation allows for providing stable API - Kepler or other higher level api (such as `powermon.openshift.io - PowerMonitoring`) which provides a limited set of stable functionalities to users. NOTE: KeplerInternal API can break at any point in time, so its usage is highly discouraged other than for testing experimental features. Signed-off-by: Sunil Thaha <[email protected]>
Signed-off-by: Sunil Thaha <[email protected]>
0c5bd59
to
539be06
Compare
flag.StringVar(&controllers.KeplerDeploymentNS, "deployment-namespace", controllers.KeplerDeploymentNS, | ||
"Namespace where kepler and its components are deployed.") | ||
|
||
flag.CommandLine.Var(flag.Value(&additionalNamespaces), "watch-namespaces", |
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.
can we elaborate a bit how this parameter is to be used? is this for running multiple kepler-exporters?
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 am also thinking of allowing a *
as one of the options to allow watching all namespaces but lets do it when we really find a need.
nodeSelector := deployment.NodeSelector | ||
tolerations := deployment.Tolerations | ||
port := deployment.Port |
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 multiple kepler deployments, the port
also has to be different. Users must ensure that.
tests/e2e/kepler_test.go
Outdated
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.
can we add a similar e2e test for keplerinternal ?
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.
may be in another PR.
539be06
to
16a3074
Compare
This commit adds a `namespace` to kepler-internal spec which is the namespace to which kepler will be deployed. Signed-off-by: Sunil Thaha <[email protected]>
16a3074
to
17a01c9
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
Important Changes:
deployment-namespace
instead of hardcodedopenshift-kepler-operator
kepler-operator
watch-namepaces=foo,bar --watch-namespaces=baz
(multiple list)status.exporter
to indicate kepler deploymentconditions
** Testing the PR locally**
To give this a spin on
kind
cluster created usingmake fresh