Skip to content

Add Resources to Scan, ParseDefinition & ScanCompletionHook CRDs - #1342

Merged
rfelber merged 6 commits into
mainfrom
feature/parser-and-hook-resources
Sep 15, 2022
Merged

Add Resources to Scan, ParseDefinition & ScanCompletionHook CRDs#1342
rfelber merged 6 commits into
mainfrom
feature/parser-and-hook-resources

Conversation

@J12934

@J12934 J12934 commented Sep 5, 2022

Copy link
Copy Markdown
Member

Closes #1327

Open Todo's

  • Add resource values to ALL scanner charts (for parsers)
  • Add resource values to ALL hook charts
  • Update API Docs

Scanner Example Default HelmValues:

parser:
  # parser.resources -- CPU/memory resource requests/limits (see: https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/, https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/)
  resources: {}
  #   resources:
  #     requests:
  #       memory: "256Mi"
  #       cpu: "250m"
  #     limits:
  #       memory: "512Mi"
  #       cpu: "500m"

Parser Example Default HelmValues:

hook:
  # hook.resources -- CPU/memory resource requests/limits (see: https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/, https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/)
  resources: {}
  #   resources:
  #     requests:
  #       memory: "256Mi"
  #       cpu: "250m"
  #     limits:
  #       memory: "512Mi"
  #       cpu: "500m"

@J12934 J12934 added enhancement New feature or request CRD Improvements or additions to CRDs labels Sep 5, 2022
@J12934 J12934 added this to the v3.15.0 milestone Sep 5, 2022
@J12934 J12934 self-assigned this Sep 5, 2022
@github-actions

github-actions Bot commented Sep 5, 2022

Copy link
Copy Markdown

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ GO golangci-lint 7 7 9.61s
⚠️ JAVASCRIPT eslint 1 1 0.89s
✅ SPELL misspell 75 0 0.25s
⚠️ YAML prettier 67 1 5.82s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Comment thread operator/controllers/execution/scans/parse_reconciler.go
Signed-off-by: Jannik Hollenbach <jannik@hollenbach.de>
J12934 and others added 4 commits September 10, 2022 12:14
Signed-off-by: Jannik Hollenbach <jannik@hollenbach.de>
Signed-off-by: Jannik Hollenbach <jannik@hollenbach.de>
Seems like this was introduced to a update in the zap plugins

Signed-off-by: Jannik Hollenbach <jannik@hollenbach.de>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>

@malexmave malexmave left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested in the following way:

  • Built and installed the new operator based on this branch
  • Built parser- and hook SDK
  • Built nmap containers
  • Adapted values.yaml to include resource limits
  • Deployed with helm, triggered scan, saw that resources were correctly requested and used for both the scanner and parser
  • Did the same for cascading scan hook

These are all the things that should be changed and tested, correct? @J12934?

@rfelber
rfelber merged commit b296eef into main Sep 15, 2022
@rfelber
rfelber deleted the feature/parser-and-hook-resources branch September 15, 2022 09:15
@RamiSouai RamiSouai mentioned this pull request Oct 27, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CRD Improvements or additions to CRDs enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Allow setting resource limits for pods through Hook and Parser CRDs / values.yaml

4 participants