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

jobspec: add service block provider parameter #12189

Merged
merged 3 commits into from
Mar 14, 2022
Merged

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented Mar 4, 2022

This PR adds a new parameter to the service block named provider. This dictates which service registration provider to use and defaults to consul maintaining the current implementation default. The parameter can also be nomad; any other value will result in an error being returned to the user upon job registration or similar.

The validation of services now includes specific validations depending on the provider configuration parameter. The MVP also only allows a single provider to be used per task group.

closes https://github.com/hashicorp/team-nomad/issues/264

@jrasell jrasell added this to the 1.3.0 milestone Mar 4, 2022
@jrasell jrasell requested a review from schmichael March 4, 2022 10:17
@jrasell jrasell self-assigned this Mar 4, 2022
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

I think you'll also need to check helper methods like Job.ConsulUsages and make sure they only check services using the Consul provider.

There's probably a lot more places that assume len(services) > 0 means Consul is going to be used, so I'll try to keep exploring as you land more PRs.

nomad/structs/services.go Outdated Show resolved Hide resolved
nomad/structs/services.go Show resolved Hide resolved
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants