-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[ui] Sentinel Policies CRUD UI #20483
Conversation
Ember Test Audit comparison
|
…olicies and Node Pool admin there
// import vaultSecretsPolicy from './sentinel_policy_templates/vault-secrets-only'; | ||
// import dyanmicPortsPolicy from './sentinel_policy_templates/dynamic-ports-only'; | ||
import resourceLimitsPolicy from './sentinel_policy_templates/resource-limits'; | ||
// import constraintEnforcmentPolicy from './sentinel_policy_templates/constraint-enforcement'; |
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.
A big TODO with this PR: do we launch this without the commented-out policies (which are currently just placeholders below), or can we write them in such a way that they make sense as starter templates (knowing Nomad ships with Sentinel v0.15.x?)
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.
Awesome, thank you. Does anyone know how to bump the sentinel version to the latest?
We should definitely bump up sentinel and sentinel-sdk, as our sentinel version 0.15.x is over 2 years old. |
@david-yu I had a look at that this morning, and we can't update Sentinel without also updating our HCL2 library. But we're on a fork of HCL2 with languages changes we needed to prevent breaking backwards compatibility when we shipped HCL2 support in Nomad 1.0. We made an attempt to update in #18122 but that never got wrapped up and it's now behind 2.19. Ideally we'd either (a) get our HCL2 changes upstreamed to main, but that's going to be a lift because it involves language changes, or (b) accept that we're going to break backcompat in the jobspec as we probably should have done when we originally switched to HCL2 for Nomad 1.0. In any case, unfortunately this is work we'll need to plan rather than just a quick dependency bump. 😿 |
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.
LGTM!
I've left a few minor questions but nothing blocking.
@philrenaud Also wondering if Sentinel will show up as a submenu here? |
It looks like we're going to try to attempt a, and get our HCL2 changes into main for hcl2. |
|
Submenu looks great, thank you! |
This is looking so good. I've been using it while developing out sample policies and noticed a couple of things:
|
Would be nice if its possible to add a template to prevent job descriptions: #18292 |
Provides access to Create, Edit, and Delete Sentinel Policies via the web UI.
By virtue of being within the
/administration/
route (née/access-control/
), this requires a management token. Additionally, this requires sentinel policies in the features list provided by the agent, which is an enterprise feature.Sentinel policies are enforced and shown at
plan
andrun
stage, and can be set as hard-mandatory, soft-mandatory, or advisory (warning but not preventing).This PR also provides a Gallery of demo/jumping-off-point sentinel policies for things like "no friday deploys" or "must include canaries".
Side-effects:
TODO: