-
Notifications
You must be signed in to change notification settings - Fork 100
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
Allow server to control ansible pods #174
Allow server to control ansible pods #174
Conversation
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.
👍 Overall looks great
@@ -149,6 +153,11 @@ objects: | |||
mountPath: "/persistent" | |||
env: | |||
- | |||
name: MY_POD_NAMESPACE |
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 think you need this in the other template as well.
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.
Done
This utilizes the OpenShift "Downward API" ref: https://docs.openshift.org/latest/dev_guide/downward_api.html#dapi-values-using-environment-variables
This account will be given the view and edit role for the namespace to allow it to scale the ansible pod when the role is enabled or disabled.
We will scale the pod up to 1 when the role is activated
We use a new user (service account) so that only pods which need API access to the project can get it. For now this will be just the manageiq app pod which will use the API (and the service account token) to scale up or down the ansible pod.
266eecf
to
cd296dd
Compare
Checked commits carbonin/manageiq-pods@6c9133b~...cd296dd with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
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.
👍
This PR adds a new service account for the manageiq application pod which is intended to have edit and view roles for the namespace the project is running in.
This will allow the app pod itself to scale other pods within the project up and down.
The plan is to use this ability to only scale the ansible pod when it is needed (when the role is enabled).