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

Add Resources to Scan, ParseDefinition & ScanCompletionHook CRDs #1342

Merged
merged 6 commits into from
Sep 15, 2022

Conversation

J12934
Copy link
Member

@J12934 J12934 commented Sep 5, 2022

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
Copy link

github-actions bot commented Sep 5, 2022

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

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>
Copy link
Member

@malexmave malexmave left a comment

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?

@rseedorff rseedorff merged commit b296eef into main Sep 15, 2022
@rseedorff rseedorff 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