Skip to content

fix: Add Missing Flags as Helm Values #3787

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ianstanton
Copy link
Contributor

What this PR does / why we need it:
Add the following flags as helm values and pass down to controller-manager and audit deployment templates:

  • --log-level-key
  • --log-level-encoder
  • --cert-dir
  • --api-cache-dir
  • --otlp-endpoint
  • --otlp-metric-interval
  • --stackdriver-only-when-available
  • --stackdriver-metric-interval
  • --disable-enforcementaction-validation
  • --client-ca-name
  • --client-cn-name

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 #3784

Special notes for your reviewer:
I left some of the missing flags in #3784 out as I'm still determining whether they belong as chart values. I also want to be sure the right flags are passed to the appropriate deployments (some are applied to both, others are unique to controller-manager or audit), so feedback is welcome there.

Signed-off-by: Ian Stanton <[email protected]>
Signed-off-by: Ian Stanton <[email protected]>
Signed-off-by: Ian Stanton <[email protected]>
Signed-off-by: Ian Stanton <[email protected]>
@ianstanton ianstanton requested a review from a team as a code owner January 17, 2025 04:32
Comment on lines +18 to +22
volumeMounts:
- mountPath: /certs
name: cert
readOnly: true
$patch: delete
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added these here to avoid duplicate entries when generating manifests. I renamed the file as it is no longer only deleting ports.

@@ -8,7 +8,7 @@ bases:
- "../../../config/default"
patchesStrategicMerge:
- kustomize-for-helm.yaml
- delete-ports.yaml
- delete-merge-values.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed file mentioned above.

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.96%. Comparing base (3350319) to head (7360a3c).
Report is 345 commits behind head on master.

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

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (7360a3c)
unittests 2 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3787       +/-   ##
===========================================
- Coverage   54.49%   38.96%   -15.53%     
===========================================
  Files         134      236      +102     
  Lines       12329    20127     +7798     
===========================================
+ Hits         6719     7843     +1124     
- Misses       5116    11709     +6593     
- Partials      494      575       +81     
Flag Coverage Δ
unittests 38.96% <ø> (-15.53%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JaydipGabani JaydipGabani added this to the v3.20.0 milestone Mar 19, 2025
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.

Thanks for the PR!

@@ -94,12 +98,18 @@ spec:
- --disable-cert-rotation={{ .Values.controllerManager.disableCertRotation }}
- --max-serving-threads={{ .Values.maxServingThreads }}
- --tls-min-version={{ .Values.controllerManager.tlsMinVersion }}
- --client-ca-name={{ .Values.controllerManager.clientCAName }}
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these flags should be set conditionally only when the helm variable is set. We do not want to set new flags to user deployments during upgrades. Additionally, please add the helm variable information in https://github.com/open-policy-agent/gatekeeper/blob/master/cmd/build/helmify/static/README.md as well to make it visible.

@npoxopob
Copy link

@ianstanton, hello friend! Can you add some extra missing flag, it is cert-service-name
https://github.com/open-policy-agent/gatekeeper/blob/8d048b0655b0a0e7f31e172bc4aaf27b685e0714/main.go#L114C54-L114C71
Don't want create new pr, and wait approve for this feature

@ianstanton
Copy link
Contributor Author

@ianstanton, hello friend! Can you add some extra missing flag, it is cert-service-name https://github.com/open-policy-agent/gatekeeper/blob/8d048b0655b0a0e7f31e172bc4aaf27b685e0714/main.go#L114C54-L114C71 Don't want create new pr, and wait approve for this feature

@npoxopob Hey there! Sure, I can add that to this PR.

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

Successfully merging this pull request may close these issues.

Some flags cannot be set via helm chart values
4 participants