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

feat: allow changing the name of container in audit and controlle manager #3759

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

mozillazg
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #3756

Special notes for your reviewer:

…ager

Signed-off-by: mozillazg <mozillazg101@gmail.com>
@mozillazg mozillazg requested a review from a team as a code owner January 1, 2025 08:40
@codecov-commenter
Copy link

codecov-commenter commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.65%. Comparing base (3350319) to head (705c76b).
Report is 221 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (705c76b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (705c76b)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3759      +/-   ##
==========================================
- Coverage   54.49%   47.65%   -6.85%     
==========================================
  Files         134      236     +102     
  Lines       12329    19924    +7595     
==========================================
+ Hits         6719     9494    +2775     
- Misses       5116     9533    +4417     
- Partials      494      897     +403     
Flag Coverage Δ
unittests 47.65% <ø> (-6.85%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

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

LGTM

@NoamY8
Copy link

NoamY8 commented Jan 5, 2025

@CodiumAI-Agent /review

@JaydipGabani JaydipGabani requested a review from a team January 6, 2025 17:57
@ritazh ritazh merged commit 23dfa15 into open-policy-agent:master Jan 8, 2025
19 checks passed
@CodiumAI-Agent
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

3756 - Fully compliant

Fully compliant requirements:

  • Allow overriding the container name for the audit component in the Helm chart.
  • Allow overriding the container name for the controller manager component in the Helm chart.

Not compliant requirements:
[]

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Misconfiguration

Ensure that the new containerName values are properly validated and do not lead to misconfigurations or conflicts in deployments.

    - op: replace
      path: /spec/template/spec/containers/0/name
      value: "{{ .Values.audit.containerName }}"
    - op: remove
      path: /spec/template/spec/containers/0/resources/limits
    - op: remove
      path: /spec/template/spec/containers/0/resources/requests
    - op: remove
      path: /spec/template/spec/nodeSelector/kubernetes.io~1os
    - op: remove
      path: /spec/template/spec/containers/0/image
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/allowPrivilegeEscalation
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/capabilities
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/readOnlyRootFilesystem
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/runAsGroup
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/runAsNonRoot
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/runAsUser
    - op: remove
      path: /spec/template/spec/containers/0/securityContext/seccompProfile
- target:
    kind: Deployment
    name: gatekeeper-controller-manager
  patch: |-
    - op: replace
      path: /spec/template/spec/containers/0/name
      value: "{{ .Values.controllerManager.containerName }}"
Helm Template Consistency

Verify that the containerName field is correctly templated and resolves properly in all deployment scenarios.

name: '{{ .Values.audit.containerName }}'
Helm Template Consistency

Verify that the containerName field is correctly templated and resolves properly in all deployment scenarios.

name: '{{ .Values.controllerManager.containerName }}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The name of container in audit and controlle manager is same
6 participants