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

Ability to provide Day-2 operations #147

Closed
jmesnil opened this issue Jul 6, 2020 · 5 comments
Closed

Ability to provide Day-2 operations #147

jmesnil opened this issue Jul 6, 2020 · 5 comments
Assignees

Comments

@jmesnil
Copy link

jmesnil commented Jul 6, 2020

Feature Request

Is your feature request related to a problem?

When I use the RCO to deploy my runtime on OpenShift, I would like to perform some Day-2 operations while my application is running.
For example, my Runtime is based on Java applications and I'd like to be able to:

  • change the log level to DEBUG on one of my pods in order to get more insight on a weird behaviour
  • flush the pool of JDBC connections on one of my pods.

As far as I can tell, RCO does not provide mechanisms to "plug" such Day-2 operations that are specific to the deployed runtime.

Describe the solution you'd like

I'd like to be able to use RCO to deploy my runtime and be able to specify day-2 operations to perform on my deployed application.

OpenLiberty that is using RCO as a library to implement its own operator provides some of these day-2 operations: https://github.com/OpenLiberty/open-liberty-operator/blob/master/doc/user-guide.adoc#day-2-operations
They are able to do so because they provide their own operator. Ideally, I'd like to be able to perform similar day-2 operations without having to extend RCO.

One of the possible design would be to have an additional CRD owned by RCO that would correspond to a Day-2 operation (e.g. RuntimeOperation). This CRD would allow the execution of a command against a pod owned by the RCO operator.
This works fine for Day-2 operation that change the runtime state of the application without changing its cluster state.
For example, I could then create a custom resource to change the log level of my Java application

kind: RuntimeOperation
metadata:
  name: change-log-level
spec:
  podName: <name of my pod>
  exec:
    command:
      - /my/script/to/change/log/levels
      - org.example.foo
      - TRACE

To flush a JDBC connection pool, I coud create another custom resource:

kind: RuntimeOperation
metadata:
  name: flush-jdbc-pool
spec:
  podName: <name of my pod>
  exec:
    command:
      - /my/script/to/flush/jdbc/pool
      - <name of my jdbc pool>

These operations are performed once and if I want to perform them again, I have to replace them (or create ones with new names).

@arthurdm
Copy link
Member

arthurdm commented Jul 6, 2020

thanks @jmesnil - yes, that would be a great addition!

We have previously talked about these as "generic day 2 operations", so definitely 👍 to this. I think it's just a matter of having free cycles for this - so any help, even in the design phase, would be awesome. 😄

@arthurdm arthurdm added the help wanted Extra attention is needed label Jul 6, 2020
@arthurdm arthurdm removed the help wanted Extra attention is needed label Jul 29, 2020
@arthurdm
Copy link
Member

hi @leochr - can you please start a design for this work?

@arthurdm
Copy link
Member

arthurdm commented Sep 8, 2020

hi @jmesnil - a quick update: the PR (#157) is almost merged (should happen in the next few days). I would like to schedule a call, open to anyone in the community, to go over this feature with you. Sometime next Monday (Sept 14), in the afternoon (EST time)?

@leochr
Copy link
Member

leochr commented Sep 8, 2020

PR #157 is now merged

@leochr
Copy link
Member

leochr commented Oct 19, 2020

Closing. Delivered on September 8th via PR #157.

@leochr leochr closed this as completed Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants