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

policy: add new file source for loading policies from disk. #178

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented Jun 18, 2020

The MVP cluster scaling includes the ability to load scaling
policies from a specified directory. This functionality is off by
default but is turned on when the policy-dir flag or corresponding
config file parameter is set to a non-empty string.

The file source implements the source interface. It is also
responsible for generating UUIDs for the policies, a task which has
before been performed by Nomad. The source stores the ID mapped to
the file path md5sum. This allows the policy contents to change
without the need to update the policyID.

Funcationality is in place to allow reloading of the policies dir
by sending the agent a SIGHUP signal. This still requires plumbing
in from the agent and will be addressed in a follow up PR.

closes #157

@jrasell jrasell added this to the 0.1.0 milestone Jun 18, 2020
@jrasell jrasell requested review from lgfa29, jazzyfresh and cgbaker June 18, 2020 07:46
@jrasell jrasell self-assigned this Jun 18, 2020
@jrasell jrasell marked this pull request as draft June 18, 2020 16:20
agent/agent.go Show resolved Hide resolved
helper/uuid/uuid_test.go Outdated Show resolved Hide resolved
policy/manager.go Show resolved Hide resolved
policy/file/source.go Show resolved Hide resolved
policy/file/source.go Outdated Show resolved Hide resolved
@jrasell jrasell requested a review from lgfa29 June 19, 2020 06:58
@jrasell jrasell marked this pull request as ready for review June 19, 2020 06:58
Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

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

a few style questions, looks good!

agent/agent.go Show resolved Hide resolved
policy/file/source.go Show resolved Hide resolved
policy/file/source.go Show resolved Hide resolved
policy/file/source.go Outdated Show resolved Hide resolved
policy/file/source.go Outdated Show resolved Hide resolved
policy/file/source.go Outdated Show resolved Hide resolved
The MVP cluster scaling includes the ability to load scaling
policies from a specified directory. This functionality is off by
default but is turned on when the policy-dir flag or corresponding
config file parameter is set to a non-empty string.

The file source implements the source interface. It is also
responsible for generating UUIDs for the policies, a task which has
before been performed by Nomad. The source stores the ID mapped to
the file path md5sum. This allows the policy contents to change
without the need to update the policyID.

Funcationality is in place to allow reloading of the policies dir
by sending the agent a SIGHUP signal. This still requires plumbing
in from the agent and will be addressed in a follow up PR.
@jrasell jrasell merged commit 63beba4 into f-aws-asg-cluster-scaling Jun 22, 2020
@jrasell jrasell deleted the gh-157 branch June 22, 2020 06:35
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

Successfully merging this pull request may close these issues.

3 participants