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

Differentiate deployment names by server #19712

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

carbonin
Copy link
Member

This is required for when we have workers belonging to different
"servers" running in the same namespace.

This commit also attempts to deal with the possibility of multiple
service based worker deployments. We need the service name to remain
static so that we can configure the httpd pod correctly. To achieve
this we strip the server identifier off the front of the worker
deployment name for service workers to get the service name.

This commit deals with multiple service worker deployments by
changing the label selector on the service from the deployment
name to a more generic label for the service name which all
deployments for that service will have.

This allows the single service to front all of the separate service
deployments.

In practice, I would expect a single "server" to run the UI role
so the service to deployment would still be 1-to-1

ManageIQ/manageiq-pods#353

This is required for when we have workers belonging to different
"servers" running in the same namespace.

This commit also attempts to deal with the possibility of multiple
service based worker deployments. We need the service name to remain
static so that we can configure the httpd pod correctly. To achieve
this we strip the server identifier off the front of the worker
deployment name for service workers to get the service name.

This commit deals with multiple service worker deployments by
changing the label selector on the service from the deployment
name to a more generic label for the service name which all
deployments for that service will have.

This allows the single service to front all of the separate service
deployments.

In practice, I would expect a single "server" to run the UI role
so the service to deployment would still be 1-to-1
@miq-bot
Copy link
Member

miq-bot commented Jan 14, 2020

Checked commit carbonin@1f5e6b0 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
6 files checked, 0 offenses detected
Everything looks fine. 🏆


def deployment_name_for(name)
"#{compressed_server_id}-#{name}"
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be part of the ContainerCommon as a class method? Then the specs can share it?

@Fryguy Fryguy merged commit 3d6f538 into ManageIQ:master Jan 15, 2020
@Fryguy Fryguy added this to the Sprint 128 Ending Jan 20, 2020 milestone Jan 15, 2020
@Fryguy Fryguy self-assigned this Jan 15, 2020
@carbonin carbonin deleted the scope_deployments_by_server branch January 15, 2020 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants