FE: Create schedule agent rule component

Why are we doing this work

  • Users want to create rules that are based off of a schedule for a cluster

NOTE: Instead of cluster, use agent image

Namespace Labels

namespaces

Non-functional requirements

  • Feature flag:
  • Testing:

Implementation plan

  • frontend create schedule agent rule mode on both the project and group levels (for more context, read the schedule schema docs)
    • look at scan_result_policy_editor.vue for examples on using the policy_rule_builder.vue component
    • rule dropdown
    • agents dropdown
      • per &5363 (comment 894764465), give the user an input box instead for the user to type comma-delimited agents for MVP. There is a graphql endpoint for both (e.g. Project.clusterAgents and Group.clusterAgents), so this could be a dropdown for v2
    • namespace dropdown
      • per #365820 (comment 998547239), give the user an input box instead for the user to type comma-delimited namespaces because there is no endpoint to retrieve all namespaces
    • CRON dropdowns
      • per &5363 (comment 894814030), limit users to only specific schedules, allowing a user to use yaml mode to do anything more complicated

Verification steps

  1. Upload a GitLab Ultimate license
  2. Turn on the :scan_execution_rule_mode feature flag
  3. Navigate to a project => Security & Compliance => Policies => New policy => Scan Execution Policy
  4. Verify rule mode schedule agent rule works
  5. Navigate to a group => Security & Compliance => Policies => New policy => Scan Execution Policy
  6. Verify rule mode schedule agent rule works
Edited by Alexander Turinske