Files
nomad/ui/app/utils/default-sentinel-policy-templates.js
Phil Renaud 86c858cdc3 [ui] Sentinel Policies CRUD UI (#20483)
* Gallery allows picking stuff

* Small fixes

* added sentinel templates

* Can set enforcement level on policies

* Working on the interactive sentinel dev mode

* Very rough development flow on FE

* Changed position in gutter menu

* More sentinel stuff

* PR cleanup: removed testmode, removed unneeded mixins and deps

* Heliosification

* Index-level sentinel policy deletion and page title fixes

* Makes the Canaries sentinel policy real and then comments out the unfinished ones

* rename Access Control to Administration in prep for moving Sentinel Policies and Node Pool admin there

* Sentinel policies moved within the Administration section

* Mirage fixture for sentinel policy endpoints

* Description length check and 500 prevention

* Sync review PR feedback addressed, implied butons on radio cards

* Cull un-used sentinel policies

---------

Co-authored-by: Mike Nomitch <mail@mikenomitch.com>
2024-05-22 16:41:50 -04:00

51 lines
1.5 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import countLimitsPolicy from './sentinel_policy_templates/count-limits';
import noFridaysPolicy from './sentinel_policy_templates/no-friday-deploys';
import alwaysFailPolicy from './sentinel_policy_templates/always-fail';
import canariesOnlyPolicy from './sentinel_policy_templates/canaries-only';
import resourceLimitsPolicy from './sentinel_policy_templates/resource-limits';
import restictImagesPolicy from './sentinel_policy_templates/restrict-images';
export default [
{
displayName: 'Count Limits',
name: 'count-limits',
description: 'Enforces that no task group has a count over 100',
policy: countLimitsPolicy,
},
{
displayName: 'No Friday Deploys',
name: 'no-friday-deploys',
description: 'Ensures that no deploys happen on a Friday',
policy: noFridaysPolicy,
},
{
displayName: 'Always Fail',
name: 'always-fail',
description: 'A test Sentinel Policy that will always fail',
policy: alwaysFailPolicy,
},
{
displayName: 'Canaries Only',
name: 'canaries-only',
description: 'All deployments must have a canary',
policy: canariesOnlyPolicy,
},
{
displayName: 'Resource Limits',
name: 'resource-limits',
description: 'Ensures that tasks do not request too much CPU or Memory',
policy: resourceLimitsPolicy,
},
{
displayName: 'Restrict Images',
name: 'restrict-images',
description: 'Allows only certain Docker images and disables "latest" tags',
policy: restictImagesPolicy,
},
];